mame82 / duck2spark

Converter for raw RubberDucky payloads to Digispark Arduino IDE Sketch source.
472 stars 95 forks source link

====================================== duck2spark by MaMe82 (Marcus Mengs)

This project provides a python script capable of converting payloads generated by DuckEncoder_ to an Arduino Sketch source targeting DigiSpark. The script solves two problems:

Additional features

.. _DuckEncoder: https://github.com/hak5darren/USB-Rubber-Ducky/blob/master/Encoder/encoder.jar

Project files

Requirements

.. _Arduino IDE: https://www.arduino.cc/en/main/software .. _guide: https://digistump.com/wiki/digispark/tutorials/connecting .. _DuckEncoder: https://github.com/hak5darren/USB-Rubber-Ducky/blob/master/Encoder/encoder.jar

Usage

. Generate a DuckyScript test.duck you want to use as output::

echo "STRING Hello World" > test.duck

. Compile the script using DuckEncoder with your keyboard layout (de in example) or use my python port <https://github.com/mame82/duckencoder.py>_::

java -jar encoder.jar -i test.duck -o raw.bin -l de

. Use duck2spark.py to convert into Arduino Sketch (options for single run, 2 seconds startup delay)::

duck2spark.py -i raw.bin -l 1 -f 2000 -o sketch.ino

. After setting up the Arduino IDE load the example "DigisparkKeyboard" and replace the Sketch source by the one saved to sketch.ino .

To get help on duck2spark.py run duck2spark.py -h

Getting started with DuckyScript

Here's an introduction_ to DuckyScript

.. _introduction: http://usbrubberducky.com/?duckyscript#!duckyscript.md

Additional Hints on using DuckEncoder in conjunction with duck2spark