Fix verify new friend application
This commit is contained in:
parent
444dcaf352
commit
b25a7aedd8
@ -139,8 +139,9 @@ message DbRows { repeated DbRow rows = 1; }
|
||||
|
||||
message Verification
|
||||
{
|
||||
string v3 = 1;
|
||||
string v4 = 2;
|
||||
string v3 = 1; // 加密的用户名
|
||||
string v4 = 2; // Ticket
|
||||
int32 scene = 3; // 添加方式:17 名片,30 扫码
|
||||
}
|
||||
|
||||
message AddMembers
|
||||
|
@ -16,7 +16,7 @@ typedef struct NewFriendParam {
|
||||
extern WxCalls_t g_WxCalls;
|
||||
extern DWORD g_WeChatWinDllAddr;
|
||||
|
||||
int AcceptNewFriend(std::string v3, std::string v4)
|
||||
int AcceptNewFriend(std::string v3, std::string v4, int scene)
|
||||
{
|
||||
int isSucceeded = 0;
|
||||
|
||||
@ -30,8 +30,8 @@ int AcceptNewFriend(std::string v3, std::string v4)
|
||||
|
||||
param.handle = acceptNewFriendHandle;
|
||||
param.status = status;
|
||||
param.statusEnd1 = (DWORD)&status[8];
|
||||
param.statusEnd2 = (DWORD)&status[8];
|
||||
param.statusEnd1 = (DWORD)status + 0x20;
|
||||
param.statusEnd2 = (DWORD)status + 0x20;
|
||||
NewFriendParam_t *pParam = ¶m;
|
||||
|
||||
LOG_DEBUG("v3: {}\nv4: {}", v3, v4);
|
||||
@ -52,7 +52,8 @@ int AcceptNewFriend(std::string v3, std::string v4)
|
||||
pushad;
|
||||
pushfd;
|
||||
push 0x0;
|
||||
push 0x6;
|
||||
mov eax, scene;
|
||||
push eax;
|
||||
sub esp, 0x14;
|
||||
mov ecx, esp;
|
||||
lea eax, wxV4;
|
||||
|
@ -2,4 +2,4 @@
|
||||
|
||||
#include "string"
|
||||
|
||||
int AcceptNewFriend(std::string v3, std::string v4);
|
||||
int AcceptNewFriend(std::string v3, std::string v4, int scene);
|
||||
|
@ -25,13 +25,13 @@
|
||||
#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"
|
||||
#include "spy_types.h"
|
||||
#include "user_info.h"
|
||||
#include "util.h"
|
||||
#include "receive_transfer.h"
|
||||
|
||||
#define URL_SIZE 20
|
||||
#define BASE_URL "tcp://0.0.0.0"
|
||||
@ -438,7 +438,7 @@ bool func_exec_db_query(char *db, char *sql, uint8_t *out, size_t *len)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool func_accept_friend(char *v3, char *v4, uint8_t *out, size_t *len)
|
||||
bool func_accept_friend(char *v3, char *v4, int32_t scene, uint8_t *out, size_t *len)
|
||||
{
|
||||
Response rsp = Response_init_default;
|
||||
rsp.func = Functions_FUNC_SEND_IMG;
|
||||
@ -449,7 +449,7 @@ bool func_accept_friend(char *v3, char *v4, uint8_t *out, size_t *len)
|
||||
rsp.msg.status = -1;
|
||||
LOG_ERROR("Empty V3 or V4.");
|
||||
} else {
|
||||
rsp.msg.status = AcceptNewFriend(v3, v4);
|
||||
rsp.msg.status = AcceptNewFriend(v3, v4, scene);
|
||||
if (rsp.msg.status != 1) {
|
||||
LOG_ERROR("AcceptNewFriend failed: {}", rsp.msg.status);
|
||||
}
|
||||
@ -621,7 +621,7 @@ static bool dispatcher(uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len
|
||||
}
|
||||
case Functions_FUNC_ACCEPT_FRIEND: {
|
||||
LOG_DEBUG("[Functions_FUNC_ACCEPT_FRIEND]");
|
||||
ret = func_accept_friend(req.msg.v.v3, req.msg.v.v4, out, out_len);
|
||||
ret = func_accept_friend(req.msg.v.v3, req.msg.v.v4, req.msg.v.scene, out, out_len);
|
||||
break;
|
||||
}
|
||||
case Functions_FUNC_ADD_ROOM_MEMBERS: {
|
||||
|
Loading…
Reference in New Issue
Block a user