Fix the problem with the keylogging feature

This commit is contained in:
yuanyuanxiang
2025-06-26 02:07:00 +08:00
parent 371f359541
commit 246fb01bf5
16 changed files with 699 additions and 203 deletions

View File

@@ -567,6 +567,8 @@ public:
}
} CONNECT_ADDRESS ;
#define FOREVER_RUN 2
// <20>ͻ<EFBFBD><CDBB>˳<EFBFBD><CBB3><EFBFBD><EFBFBD>߳<EFBFBD><DFB3><EFBFBD>Ϣ<EFBFBD><EFBFBD><E1B9B9>, <20><><EFBFBD><EFBFBD>5<EFBFBD><35><EFBFBD><EFBFBD>Ա:
// <20><><EFBFBD><EFBFBD>״̬(run)<29><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(h)<29><>ͨѶ<CDA8>ͻ<EFBFBD><CDBB><EFBFBD>(p)<29><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߲<EFBFBD><DFB2><EFBFBD>(user)<29><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ(conn).
struct ThreadInfo
@@ -577,6 +579,18 @@ struct ThreadInfo
void* user;
CONNECT_ADDRESS* conn;
ThreadInfo() : run(1), h(NULL), p(NULL), user(NULL), conn(NULL) { }
void Exit(int wait_sec = 15) {
run = FALSE;
for (int count = 0; p && count++ < wait_sec; Sleep(1000));
#ifdef _WIN32
if (p) TerminateThread(h, 0x20250626);
if (p) CloseHandle(h);
#endif
p = NULL;
h = NULL;
user = NULL;
conn = NULL;
}
};
struct PluginParam {