这是自己使用VS2022 C++开发的批量追加"C:\Windows\System32\drivers\etc\hosts"文件屏蔽恶意网址脚本的脚本。它可以把cfg.txt文件中例如:
www.minpop.com
api.netcatkit.com
sshapi.sqlnetcat.com
批量追加到hosts文件,结果如下:
127.0.0.1 www.minpop.com
127.0.0.1 api.netcatkit.com
127.0.0.1 sshapi.sqlnetcat.com
详细源代码如下:
AddToHostHosts.cpp
//#include
//#include
//#include
#include