#include <iostream>
#include <string>
#include <vector>
#include <ctime>
#include <windows.h>
#include <conio.h>
using namespace std;
void setColor(int color) {
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), color);
}
void hideCursor() {
CONSOLE_CURSOR_INFO cursor;
cursor.bVisible = FALSE;
cursor.dwSize = 1;
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursor);
}
int main() {
srand((unsigned int)time(NULL));
setColor(10); // 10 = 绿色文字
hideCursor();
vector<string> commands = {
"ping 192.168.1.1",
"nmap -sS -p 1-100 10.0.0.5",
"grep -r 'password' /var/log/*",
"cat /etc/passwd",
"netstat -ano",
"ssh root@192.168.0.102",
"wget http://secret.server/backdoor",
"ls -la /root",
"ps aux | grep -i admin",
"tcpdump -i eth0 -w capture.pcap"
};
vector<string> hacks = {
"[] Scanning for open ports...",
"[+] Found vulnerable service on port 22",
"[] Brute forcing password...",
"[+] Credentials found: admin / letmein",
"[] Uploading exploit...",
"[+] Exploit uploaded successfully",
"[] Executing remote code...",
"[+] System compromised!"
};
int count = 0;
while (true) {
if (rand() % 3 == 0) {
cout << hacks[rand() % hacks.size()] << endl;
} else {
cout << commands[rand() % commands.size()] << endl;
}
}
setColor(7);
return 0;
}