Impl accept new friend application
This commit is contained in:
@@ -166,6 +166,7 @@
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Rpc\rpc_h.h" />
|
||||
<ClInclude Include="..\SDK\util.h" />
|
||||
<ClInclude Include="accept_new_friend.h" />
|
||||
<ClInclude Include="exec_sql.h" />
|
||||
<ClInclude Include="framework.h" />
|
||||
<ClInclude Include="get_contacts.h" />
|
||||
@@ -180,6 +181,7 @@
|
||||
<ClCompile Include="..\Rpc\rpc_memory.cpp" />
|
||||
<ClCompile Include="..\Rpc\rpc_s.c" />
|
||||
<ClCompile Include="..\SDK\util.cpp" />
|
||||
<ClCompile Include="accept_new_friend.cpp" />
|
||||
<ClCompile Include="dllmain.cpp" />
|
||||
<ClCompile Include="exec_sql.cpp" />
|
||||
<ClCompile Include="get_contacts.cpp" />
|
||||
|
||||
@@ -51,6 +51,9 @@
|
||||
<ClInclude Include="spy.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="accept_new_friend.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="dllmain.cpp">
|
||||
@@ -86,6 +89,9 @@
|
||||
<ClCompile Include="spy.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="accept_new_friend.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Midl Include="..\Rpc\rpc.idl">
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
#include "accept_new_friend.h"
|
||||
#include "load_calls.h"
|
||||
|
||||
typedef struct NewFriendParam {
|
||||
DWORD handle;
|
||||
DWORD *status;
|
||||
DWORD statusEnd1;
|
||||
DWORD statusEnd2;
|
||||
char buffer[0x3C];
|
||||
} NewFriendParam_t;
|
||||
|
||||
extern WxCalls_t g_WxCalls;
|
||||
extern DWORD g_WeChatWinDllAddr;
|
||||
|
||||
BOOL AcceptNewFriend(std::wstring v3, std::wstring v4)
|
||||
{
|
||||
BOOL isSucceeded = false;
|
||||
|
||||
DWORD acceptNewFriendCall1 = g_WeChatWinDllAddr + g_WxCalls.anf.call1;
|
||||
DWORD acceptNewFriendCall2 = g_WeChatWinDllAddr + g_WxCalls.anf.call2;
|
||||
DWORD acceptNewFriendHandle = g_WeChatWinDllAddr + g_WxCalls.anf.handle;
|
||||
|
||||
char buffer[0x94] = { 0 };
|
||||
NewFriendParam_t param = { 0 };
|
||||
DWORD status[9] = { 0xB2, (DWORD)¶m, 0xB5, (DWORD)¶m, 0xB0, (DWORD)¶m, 0xB1, (DWORD)¶m, 0x00 };
|
||||
|
||||
param.handle = acceptNewFriendHandle;
|
||||
param.status = status;
|
||||
param.statusEnd1 = (DWORD)&status[8];
|
||||
param.statusEnd2 = (DWORD)&status[8];
|
||||
NewFriendParam_t *pParam = ¶m;
|
||||
|
||||
__asm {
|
||||
pushad;
|
||||
pushfd;
|
||||
push 0x0;
|
||||
push 0x6;
|
||||
sub esp, 0x14;
|
||||
mov ecx, esp;
|
||||
lea eax, v4;
|
||||
push eax;
|
||||
call acceptNewFriendCall1;
|
||||
sub esp, 0x8;
|
||||
push 0x0;
|
||||
lea eax, buffer;
|
||||
push eax;
|
||||
lea eax, v3;
|
||||
push eax;
|
||||
mov ecx, pParam;
|
||||
call acceptNewFriendCall2;
|
||||
mov isSucceeded, eax;
|
||||
popfd;
|
||||
popad;
|
||||
}
|
||||
|
||||
return isSucceeded;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "framework.h"
|
||||
#include "string"
|
||||
|
||||
BOOL AcceptNewFriend(std::wstring v3, std::wstring v4);
|
||||
+16
-13
@@ -4,19 +4,22 @@
|
||||
#include "load_calls.h"
|
||||
|
||||
#define SUPPORT_VERSION L"3.7.0.30"
|
||||
WxCalls_t wxCalls = { 0x2366538, // Login Status
|
||||
{ 0x236607C, 0x23660F4, 0x2366128 }, // User Info: wxid, nickname, mobile
|
||||
0x521D30, // Send Message
|
||||
/* Receive Message:
|
||||
Hook, call, type, self, id, msgXml, roomId, wxId, content */
|
||||
{ 0x550F4C, 0xA96350, 0x38, 0x3C, 0x184, 0x1EC, 0x48, 0x170, 0x70 },
|
||||
{ 0xBD780, 0x771980, 0x521640 }, // Send Image Message
|
||||
/* Get Contacts:
|
||||
Base, head, wxId, Code, Name, Gender, Country, Province, City*/
|
||||
{ 0x23668F4, 0x4C, 0x30, 0x44, 0x8C, 0x184, 0x1D0, 0x1E4, 0x1F8 },
|
||||
/* Exec Sql:
|
||||
Exec, base, start, end, slot, name*/
|
||||
{ 0x141BDF0, 0x2366934, 0x1428, 0x142C, 0x3C, 0x50 } };
|
||||
WxCalls_t wxCalls = {
|
||||
0x2366538, // Login Status
|
||||
{ 0x236607C, 0x23660F4, 0x2366128 }, // User Info: wxid, nickname, mobile
|
||||
0x521D30, // Send Message
|
||||
/* Receive Message:
|
||||
Hook, call, type, self, id, msgXml, roomId, wxId, content */
|
||||
{ 0x550F4C, 0xA96350, 0x38, 0x3C, 0x184, 0x1EC, 0x48, 0x170, 0x70 },
|
||||
{ 0xBD780, 0x771980, 0x521640 }, // Send Image Message
|
||||
/* Get Contacts:
|
||||
Base, head, wxId, Code, Name, Gender, Country, Province, City*/
|
||||
{ 0x23668F4, 0x4C, 0x30, 0x44, 0x8C, 0x184, 0x1D0, 0x1E4, 0x1F8 },
|
||||
/* Exec Sql:
|
||||
Exec, base, start, end, slot, name*/
|
||||
{ 0x141BDF0, 0x2366934, 0x1428, 0x142C, 0x3C, 0x50 },
|
||||
{ 0x771980, 0x2AE8D0, 0x1EE40E0 } // Accept New Friend application
|
||||
};
|
||||
|
||||
int LoadCalls(const wchar_t *version, WxCalls_t *calls)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "accept_new_friend.h"
|
||||
#include "exec_sql.h"
|
||||
#include "get_contacts.h"
|
||||
#include "receive_msg.h"
|
||||
@@ -277,3 +278,5 @@ int server_ExecDbQuery(const wchar_t *db, const wchar_t *sql, int *pRow, int *pC
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL server_AcceptNewFriend(const wchar_t *v3, const wchar_t *v4) { return AcceptNewFriend(v3, v4); }
|
||||
|
||||
@@ -50,6 +50,12 @@ typedef struct Sql {
|
||||
DWORD name;
|
||||
} Sql_t;
|
||||
|
||||
typedef struct NewFriend {
|
||||
DWORD call1;
|
||||
DWORD call2;
|
||||
DWORD handle;
|
||||
} NewFriend_t;
|
||||
|
||||
typedef struct WxCalls {
|
||||
DWORD login; // 登录状态
|
||||
UserInfoCall_t ui; // 用户信息
|
||||
@@ -58,6 +64,8 @@ typedef struct WxCalls {
|
||||
SendImg_t sendImg; // 发送图片
|
||||
Contact_t contact; // 获取联系人
|
||||
Sql_t sql; // 执行 SQL
|
||||
NewFriend_t anf; // 通过好友申请
|
||||
|
||||
} WxCalls_t;
|
||||
|
||||
typedef struct TextStruct {
|
||||
|
||||
Reference in New Issue
Block a user