Open Staubgeborener opened 7 years ago
Sorry for late reply...
This issue seems to be caused by duckencoder.py, because it fails to fetch its own path here
https://github.com/mame82/duckencoder.py/blob/master/duckencoder.py#L405
This again leads to wrong creation of the path to <path of duckencoder.py>/resources/de.properties
Unfortunately I'm not able to further dive into this the next days, so there're two suggestions:
1) Try to call duckencoder.py with absolute path
cat wlanscript.duck | python /full/path/to/script/duckencoder.py -p -l de > inject.bin
2) Fall back to native duckencoder from Hak5
Please understand that I'm not developing duckencoder.py with high priority, as it is only a support project for P4wnP1 (to get rid of Java), where this issue doesn't exist. Besides the need of a Java runtime, there's no disadvantage switching to native duckencoder
Btw. if you want to stay on python have a look into https://github.com/kevthehermit/DuckToolkit.
Duck2Spark seems to work fine in your case... beside the fact that the payload bytes are generated from an ASCII error message, instead of the raw encoded ducky payload (the error message of duckencoder.py has been pipes into inject.bin)
I tried you're duck2spark converter (and also the DuckEncoder, Python Version). But i'll get some issues: I try to convert a duckyscript (for example this one: https://github.com/hak5darren/USB-Rubber-Ducky/wiki/Payload---WiFi-password-grabber). I create a new file called "wlanscript.duck". After that, i use the duckencoder to get the german keboard layout:
cat wlanscript.duck | python duckencoder.py -p -l de > inject.bin
The last step: Create an Arduino Sketch:duck2spark.py -i inject.bin -l 1 -f 2000 -o sketch.ino
And here are the issues: The file sketch.ino looks a little bit weird in my Arduino IDE:
Is this correct? When i try to compile this (and waited the till the 60-second 'plug your digispark now into your usb port' message appears) and to flash my digispark i'll get this message:
After that i watched into my inject.in file and get this message root@kali:~/duck2spark-master# cat inject.bin Language file /resources/de.properties doesn't exist or isn't readable
In my duck2spark folder is a subdirectory "resources" with the file de.properties.
I don't get where the problem is. :/