Skip to content

Commit

Permalink
Fixed a RP2040 bug and updated the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
i-am-shodan committed Jan 21, 2025
1 parent 9d96502 commit 1683782
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ This project implements a variety of attacks based around an easily concealable
| [Simple UI](./examples/simple_ui/) | A simple yet powerful UI to select scripts/images and run these using the hardware button. Shows how you can build complex UI interactions simply. |
| [Stream Mic audio over WiFi](./examples/hotmic/) | The M5Stack AtomS3U has a microphone that you can stream over WiFi. |
| [Instantly crash Linux boxes](./examples/linux_panic/) | Deploy a bad filesystem which cause Linux machines which automount to panic. |
| [Evil USB CDROM/NIC](./examples/malicious_ethernet_adapter/) | Pretend to be a USB NICs which requires a driver from a CDROM device that appears when you plug the NIC in. |

## Supported Hardware

Expand Down
12 changes: 11 additions & 1 deletion src/Devices/USB/USBMSC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,21 @@ void USBMSC::end()

bool USBMSC::mountDiskImage(const std::string &imageLocation, bool mountAsCD)
{
#ifdef ARDUINO_ARCH_RP2040
if (mountAsCD)
{
Debug::Log.error(TAG_USB, "CDROM support is not supported on this device");
return false;
}
#endif

std::size_t size = open_msc(imageLocation.c_str());

if (size != 0)
{
#ifndef ARDUINO_ARCH_RP2040
usb_msc.setCDROM(mountAsCD);
#endif

// Set disk vendor id, product id and revision with string up to 8, 16, 4 characters respectively
if (mountAsCD)
Expand Down Expand Up @@ -223,7 +233,7 @@ bool USBMSC::mountDiskImage(const std::string &imageLocation, bool mountAsCD)
}
else
{
Debug::Log.info(TAG_USB, "Could not load " + imageLocation);
Debug::Log.error(TAG_USB, "Could not load " + imageLocation);
return false;
}
}

0 comments on commit 1683782

Please sign in to comment.