Flipper Zero — BadUSB Ducky Script Reference
flipper zerobadusbducky scripthidrubber duckypayload1c3d
Markdown
Flipper Zero — BadUSB Ducky Script Reference
Quick reference for Ducky Script syntax supported by the Flipper Zero BadUSB module.
Payload Location
Payload files go on the SD card at /ext/badusb/ as .txt files.
Core Commands
| Command | Description | Example |
|---|---|---|
REM | Comment — ignored | REM This opens notepad |
DELAY | Wait in milliseconds | DELAY 1000 |
DEFAULTDELAY | Delay between all commands | DEFAULTDELAY 100 |
STRING | Type text | STRING Hello World |
ENTER | Press Enter key | ENTER |
REPEAT | Repeat last command N times | REPEAT 5 |
Key Names
| Key | Command |
|---|---|
| Windows/Super | GUI |
| Control | CTRL |
| Alt | ALT |
| Shift | SHIFT |
| Delete | DELETE |
| Backspace | BACKSPACE |
| Escape | ESC |
| Tab | TAB |
| Caps Lock | CAPSLOCK |
| F1–F12 | F1 through F12 |
| Arrow keys | UP DOWN LEFT RIGHT |
| Page Up/Down | PAGEUP PAGEDOWN |
| Home / End | HOME END |
| Insert | INSERT |
| Print Screen | PRINTSCREEN |
Common Shortcuts
| Shortcut | Command |
|---|---|
| Run dialog (Windows) | GUI r |
| Lock screen (Windows) | GUI l |
| Task Manager | CTRL SHIFT ESC |
| Copy | CTRL c |
| Paste | CTRL v |
| Select All | CTRL a |
| Terminal (Mac) | GUI SPACE then STRING Terminal |
| Spotlight | GUI SPACE |
| Close window | ALT F4 |
| New tab | CTRL t |
Example Payloads
Open Run dialog and launch notepad (Windows):
DELAY 500
GUI r
DELAY 500
STRING notepad
ENTER
Open terminal on Linux:
DELAY 500
CTRL ALT t
DELAY 1000
STRING echo hello
ENTER
Type a long string fast:
DEFAULTDELAY 0
STRING This will type very fast with no delay between commands
Repeat a keystroke:
STRING a
REPEAT 10
REM Types 'a' 11 times total (1 + 10 repeats)
Flipper-Specific Notes
- File encoding must be UTF-8 — Windows CRLF line endings are fine
- Maximum file size: no hard limit but keep payloads concise
- The Flipper shows payload filename and a Run button — press center to execute
- You can stop mid-payload by pressing the back button
ALT NUM(hold Alt, type number on numpad) works on Windows for special characters
Delay Guidelines
| Action | Suggested DELAY |
|---|---|
| After GUI shortcut | 300–500ms |
| After opening application | 1000–2000ms |
| After typing a command | 200–300ms |
| After ENTER for command | 500–1000ms |
| On slow systems | Add 2× more delay |