111
This commit is contained in:
@@ -41,29 +41,34 @@ void LenheartThread(void)
|
||||
#else
|
||||
void LenheartThread()
|
||||
{
|
||||
static int 可开始执行判断;
|
||||
std::string Rqip = DNFTOOL::GetIP();
|
||||
|
||||
|
||||
std::string MyIp;
|
||||
httplib::Client* IPCliObj = NULL;// http连接主体
|
||||
IPCliObj = new httplib::Client("ip.json-json.com");//初始化 http 对象
|
||||
auto res = IPCliObj->Get("/");
|
||||
if (res->status == 200)//如果返回包正常
|
||||
{
|
||||
MyIp = res->body;//取得date
|
||||
}
|
||||
|
||||
while (true)
|
||||
{
|
||||
Sleep(10);
|
||||
|
||||
static int 可开始执行判断;
|
||||
if (DNFTOOL::GetHook(0x1A5FB4C, "0x14+0x28+") == 6)可开始执行判断 = 1;
|
||||
if (可开始执行判断 == 1)
|
||||
{
|
||||
std::string ippack;
|
||||
int gameip = *(int*)0x1AE9CEC;
|
||||
Sleep(3000);
|
||||
//获取验证服务器ip
|
||||
std::string Rqip = DNFTOOL::GetIP();
|
||||
//std::cout << "验证服务器IP:" << Rqip << std::endl;
|
||||
|
||||
//获取本机IP
|
||||
std::string MyIp;
|
||||
httplib::Client* IPCliObj = NULL;// http连接主体
|
||||
IPCliObj = new httplib::Client("ip.json-json.com");//初始化 http 对象
|
||||
auto MyIpres = IPCliObj->Get("/");
|
||||
if (MyIpres->status == 200)//如果返回包正常
|
||||
{
|
||||
MyIp = MyIpres->body;//取得date
|
||||
}
|
||||
//std::cout << "本机IP:" << MyIp << std::endl;
|
||||
//已经得到了本机IP
|
||||
|
||||
//获取验证IP
|
||||
std::string ippack;
|
||||
//获取ExeIP
|
||||
int gameip = *(int*)0x1AE9CEC;
|
||||
//如果ExeIP 等于 192.168.200.131
|
||||
if (gameip == 3735601)
|
||||
{
|
||||
ippack = MyIp;
|
||||
@@ -73,6 +78,8 @@ void LenheartThread()
|
||||
wchar_t* wgameip = (wchar_t*)0x1AE9CEC;
|
||||
DNFTOOL::Wchar_tToString(ippack, wgameip);
|
||||
}
|
||||
//std::cout << "验证IP:" << ippack << std::endl;
|
||||
//已经获取了要发送的验证IP
|
||||
|
||||
|
||||
LenheartBase::CBASE64 bb;
|
||||
@@ -81,7 +88,6 @@ void LenheartThread()
|
||||
std::string enstring = bb.encode(rsastring);
|
||||
|
||||
|
||||
|
||||
httplib::Client* CliObj = NULL;// http连接主体
|
||||
CliObj = new httplib::Client(Rqip + ":9007");//初始化 http 对象
|
||||
|
||||
@@ -91,7 +97,6 @@ void LenheartThread()
|
||||
|
||||
if (res->status == 200)//如果返回包正常
|
||||
{
|
||||
//res->status;
|
||||
std::string date = res->body;//取得date
|
||||
std::string base64code = bb.decode(date);
|
||||
std::string decrypt_text = bb.RsaPriDecrypt(base64code, Pri_key);
|
||||
@@ -103,25 +108,19 @@ void LenheartThread()
|
||||
__int64 absnum = abs(nowdate - redate);
|
||||
if (absnum < 18000)
|
||||
{
|
||||
//RegisterNut();
|
||||
//RunNut();
|
||||
hook::InitGameScript();
|
||||
while (true)
|
||||
{
|
||||
Sleep(16000);
|
||||
}
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
ExitProcess(0);
|
||||
break;
|
||||
//ExitProcess(0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ExitProcess(0);
|
||||
break;
|
||||
//ExitProcess(0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user