facedancer.devices.umass.disk_image module
- class facedancer.devices.umass.disk_image.DiskImage[source]
Bases:
objectClass representing an arbitrary disk image, which can be procedurally generated, or which can be rendered from e.g. a file.
Currently limited to representing disk with 512-byte sectors.
- class facedancer.devices.umass.disk_image.FAT32DiskImage(size=268435456, verbose=0)[source]
Bases:
DiskImageClass for manufacturing synthetic FAT32 disk images.
- BPB_SECTOR = 2048
- CLUSTER_SIZE = 512
- DATA_SECTION_START = 10146
- FAT_END = 6113
- FAT_START = 2080
- FSINFO_SECTOR = 2049
- MBR_SECTOR = 0
- ROOT_DIR_ENTRY = 10146
- get_partition_sectors()[source]
Get the amount of sectors available for use by our main FAT partition.
- handle_bpb_read(address)[source]
Returns a valid Boot Parameter Block, which tells the device how to interpret our FAT filesystem.
- handle_fsinfo_read(address)[source]
Returns a valid filesystem info block, which is used to cache information about free sectors on the filesystem. We don’t actually sport writing, so we return a valid-but-useless block.
- handle_mbr_read(address)[source]
Returns a master boot record directing the target device to our emulated FAT32 partition.