Jump to content

Why is my script not working?


Recommended Posts

Hello, Hak5 forum. 
Today I received my bash bunny, But I'm having some trouble with the Ducky script language. 
I can't get my bash bunny script to output a string for some reason. 
I have looked around on the forums, but can't find anything. I also found a .json file with the language of my keyboard and put in the language folder. 
I have also updated my bash bunny to the latest firmware. 
Here my script: 

#!/bin/bash
LED SETUP
DELAY 200
ATTACKMODE HID
Q SET_LANGUAGE dk
LED ATTACK
GUI r 
DELAY 100
RUN WIN notepad.exe
DELAY 450
STRING "Hello world"
DELAY 100
LED G

Everything works fine until the line with the string. 
Is there something wrong with this since it should be working or am I just being stupid?

Thank you!

Link to post
Share on other sites

First of all I would get rid of the line containing #!/bin/bash

Q SET_LANGUAGE dk should be replaced by DUCKY_LANG=dk

Each DELAY should have a Q or QUACK in front of them

The GUI r could be deleted since it's about to do the same thing as the RUN WIN line

The STRING line should also have a Q or QUACK in front of it

Something like this:

LED SETUP
ATTACKMODE HID
DUCKY_LANG=dk
LED ATTACK
RUN WIN "notepad"
Q DELAY 450
Q STRING "Hello world"
DELAY 100
LED G

  • Upvote 1
Link to post
Share on other sites
26 minutes ago, chrizree said:

First of all I would get rid of the line containing #!/bin/bash

Q SET_LANGUAGE dk should be replaced by DUCKY_LANG=dk

Each DELAY should have a Q or QUACK in front of them

The GUI r could be deleted since it's about to do the same thing as the RUN WIN line

The STRING line should also have a Q or QUACK in front of it

Something like this:

LED SETUP
ATTACKMODE HID
DUCKY_LANG=dk
LED ATTACK
RUN WIN "notepad"
Q DELAY 450
Q STRING "Hello world"
DELAY 100
LED G

Okay,thanks a lot!

Link to post
Share on other sites

I forgot a "Q" for the last DELAY in my sample script code, but it should run anyway. Since you are using the "standard" LED modes elsewhere in the script, you could use LED FINISH in the end instead of LED G, but that's just aesthetics really.

  • Like 1
Link to post
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.

Guest
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...