scottisheyebrow Posted November 15, 2016 Share Posted November 15, 2016 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. Thanks! Quote Link to comment Share on other sites More sharing options...
Decoy Posted November 15, 2016 Share Posted November 15, 2016 Try defining your keyboard resource in the command line: java -jar duckencode.jar -i script.txt -o inject.bin -l resources/us.properties Quote Link to comment Share on other sites More sharing options...
scottisheyebrow Posted November 15, 2016 Author Share Posted November 15, 2016 49 minutes ago, Decoy said: Try defining your keyboard resource in the command line: java -jar duckencode.jar -i script.txt -o inject.bin -l resources/us.properties Unfortunately the exact same error occurred. Quote Link to comment Share on other sites More sharing options...
scottisheyebrow Posted November 15, 2016 Author Share Posted November 15, 2016 Alright, I just noticed something. In the USB Rubber Ducky Master folder, there's a normal duckencoder.jar, but inside the Encoder folder, there is encoder.jar, so which .jar file do I use? Quote Link to comment Share on other sites More sharing options...
burnsoft Posted December 14, 2016 Share Posted December 14, 2016 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.