This commit is contained in:
2022-11-06 23:12:18 +08:00
parent 91d57c13f0
commit 9a08d162ad
11 changed files with 667 additions and 252 deletions

View File

@@ -429,7 +429,29 @@ std::string BAKIP()
}
std::string DNFTOOL::GetIP()
{
std::ifstream inFile;
inFile.open("DFC180.dll"); // 默认当方式打开文件
if (!inFile.is_open()) {
ExitProcess(0);
}
std::string Ip;
while (1) {
// 从文件中读取第一个数据,并将其打印出来
inFile >> Ip;
if (inFile.eof()) {
break;
}
}
char* uncode = (char*)Ip.c_str();
int skey[] = Skey;//定义解密数组
Cutecode(uncode, skey);//解密
Ip = uncode;
//std::cout << "获取Ip" << std::endl;
/*
httplib::SSLClient Tencword("raw.codehub.cn");
std::string body;
auto res = Tencword.Get("/p/huoqushuju/d/GetIp/git/raw/master/ip.txt?token=9iylYXiVKiGH3OK2szhpCK1hbvKI7e98Q1JuKpSu4r",
@@ -443,6 +465,8 @@ std::string DNFTOOL::GetIP()
}
else
return BAKIP();
*/
return Ip;
}
#endif