6 Commits

Author SHA1 Message Date
cecio
6b048cfd95 bump to release 0.17.0 2024-04-11 21:25:54 +02:00
cecio
a33ffa2411 mods to README 2024-03-26 11:51:06 +01:00
cecio
9f4be5b8cd warning added to README 2024-03-26 11:37:09 +01:00
cecio
27e0285aae Update README.md 2024-03-25 21:27:47 +01:00
cecio
07a18dadd6 bump to release 0.16.0 2024-03-25 21:24:52 +01:00
cecio
805d361da8 Update README.md 2024-03-10 00:45:12 +01:00
6 changed files with 65 additions and 4 deletions

View File

@@ -5,6 +5,7 @@
<p float="left">
<img src="https://github.com/cecio/USBvalve/blob/main/pictures/versions.png" alt="The two models" width="30%" height="30%" />
<img src="https://github.com/cecio/USBvalve/blob/main/pictures/USBvalve_PIWATCH.png" alt="The Watch" width="26%" height="26%" />
<img src="https://github.com/cecio/USBvalve/blob/main/pictures/version1_2.png" alt="1.2" width="26%" height="26%" />
</p>
I'm sure that, like me, you were asked to put your USB drive in an *unknown* device...and then the doubt:
@@ -170,8 +171,8 @@ I grouped most of the variables you may want to modify in this section ([see Doc
Obviously you can also build your own firmware. To build the *standard* one I used:
- Arduino IDE `2.3.1`
- `Adafruit TinyUSB Library` version `3.0.0`, `Pico-PIO-USB` version `0.5.2`, Board `Raspberry Pi RP2040 (3.7.2)` setting Tools=>CPU Speed at `120MHz` and Tools=>USB Stack to `Adafruit TinyUSB`
- Arduino IDE `2.3.2`
- `Adafruit TinyUSB Library` version `3.1.1`, `Pico-PIO-USB` version `0.5.2`, Board `Raspberry Pi RP2040 (3.7.2)` setting Tools=>CPU Speed at `120MHz` and Tools=>USB Stack to `Adafruit TinyUSB`
- `ssd1306` OLED library version `1.8.3`
If you want to re-create a new fake filesystem, you may want to have a look to the `utils` folder, where I placed some utilities to build a new one.
@@ -190,3 +191,11 @@ The firmware will be placed with extension `uf2` in folder `USBvalve_out`.
### Contribute
If you have ideas or improvements in your mind, I encourage you to open an issue so that we can improve the project together! Thanks!
### Support
If you have question or need support you can open an `Issue` here or reach me out on Twitter/X [@red5heep](https://twitter.com/red5heep)
## SAFETY WARNING
I've received a lot of questions about **USBvalve** and *USB killer devices*. **USBvalve** is not built to test these devices, it has not any kind of insulation or protection, so if you have the suspect you are dealing with one of these devices, test it with something else, NOT with **USBvalve** or you may damage the device, yourself or objects near to you.

View File

@@ -36,6 +36,8 @@
#else
#include "SSD1306AsciiWire.h"
// LED Pin. If solid GREEN everything is OK, otherwise it will be put OFF
#define LED_PIN 25
#endif
@@ -109,7 +111,7 @@ bool activeState = false;
//
// USBvalve globals
//
#define VERSION "USBvalve - 0.15.1"
#define VERSION "USBvalve - 0.17.0"
boolean readme = false;
boolean autorun = false;
boolean written = false;
@@ -240,11 +242,18 @@ void setup() {
delay(1000); // Loop forever
}
}
#if !defined(PIWATCH)
// Set up led PIN
gpio_init(LED_PIN);
gpio_set_dir(LED_PIN, GPIO_OUT);
gpio_put(LED_PIN, 1);
#endif
}
// Core 1 Setup: will be used for the USB host functions for BADUSB detector
void setup1() {
// Set a custom clock (multiple of 12Mhz) to achieve maximum compatibility
// Set a custom clock (multiple of 12Mhz) to achieve maximum compatibility for HID
set_sys_clock_khz(144000, true);
pio_usb_configuration_t pio_cfg = PIO_USB_DEFAULT_CONFIG;
@@ -263,6 +272,9 @@ void loop() {
if (readme == true) {
printout("\n[!] README (R)");
readme = false;
#if !defined(PIWATCH)
gpio_put(LED_PIN, 0); // Turn Off LED
#endif
}
if (autorun == true) {
@@ -274,18 +286,27 @@ void loop() {
printout("\n[!] DELETING");
deleted = false;
deleted_reported = true;
#if !defined(PIWATCH)
gpio_put(LED_PIN, 0); // Turn Off LED
#endif
}
if (written == true && written_reported == false) {
printout("\n[!] WRITING");
written = false;
written_reported = true;
#if !defined(PIWATCH)
gpio_put(LED_PIN, 0); // Turn Off LED
#endif
}
if (hid_sent == true && hid_reported == false) {
printout("\n[!!] HID Sending data");
hid_sent = false;
hid_reported = true;
#if !defined(PIWATCH)
gpio_put(LED_PIN, 0); // Turn Off LED
#endif
}
if (BOOTSEL) {
@@ -495,6 +516,9 @@ void tuh_hid_mount_cb(uint8_t dev_addr, uint8_t instance, uint8_t const* desc_re
tuh_vid_pid_get(dev_addr, &vid, &pid);
printout("\n[!!] HID Device");
#if !defined(PIWATCH)
gpio_put(LED_PIN, 0); // Turn Off LED
#endif
SerialTinyUSB.printf("HID device address = %d, instance = %d mounted\r\n", dev_addr, instance);
SerialTinyUSB.printf("VID = %04x, PID = %04x\r\n", vid, pid);
@@ -666,3 +690,31 @@ void cursor_movement(int8_t x, int8_t y, int8_t wheel) {
}
// END of BADUSB detector section
//
// OTHER Host devices detection section
//
// Invoked when a device with MassStorage interface is mounted
void tuh_msc_mount_cb(uint8_t dev_addr) {
printout("\n[++] Mass Device");
SerialTinyUSB.printf("Mass Device attached, address = %d\r\n", dev_addr);
}
// Invoked when a device with MassStorage interface is unmounted
void tuh_msc_umount_cb(uint8_t dev_addr) {
SerialTinyUSB.printf("Mass Device unmounted, address = %d\r\n", dev_addr);
}
// Invoked when a device with CDC (Communication Device Class) interface is mounted
void tuh_cdc_mount_cb(uint8_t idx) {
printout("\n[++] CDC Device");
SerialTinyUSB.printf("CDC Device attached, idx = %d\r\n", idx);
}
// Invoked when a device with CDC (Communication Device Class) interface is unmounted
void tuh_cdc_umount_cb(uint8_t idx) {
SerialTinyUSB.printf("CDC Device unmounted, idx = %d\r\n", idx);
}
// END of OTHER Host devices detector section

BIN
pictures/version1_2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB