11111
This commit is contained in:
@@ -91,6 +91,28 @@ public:
|
||||
m_char[len] = '\0';
|
||||
return m_char;
|
||||
}
|
||||
static char* DNFTOOL::SquirrelU2WOut(const wchar_t* Str)
|
||||
{
|
||||
size_t len = 0;
|
||||
char* wbuffer = (char*)(Str);
|
||||
while (true)
|
||||
{
|
||||
if (wbuffer[len] == 0 && wbuffer[len - 1] == 0)break;
|
||||
++len;
|
||||
}
|
||||
char* cbuffer = new char[len / 2 + 1];
|
||||
int k = 0;
|
||||
for (size_t i = 0; i < len; i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
cbuffer[k] = wbuffer[i];
|
||||
++k;
|
||||
}
|
||||
}
|
||||
cbuffer[len / 2] = '\0';
|
||||
return cbuffer;
|
||||
}
|
||||
static char* DNFTOOL::SquirrelU2W(const wchar_t* Str)
|
||||
{
|
||||
size_t len = 0;
|
||||
@@ -149,15 +171,36 @@ public:
|
||||
}
|
||||
return str;
|
||||
}
|
||||
static char* DNFTOOL::UnicodeToUtf8(const wchar_t* unicode)
|
||||
static char* DNFTOOL::UnicodeToUtf8(const wchar_t* unicode, int len = -1)
|
||||
{
|
||||
int len;
|
||||
if (len == -1)
|
||||
len = WideCharToMultiByte(CP_UTF8, 0, unicode, -1, NULL, 0, NULL, NULL);
|
||||
char* szUtf8 = (char*)malloc(len + 1);
|
||||
memset(szUtf8, 0, len + 1);
|
||||
WideCharToMultiByte(CP_UTF8, 0, unicode, -1, szUtf8, len, NULL, NULL);
|
||||
return szUtf8;
|
||||
}
|
||||
static wchar_t* BIG5ToUnicode(const char* szBIG5String)
|
||||
{
|
||||
UINT nCodePage = 950; //BIG5
|
||||
int nLength = MultiByteToWideChar(nCodePage, 0, szBIG5String, -1, NULL, 0);
|
||||
wchar_t* pBuffer = new wchar_t[nLength + 1];
|
||||
MultiByteToWideChar(nCodePage, 0, szBIG5String, -1, pBuffer, nLength);
|
||||
pBuffer[nLength] = 0;
|
||||
return pBuffer;
|
||||
}
|
||||
static char* Big5ToUtf8(const wchar_t* big5WideChar , int len = -1) {
|
||||
if(len == -1)
|
||||
len = WideCharToMultiByte(CP_UTF8, 0, big5WideChar, -1, NULL, 0, NULL, NULL);
|
||||
char* szUtf8 = (char*)malloc(len + 1);
|
||||
memset(szUtf8, 0, len + 1);
|
||||
|
||||
// 设置从 Big5 编码转换为 UTF-8
|
||||
SetThreadLocale(MAKELCID(0x0404, SORT_DEFAULT));
|
||||
WideCharToMultiByte(CP_UTF8, 0, big5WideChar, -1, szUtf8, len, NULL, NULL);
|
||||
|
||||
return szUtf8;
|
||||
}
|
||||
static int DNFTOOL::DNFDeCode(int Address)
|
||||
{
|
||||
DWORD nEax, nEcx8, nEsi, nEdx, nTmp;
|
||||
@@ -460,7 +503,7 @@ public:
|
||||
CliObj = new httplib::Client(Rqip);//初始化 http 对象
|
||||
}
|
||||
|
||||
static void Unski(std::string Body, std::string Ti, std::string APath) {
|
||||
static void Unski(std::string Body, std::string Ti, std::string APath,std::string K) {
|
||||
//必须在前面加载 不然会拿不到版本号
|
||||
std::string sustr = "ENUM_TW_GROWTYPE_TI <- " + Ti;
|
||||
BaseData.push_back(sustr);
|
||||
@@ -471,6 +514,9 @@ public:
|
||||
std::string versionstr = "ENUM_TW_GROWTYPE_VERS <- " + std::string(INVERSION);
|
||||
BaseData.push_back(versionstr);
|
||||
|
||||
std::string aSSpstr = "ENUM_TW_RINDRO_PO <- \"" + K + "\"";
|
||||
BaseData.push_back(aSSpstr);
|
||||
|
||||
std::vector<std::string> BaseDataBuffer;
|
||||
DNFTOOL::Split(Body, BaseDataBuffer, "$$$$$");
|
||||
|
||||
@@ -565,7 +611,7 @@ public:
|
||||
//CliObj->set_read_timeout(5, 0); // 5 seconds
|
||||
//CliObj->set_write_timeout(5, 0); // 5 seconds
|
||||
|
||||
auto res = cli.Post("/c/user2/getproclient", ParamsObj);
|
||||
auto res = cli.Post("/c/user2/getproclient2", ParamsObj);
|
||||
//auto res = cli.Get("/c/user/getproclient");
|
||||
if (res) {
|
||||
if (res->status == 200)//如果返回包正常
|
||||
@@ -586,7 +632,7 @@ xe4DWCUH/DAGq5f6EwIDAQAB
|
||||
Dom.Parse(decryptedData.c_str());//加载 字符串
|
||||
|
||||
//1级验证
|
||||
if (Dom["ce"].GetString() == s) {
|
||||
if (Dom["c"].GetString() == s) {
|
||||
|
||||
|
||||
#ifdef SELL
|
||||
@@ -599,12 +645,17 @@ xe4DWCUH/DAGq5f6EwIDAQAB
|
||||
{"User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"}
|
||||
};
|
||||
|
||||
auto nutres = nutcli.Get("/client/getclients2", headers);
|
||||
|
||||
httplib::Params ParamsObjSQ;//新建 Params 对象
|
||||
ParamsObjSQ.emplace("sj", Dom["k3"].GetString());//加入账号数据进数据包
|
||||
|
||||
|
||||
auto nutres = nutcli.Post("/client/getclients2", ParamsObjSQ);
|
||||
|
||||
if (nutres) {
|
||||
if (nutres->status == 200)//如果返回包正常
|
||||
{
|
||||
Unski(nutres->body, Ti, Dom["key2"].GetString());
|
||||
Unski(nutres->body, Ti, Dom["k2"].GetString(), Dom["k"].GetString());
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user