shikata-ga-nai / simple-ducky-payload-generator

Automatically exported from code.google.com/p/simple-ducky-payload-generator
0 stars 0 forks source link

payload error #2

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
im using kali 1.0.5 64bit xfce4 desktop i used the install script

when generating payloads i get an error ive tried a few different java versions.

Generating your inject.bin file...

Hak5 Duck Encoder 2.6

Loading File .....      [ OK ]
Loading Keyboard File ..... [ OK ]
Loading Language File ..... [ OK ]
Loading DuckyScript .....   [ OK ]
Error on Line: 1
java.lang.NumberFormatException: For input string: ""
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:504)
    at java.lang.Integer.parseInt(Integer.java:527)
    at Encoder.encodeToFile(Encoder.java:236)
    at Encoder.main(Encoder.java:130)
DuckyScript Complete.....   [ OK ]

Your payload has been created, its located in /usr/share/simple-ducky

Press any key to contiue

Original issue reported on code.google.com by Ba...@darkjester.net on 25 Dec 2013 at 5:50

GoogleCodeExporter commented 8 years ago
to work around this issue I have taken the payload.txt file and manually encode 
it myself with java -jar duckencode.jar -i payload.txt

Original comment by christop...@gmail.com on 22 Apr 2014 at 6:11

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Looks like the error is caused by a missing argument for the DELAY command in 
the first line...

Here is the beginning of a payload i generated

DELAY     <- delay time is missing on this row
ESCAPE
DELAY 400
CONTROL ESCAPE
DELAY 400
STRING cmd
DELAY 400
...

I added 400 after DELAY in the first line. Now the output looks like this,

Hak5 Duck Encoder 2.6

Loading File .....      [ OK ]
Loading Keyboard File ..... [ OK ]
Loading Language File ..... [ OK ]
Loading DuckyScript .....   [ OK ]
DuckyScript Complete.....   [ OK ]

after running,

java -jar encoder.jar -l us -i payload.txt

probably a small bug in the script generating the payload...

Original comment by silv3rf...@gmail.com on 4 Sep 2014 at 9:19

GoogleCodeExporter commented 8 years ago
Just realized that the human error was present...

In my case i forgot to type in the initial DELAY when asked for it (i just hit 
return...)

How long of a delay would like before starting? 
Use Milliseconds (15000 ms = 15 sec) 400   < --- Don't forget this!

Works like a charm now!

Original comment by silv3rf...@gmail.com on 4 Sep 2014 at 9:37