|
whiskers 0.2.0
RP2350 BadUSB Tool
|
High-level code for creating a "fake" public-facing disk.
This setup essentially just creates a file on disk that is exposed via the MSC to the host. This newly created disk is saved under PUBDISK_FILENAME and can be copied from device to device. The disk size must be a minimum of 8kb and must be divisible by the sector_size of the fake disk. Note that the code will not automatically find the sector size or sector count and it must be configured through the create_pubdisk() function.
Go to the source code of this file.
Functions | |
| bool | create_pubdisk (_DISK_INFO *di, uint32_t sector_size, uint32_t sector_count) |
| Creates a pubdisk _DISK_INFO object and creates the file if it doesn't already exist. | |
| bool create_pubdisk | ( | _DISK_INFO * | di, |
| uint32_t | sector_size, | ||
| uint32_t | sector_count ) |
Creates a pubdisk _DISK_INFO object and creates the file if it doesn't already exist.
| *di | Pointer to a blank _DISK_INFO struct to store the resulting info. This must be passed into the MSC setup for it to be usable. By default, the disk is mounted and writable. |
| sector_size | Size of the sector in bytes. Must be a multiple of 512 and no lower than 512. |
| sector_count | Number of sectors. |
Note that the disk size must be atleast 8kb. The size of the disk is simply sector_size*sector_count. By default, the user must format the disk and can format it with whatever filesystem they want or some variation of FAT.