Jump to content

Can't create an inject.bin file on Ubuntu for USB Rubber Ducky

Recommended Posts

I'm using a Macbook Pro and using Parallels Desktop to run Kali Linux because I find it much easier than dual booting it. However, when I run this command in Terminal to create an inject.bin file :

java -jar encoder.jar -i helloworld.txt -o inject.bin

this error appears:

Error with input file!
Exception in thread "main" java.lang.NullPointerException
		at Encoder.main(Encoder.java:127)

What is causing this error and how can I fix it? I'm very new to the hacking world.



Link to comment
Share on other sites

  • 5 weeks later...

I started with the duckencode.jar but noticed it hated blank lines in the script, the encoder.jar didn't care about the blank lines between the commands so i started to use the encoder.jar script.

I normally use  

java -jar encoderpath/encoder.jar -i filepath/filename.txt -o /filepath/inject.bin

 Since you are using Mac, I've been using CodeRunner for the scripts, in the Preference/Language settings, you can create a new Language ( i called my DuckyScript ) with file extension of txt,  You can also put in the encoder parameters in this setting, so when you click on run it will compile it, it will compile it in the same path as the script

The encoder parameters that I used are:

java -jar /RubberDucky/Encoder/encoder.jar -i "$filename" -o inject.bin

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...