Refactoring
This commit is contained in:
parent
45cb2816eb
commit
d59f7f7397
@ -239,7 +239,6 @@ xcopy /y $(OutDir)$(TargetFileName) $(SolutionDir)..\clients\python\wcferry</Com
|
|||||||
<ClInclude Include="contact_mgmt.h" />
|
<ClInclude Include="contact_mgmt.h" />
|
||||||
<ClInclude Include="load_calls.h" />
|
<ClInclude Include="load_calls.h" />
|
||||||
<ClInclude Include="receive_msg.h" />
|
<ClInclude Include="receive_msg.h" />
|
||||||
<ClInclude Include="receive_transfer.h" />
|
|
||||||
<ClInclude Include="resource.h" />
|
<ClInclude Include="resource.h" />
|
||||||
<ClInclude Include="rpc_server.h" />
|
<ClInclude Include="rpc_server.h" />
|
||||||
<ClInclude Include="send_msg.h" />
|
<ClInclude Include="send_msg.h" />
|
||||||
@ -263,7 +262,6 @@ xcopy /y $(OutDir)$(TargetFileName) $(SolutionDir)..\clients\python\wcferry</Com
|
|||||||
<ClCompile Include="contact_mgmt.cpp" />
|
<ClCompile Include="contact_mgmt.cpp" />
|
||||||
<ClCompile Include="load_calls.cpp" />
|
<ClCompile Include="load_calls.cpp" />
|
||||||
<ClCompile Include="receive_msg.cpp" />
|
<ClCompile Include="receive_msg.cpp" />
|
||||||
<ClCompile Include="receive_transfer.cpp" />
|
|
||||||
<ClCompile Include="rpc_server.cpp" />
|
<ClCompile Include="rpc_server.cpp" />
|
||||||
<ClCompile Include="send_msg.cpp" />
|
<ClCompile Include="send_msg.cpp" />
|
||||||
<ClCompile Include="spy.cpp" />
|
<ClCompile Include="spy.cpp" />
|
||||||
|
@ -78,9 +78,6 @@
|
|||||||
<ClInclude Include="funcs.h">
|
<ClInclude Include="funcs.h">
|
||||||
<Filter>头文件</Filter>
|
<Filter>头文件</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="receive_transfer.h">
|
|
||||||
<Filter>头文件</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="sqlite3.h">
|
<ClInclude Include="sqlite3.h">
|
||||||
<Filter>头文件</Filter>
|
<Filter>头文件</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@ -143,9 +140,6 @@
|
|||||||
<ClCompile Include="funcs.cpp">
|
<ClCompile Include="funcs.cpp">
|
||||||
<Filter>源文件</Filter>
|
<Filter>源文件</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="receive_transfer.cpp">
|
|
||||||
<Filter>源文件</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\com\log.cpp">
|
<ClCompile Include="..\com\log.cpp">
|
||||||
<Filter>源文件</Filter>
|
<Filter>源文件</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -449,4 +449,50 @@ string GetLoginUrl()
|
|||||||
}
|
}
|
||||||
return "http://weixin.qq.com/x/" + string(url);
|
return "http://weixin.qq.com/x/" + string(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ReceiveTransfer(string wxid, string transferid, string transactionid)
|
||||||
|
{
|
||||||
|
int rv = 0;
|
||||||
|
DWORD recvTransferCall1 = g_WeChatWinDllAddr + g_WxCalls.tf.call1;
|
||||||
|
DWORD recvTransferCall2 = g_WeChatWinDllAddr + g_WxCalls.tf.call2;
|
||||||
|
DWORD recvTransferCall3 = g_WeChatWinDllAddr + g_WxCalls.tf.call3;
|
||||||
|
|
||||||
|
char payInfo[0x134] = { 0 };
|
||||||
|
wstring wsWxid = String2Wstring(wxid);
|
||||||
|
wstring wsTfid = String2Wstring(transferid);
|
||||||
|
wstring wsTaid = String2Wstring(transactionid);
|
||||||
|
|
||||||
|
WxString wxWxid(wsWxid);
|
||||||
|
WxString wxTfid(wsTfid);
|
||||||
|
WxString wxTaid(wsTaid);
|
||||||
|
|
||||||
|
LOG_DEBUG("Receiving transfer, from: {}, transferid: {}, transactionid: {}", wxid, transferid, transactionid);
|
||||||
|
__asm {
|
||||||
|
pushad;
|
||||||
|
lea ecx, payInfo;
|
||||||
|
call recvTransferCall1;
|
||||||
|
mov dword ptr[payInfo + 0x4], 0x1;
|
||||||
|
mov dword ptr[payInfo + 0x4C], 0x1;
|
||||||
|
popad;
|
||||||
|
}
|
||||||
|
memcpy(&payInfo[0x1C], &wxTaid, sizeof(wxTaid));
|
||||||
|
memcpy(&payInfo[0x38], &wxTfid, sizeof(wxTfid));
|
||||||
|
|
||||||
|
__asm {
|
||||||
|
pushad;
|
||||||
|
push 0x1;
|
||||||
|
sub esp, 0x8;
|
||||||
|
lea edx, wxWxid;
|
||||||
|
lea ecx, payInfo;
|
||||||
|
call recvTransferCall2;
|
||||||
|
mov rv, eax;
|
||||||
|
add esp, 0xC;
|
||||||
|
push 0x0;
|
||||||
|
lea ecx, payInfo;
|
||||||
|
call recvTransferCall3;
|
||||||
|
popad;
|
||||||
|
}
|
||||||
|
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -11,3 +11,4 @@ int DownloadAttach(uint64_t id, std::string thumb, std::string extra);
|
|||||||
int RevokeMsg(uint64_t id);
|
int RevokeMsg(uint64_t id);
|
||||||
OcrResult_t GetOcrResult(std::string path);
|
OcrResult_t GetOcrResult(std::string path);
|
||||||
string GetLoginUrl();
|
string GetLoginUrl();
|
||||||
|
int ReceiveTransfer(std::string wxid, std::string transferid, std::string transactionid);
|
||||||
|
@ -1,56 +0,0 @@
|
|||||||
#include "receive_transfer.h"
|
|
||||||
#include "load_calls.h"
|
|
||||||
#include "log.h"
|
|
||||||
#include "util.h"
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
extern WxCalls_t g_WxCalls;
|
|
||||||
extern UINT64 g_WeChatWinDllAddr;
|
|
||||||
#if 0
|
|
||||||
int ReceiveTransfer(string wxid, string transferid, string transactionid)
|
|
||||||
{
|
|
||||||
int rv = 0;
|
|
||||||
DWORD recvTransferCall1 = g_WeChatWinDllAddr + g_WxCalls.tf.call1;
|
|
||||||
DWORD recvTransferCall2 = g_WeChatWinDllAddr + g_WxCalls.tf.call2;
|
|
||||||
DWORD recvTransferCall3 = g_WeChatWinDllAddr + g_WxCalls.tf.call3;
|
|
||||||
|
|
||||||
char payInfo[0x134] = { 0 };
|
|
||||||
wstring wsWxid = String2Wstring(wxid);
|
|
||||||
wstring wsTfid = String2Wstring(transferid);
|
|
||||||
wstring wsTaid = String2Wstring(transactionid);
|
|
||||||
|
|
||||||
WxString wxWxid(wsWxid);
|
|
||||||
WxString wxTfid(wsTfid);
|
|
||||||
WxString wxTaid(wsTaid);
|
|
||||||
|
|
||||||
LOG_DEBUG("Receiving transfer, from: {}, transferid: {}, transactionid: {}", wxid, transferid, transactionid);
|
|
||||||
__asm {
|
|
||||||
pushad;
|
|
||||||
lea ecx, payInfo;
|
|
||||||
call recvTransferCall1;
|
|
||||||
mov dword ptr[payInfo + 0x4], 0x1;
|
|
||||||
mov dword ptr[payInfo + 0x4C], 0x1;
|
|
||||||
popad;
|
|
||||||
}
|
|
||||||
memcpy(&payInfo[0x1C], &wxTaid, sizeof(wxTaid));
|
|
||||||
memcpy(&payInfo[0x38], &wxTfid, sizeof(wxTfid));
|
|
||||||
|
|
||||||
__asm {
|
|
||||||
pushad;
|
|
||||||
push 0x1;
|
|
||||||
sub esp, 0x8;
|
|
||||||
lea edx, wxWxid;
|
|
||||||
lea ecx, payInfo;
|
|
||||||
call recvTransferCall2;
|
|
||||||
mov rv, eax;
|
|
||||||
add esp, 0xC;
|
|
||||||
push 0x0;
|
|
||||||
lea ecx, payInfo;
|
|
||||||
call recvTransferCall3;
|
|
||||||
popad;
|
|
||||||
}
|
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
#endif
|
|
@ -1,5 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
int ReceiveTransfer(std::string wxid, std::string transferid, std::string transactionid);
|
|
@ -26,7 +26,6 @@
|
|||||||
#include "pb_types.h"
|
#include "pb_types.h"
|
||||||
#include "pb_util.h"
|
#include "pb_util.h"
|
||||||
#include "receive_msg.h"
|
#include "receive_msg.h"
|
||||||
#include "receive_transfer.h"
|
|
||||||
#include "rpc_server.h"
|
#include "rpc_server.h"
|
||||||
#include "send_msg.h"
|
#include "send_msg.h"
|
||||||
#include "spy.h"
|
#include "spy.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user