提取码:1145
程序运行后会迅速在C盘创建一个叫做V.txt文件,写入一段话,等你准备翻译的时候程序打开5次cmd又迅速全部关闭,再来一遍刚刚的操作,玩笑程序,可能被杀毒软件拦截。
注意,此软件要以管理员身份运行,在我打包好的程序中已经有管理员权限,但是你们自己复制代码运行后exe文件要提权哦。
#include<windows.h>
#include<conio.h>
#include<fstream>
#include<iostream>
#include<filesystem>
#include<tlhelp32.h>
#include<tchar.h>
using namespace std;
int CreateFiles() {
string filePath = "C:\\V.txt";
filesystem::path pathObj(filePath);
if (!filesystem::exists(pathObj.parent_path())) {
if (!filesystem::create_directories(pathObj.parent_path())) {
cerr << "Failed to create directory." << endl;
return -1;
}
}
if (filesystem::exists(filePath)) {
if (!filesystem::remove(filePath)) {
cerr << "Failed to remove existing file." << endl;
return -1;
}
}
ofstream outfile(filePath);
if (outfile.is_open()) {
outfile << "Congratulations, your computer has a virus. I hope it is well." << endl;
outfile.close();
cout << "File created successfully." << endl;
} else {
cerr << "Failed to create file." << endl;
return -1;
}
return 0;
}
int main(){
CreateFiles();
system("start C:\\V.txt");
Sleep(1000);
for(int i=0;i<=5;i++)system("start cmd");
Sleep(100);
system("TASKKILL /F /IM cmd.exe /T");
Sleep(2000);
for(int i=0;i<=5;i++)system("start cmd");
Sleep(100);
system("TASKKILL /F /IM cmd.exe /T");
system("pause");
return 0;
}