diff --git a/WeChatFerry/spy/Spy.vcxproj b/WeChatFerry/spy/Spy.vcxproj index 94feb77..b587e00 100644 --- a/WeChatFerry/spy/Spy.vcxproj +++ b/WeChatFerry/spy/Spy.vcxproj @@ -239,7 +239,6 @@ xcopy /y $(OutDir)$(TargetFileName) $(SolutionDir)..\clients\python\wcferry - @@ -263,7 +262,6 @@ xcopy /y $(OutDir)$(TargetFileName) $(SolutionDir)..\clients\python\wcferry - diff --git a/WeChatFerry/spy/Spy.vcxproj.filters b/WeChatFerry/spy/Spy.vcxproj.filters index 8bd6b31..9cb084c 100644 --- a/WeChatFerry/spy/Spy.vcxproj.filters +++ b/WeChatFerry/spy/Spy.vcxproj.filters @@ -78,9 +78,6 @@ 头文件 - - 头文件 - 头文件 @@ -143,9 +140,6 @@ 源文件 - - 源文件 - 源文件 diff --git a/WeChatFerry/spy/funcs.cpp b/WeChatFerry/spy/funcs.cpp index 589cbbe..3c6a683 100644 --- a/WeChatFerry/spy/funcs.cpp +++ b/WeChatFerry/spy/funcs.cpp @@ -449,4 +449,50 @@ string GetLoginUrl() } 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 diff --git a/WeChatFerry/spy/funcs.h b/WeChatFerry/spy/funcs.h index 2b33509..a41a77b 100644 --- a/WeChatFerry/spy/funcs.h +++ b/WeChatFerry/spy/funcs.h @@ -11,3 +11,4 @@ int DownloadAttach(uint64_t id, std::string thumb, std::string extra); int RevokeMsg(uint64_t id); OcrResult_t GetOcrResult(std::string path); string GetLoginUrl(); +int ReceiveTransfer(std::string wxid, std::string transferid, std::string transactionid); diff --git a/WeChatFerry/spy/receive_transfer.cpp b/WeChatFerry/spy/receive_transfer.cpp deleted file mode 100644 index 019d220..0000000 --- a/WeChatFerry/spy/receive_transfer.cpp +++ /dev/null @@ -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 diff --git a/WeChatFerry/spy/receive_transfer.h b/WeChatFerry/spy/receive_transfer.h deleted file mode 100644 index 1942fb1..0000000 --- a/WeChatFerry/spy/receive_transfer.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#include - -int ReceiveTransfer(std::string wxid, std::string transferid, std::string transactionid); diff --git a/WeChatFerry/spy/rpc_server.cpp b/WeChatFerry/spy/rpc_server.cpp index 56a4055..ca1819d 100644 --- a/WeChatFerry/spy/rpc_server.cpp +++ b/WeChatFerry/spy/rpc_server.cpp @@ -26,7 +26,6 @@ #include "pb_types.h" #include "pb_util.h" #include "receive_msg.h" -#include "receive_transfer.h" #include "rpc_server.h" #include "send_msg.h" #include "spy.h"