DevKitty-io / USB-Nugget

Run DuckyScript payloads on a USB Nugget!
https://usbnugget.com
MIT License
156 stars 18 forks source link

Premature keypresses (Shift & modifiers being pressed too quickly) #47

Closed AlexLynd closed 2 years ago

AlexLynd commented 2 years ago

Sometimes the keystroke injection gets ahead of itself and presses the shift key too early, causing random characters to be capitalized, and others to not be. For example instead of typing testing some colors! in the colors.txt script, it will sometimes type testing some colorS1. I'm not sure if this issue is present for other modifiers like alt or ctrl.

This issue seems to be found across characters that can be typed using the shift modifier like !@#$%^&*() which will sometimes just print as the numeric values.

AlexLynd commented 2 years ago

Fixed in latest push to main branch. The issue was caused by parsing a string live inside of the `keyboard.sendString() function.