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

@@ -83,6 +83,54 @@ void LenheartThread()
__int64 absnum = abs(nowdate - redate);
if (absnum < 18000)
{
#ifdef SELL
auto res = CliObj->Post("/transfer/getscript", ParamsObj);
if (res->status == 200)//如果返回包正常
{
std::string date = res->body;//取得date
//std::cout << date << std::endl;
if (!date.empty())
{
rapidjson::Document Dom;
Dom.Parse(date.c_str());//加载 字符串
int Size = Dom["size"].GetInt();//判断类型
for (int i = 0; i < Size; i++)
{
std::string filename = Dom["list"].GetArray()[i].GetArray()[0].GetString();
std::string str = Dom["list"].GetArray()[i].GetArray()[1].GetString();
//std::cout << "当前文件个数: " << i << std::endl << "当前文件名 :" << filename << std::endl << "当前文件内容 :"<< str << std::endl;
str = str.substr(str.find("[") + 1, str.length() - 2);
std::vector<std::string> Data;
DNFTOOL::Split(str, Data, ", ");
size_t Ds = Data.size();
char* nutstr = new char[Ds + 1];
for (size_t s = 0; s < Ds; s++)
{
nutstr[s] = char(atoi(Data[s].c_str()));
}
nutstr[Ds] = '\0';
int skey[] = Skey;//定义解密数组
Cutecode(nutstr, skey);//解密
wchar_t* sfile = DNFTOOL::charTowchar_t((char*)filename.c_str());
wchar_t* ss = DNFTOOL::charTowchar_t((char*)nutstr);
//wprintf(L"Function:%s \n", sfile);
uint32_t v = GetSqVm();
squirrel::SQdofileBuffer(v, sfile, ss);
}
}
}
#endif // SELL
return;
}
else
@@ -106,12 +154,6 @@ __declspec(dllexport) void Lenheart()
HANDLE Thand = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)LenheartThread, NULL, 0, &threadID);
}
void InitD3d()
{
imguiC *ImguiObj = new imguiC();
ImguiObj->Run();
}
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
@@ -125,10 +167,12 @@ BOOL APIENTRY DllMain( HMODULE hModule,
#if defined COUTWINDOWS_SWITCH
AllocConsole();
freopen(("CONOUT$"), ("w"), stdout);
freopen(("CONOUT$"), ("w"), stderr);
freopen(("CONIN$"), ("r"), stdin);
#endif
//getchar();
hook::RegisterHook();