A sketch to make your Teensy 3.6 Quack! Reads a plain text file from an SD card connected to the built-in slot on the Teensy, interprets commands, and sends HID commands to the connected host.
Supports all of the commands from Duckyscript (from the USB-Rubber-Ducky project) interpreter with some additions due to the easy support of mouse movement and file system access. All commands are by default read from a payload.txt file that needs to be located on the root of the SD card.
MOUSE: provides for mouse three button click and movement trackingMOUSE CLICK (MOUSE_LEFT|MOUSE_MIDDLE|MOUSE_RIGHT): Press and release a defined mouse buttonMOUSE TOGGLE (MOUSE_LEFT|MOUSE_MIDDLE|MOUSE_RIGHT): Toggle a defined mouse button, holds the button down until the next toggle commandMOUSE MOVE [X] [Y]: Provides relative movement from current position based on x and y coordinatesMOUSE MOVETO [X] [Y]: Locates the mouse at an absolute position based on the definedRESOLUTION
STRINGLN: Same asSTRINGbut ends with a newline to save onENTERentriesRESOLUTION [X] [Y]: Supports setting the monitor resolution forMOUSE MOVETOFILE: Types out the contents of a file stored on the SD card
- Arduino IDE (developed on 1.8.9)
- Teensyduino (developed on 1.46)
- SdFat library (developed on 1.1.0) for Arduino and an FAT16, FAT32, or exFAT formatted SD card
- Install Arduino IDE
- Install the Teensyduino addon for Arduino
File->Opentheducksy.inofile in the Arduino IDETools->Boardand set toTeensy 3.6Tools->USB Typeand set toKeyboard + Mouse + JoystickTools->Manage Librariesand installSdFatSketch->Include Libraryand selectSdFatto add the SdFat header includes to the top of the sketch- Upload to the Teensy!