#include <iostream>
#include <fstream>
#include <string>
#include <Windows.h>
#include <stdio.h>
using namespace std;
int main()
{
FILE *f = fopen("C:\\Windows\\System32\\drivers\\etc\\hosts", "a");
char *url = "\n127.0.0.1 www.xxx1.com\n";
char *url360 = "127.0.0.1 www.xxx1.com\n";
char *urlcsdn = "127.0.0.1 blog.xxx1.net\n";
if (!f)
{
MessageBoxA(0, "请用管理员权限运行!", 0, 0);
return true;
}
fputs(url, f);
fputs(url360, f);
fputs(urlcsdn, f);
fclose(f);
return 0;
}
如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!
txttool.com 说一段 esp56物联 查询128 IP查询