PyDucky
February 24, 2025 ยท View on GitHub
Description ๐
PyDucky is used to test existing ducky scripts locally for flipper zero badusb development. Initially designed to configure proxmox infrastructure quickly, this adds the convenience for payload development and testing.
Prerequisite โ๏ธ
| Language |
|---|
| Python3.x |
pip3 install pynput
Usage ๐จ
python3 pyDucky.py duckyscript.txt
Ducky Script ๐ฆ
The current implementation only supports Ducky Script V1 scripts to directly work with flipper zero based development.
One can add/edit the command mappings inside the python script to add additional functionality.
Supported Commands ๐ช
{
"ENTER": Key.enter,
"ESCAPE": Key.esc,
"SPACE": Key.space,
"TAB": Key.tab,
"ESC": Key.esc,
"UP": Key.up,
"DOWN": Key.down,
"LEFT": Key.left,
"RIGHT": Key.right,
"CTRL": Key.ctrl,
"ALT": Key.alt,
"SHIFT": Key.shift,
"BACKSPACE": Key.backspace,
"DELETE": Key.delete,
# add more...
}
Key Input speed ๐น
Edit the speed at which keys are typed based on the connectivity
ducky = PyDuck(
sys.argv[1],
0.01 # default delay for each keystroke
)
Test Case ๐งช
echo -e "STRING echo 'This is a test!'\nENTER\nDELAY 500" > test.txt
python3 pyDucky.py test.txt
- Waits 3 seconds before executing the commands.
Contributions โค๏ธ
Feel free to contribute as needed!