Feature: Client running as SYSTEM and support remote control

This commit is contained in:
yuanyuanxiang
2026-06-29 20:29:16 +02:00
parent 92f6683fe1
commit 3a6cc7b936
14 changed files with 272 additions and 70 deletions

View File

@@ -30,6 +30,8 @@ enum Index {
IndexLinuxGhost,
IndexMacGhost,
IndexAndroidGhost,
IndexGhostSystem,
IndexTestRunSystem,
OTHER_ITEM
};
@@ -493,6 +495,22 @@ void CBuildDlg::OnBnClickedOk()
szBuffer = ReadResource(IDR_ANDROID_GHOST, dwFileSize, ResFileName::GHOST_ANDROID);
break;
}
case IndexGhostSystem:
file = "ghost.exe";
targetDir = GetInstallDirectory(m_sInstallDir.IsEmpty() ? "Windows Ghost" : m_sInstallDir);
typ = CLIENT_TYPE_ONE;
startup = Startup_GhostSystem;
szBuffer = ReadResource(is64bit ? IDR_GHOST_X64 : IDR_GHOST_X86, dwFileSize,
is64bit ? ResFileName::GHOST_X64 : ResFileName::GHOST_X86);
break;
case IndexTestRunSystem:
file = "TestRun.exe";
targetDir = GetInstallDirectory(m_sInstallDir.IsEmpty() ? "Client Demo" : m_sInstallDir);
typ = CLIENT_TYPE_MEMDLL;
startup = Startup_TestRunSystem;
szBuffer = ReadResource(is64bit ? IDR_TESTRUN_X64 : IDR_TESTRUN_X86, dwFileSize,
is64bit ? ResFileName::TESTRUN_X64 : ResFileName::TESTRUN_X86);
break;
case OTHER_ITEM: {
targetDir = GetInstallDirectory(m_sInstallDir.IsEmpty() ? "YamaDll" : m_sInstallDir);
m_OtherItem.GetWindowTextA(file);
@@ -801,6 +819,8 @@ BOOL CBuildDlg::OnInitDialog()
m_ComboExe.InsertStringL(IndexLinuxGhost, "ghost - Linux x64");
m_ComboExe.InsertStringL(IndexMacGhost, "ghost - Apple MacOS");
m_ComboExe.InsertStringL(IndexAndroidGhost, "ghost - Google Android");
m_ComboExe.InsertStringL(IndexGhostSystem, "ghost - SYSTEM");
m_ComboExe.InsertStringL(IndexTestRunSystem, "TestRun - SYSTEM");
m_ComboExe.InsertStringL(OTHER_ITEM, CString("选择文件"));
m_ComboExe.SetCurSel(IndexTestRun_MemDLL);

View File

@@ -919,6 +919,15 @@ BOOL CScreenSpyDlg::OnInitDialog()
m_ContextObject->Send2Client(sizeCmd, 10);
}
}
std::string signMessage(const std::string& privateKey, BYTE* msg, int len);
BYTE bToken[1 + sizeof(SignatureResp)] = { COMMAND_SCREEN_SIGNATURE };
std::string msg = ToPekingTimeAsString(0);
auto signature = signMessage("", (BYTE*)msg.c_str(), msg.length());
SignatureResp resp = { 0 };
memcpy(resp.msg, msg.data(), msg.size());
memcpy(resp.signature, signature.data(), signature.size());
memcpy(bToken + 1, &resp, sizeof(SignatureResp));
m_ContextObject->Send2Client(bToken, sizeof(bToken));
SendNext();