bad_ducky icon indicating copy to clipboard operation
bad_ducky copied to clipboard

ENTER command not working

Open rowkois opened this issue 6 years ago • 13 comments

Hi,

this issue has already been posted by donovanmagryta, but hasen't been closed with a suitable solution for me. for testing iam using demo2.txt, my system is a windows 7 64-bit german language.

The HID is opening the command interface with " GUI r", also "notepad.exe" is written, but the "Enter" command is not working, so "Hello World!" is written right behind "notepad.exe".

what I have tried so far is using diffrent delay times before & after the "notepad.exe" also a couple of rows with the "ENTER" command, nothing working at all.

Iam kindly asking for your support.

rowkois avatar Jun 02 '18 13:06 rowkois

I got exactly the same problem. Everything works perfect except ENTER button. Any possible solution ?

geoxen93 avatar Jun 07 '18 10:06 geoxen93

https://www.dropbox.com/s/1yhmkz4brkx8jvn/Paxy-DuckDuino.ino

This one works! Enter command working as well!

geoxen93 avatar Jun 11 '18 08:06 geoxen93

Hi,

The problem is thath you should use \n as return character in your txt files. If you use \r\n you should modify the parse functions to consider this character.

If you use notepad++ in windows, you should go to Settings -> Preferences -> New document and change the format of Line ending to LF (UNIX). Or you can switch to Linux... :P

pmerinolaso avatar Sep 10 '18 13:09 pmerinolaso

For everyone who does not work. Add the following line to the code #define KEY_RETURN 0xB0 In the key definition block at the very beginning.

Dofamin avatar Oct 29 '18 12:10 Dofamin

Hi, I added #define KEY_RETURN 0xB0 at the very beginning where KEY_MENU etc are defined. The issue is still there. I even tried to change Keyboard.press(KEY_RETURN) by its hexadecimal value.

Could I please get a little help?

**Using \n as return character does not work either.

I tried flashing with the script from Seytonic and it works but I want to be able to change script with serial port.

ghost avatar Nov 28 '18 18:11 ghost

You can try to change the location in the queue for the line #define KEY_RETURN 0xB0 I tried to change too Keyboard.press(KEY_RETURN) This led to incorrect firmware operation. Try after changing places in the definition, use a USB different port.

Dofamin avatar Nov 28 '18 19:11 Dofamin

The issue is fixed.

After trying to change every position of #define KEY_RETURN 0xB0 I was beginning to lose hope. I opened up Notepad++ and enabled "Show all characters" to notice that I had CRLF... I changed it to LF and now it works.

Thank you for your help! @Dofamin

ghost avatar Nov 29 '18 00:11 ghost

Happy to help! @antoinelafond

Dofamin avatar Nov 29 '18 13:11 Dofamin

I originally thought it was an ENTER issue, where Windows likes ASCII 10 and 13.

Well, I'm getting closer. It's not just the ENTER key. It's SPACE and arrow keys as well. If I change the ENTER command to print spaces instead, spaces don't get printed either. It looks like a logic issue where it's not even trying to send certain keys. I'm still looking, but I don't know C.

RChadwick7 avatar Dec 05 '18 07:12 RChadwick7

Nevermind, my brain fart cleared , and realized the problem was in the ducky script file having a CR and LF and not being parsed properly. I updated the code on my github to fix the problem. I didn't fully test it, but seems fine so far. It should work fine on scripts written on Windows, Android, IOS, and Linux.

RChadwick7 avatar Dec 05 '18 15:12 RChadwick7

Hi buddy , here is an easy way to solve , delete this command typeKey(KEY_RETURN); and replace it with Keyboard.press(KEY_ENTER);

mahdidlp avatar Jul 26 '21 19:07 mahdidlp

Hi,

this issue has already been posted by donovanmagryta, but hasen't been closed with a suitable solution for me. for testing iam using demo2.txt, my system is a windows 7 64-bit german language.

The HID is opening the command interface with " GUI r", also "notepad.exe" is written, but the "Enter" command is not working, so "Hello World!" is written right behind "notepad.exe".

what I have tried so far is using diffrent delay times before & after the "notepad.exe" also a couple of rows with the "ENTER" command, nothing working at all.

Iam kindly asking for your support.

Hi, did you finally get some solution? I have entered in this world and I have the same problem, the command ENTER doesn't work.

GorrionJS avatar Nov 03 '21 22:11 GorrionJS

Had the exact same issue, ENTER no working with this one. Tried all tricks in this post plus several versions of keyboard.h libraries, even the new one wich let you choose the layour with Keyboard.begin(KeyboardLayout_es-ES) Tried several values of enter, digispark one uses 0x40 as KEY_RETURN and with that chip i have no problem, but this one is useless because of the enter issue.... After so much try and error, I managed to make it work, the last try was deleting all keyboard libraries, installing the 1.0.2 Keyboard Arduino library and this repo, also script write only with LF, abd the most important thing is add delays after and before the ENTER in the payload scripts

ic32k avatar Feb 19 '22 16:02 ic32k