fix(contact): fix accept_new_friend
This commit is contained in:
parent
a28b6b217a
commit
8ca1e4e996
@ -18,7 +18,7 @@ namespace OsCon = Offsets::Contact;
|
|||||||
using get_contact_mgr_t = QWORD (*)();
|
using get_contact_mgr_t = QWORD (*)();
|
||||||
using get_contact_list_t = QWORD (*)(QWORD, QWORD);
|
using get_contact_list_t = QWORD (*)(QWORD, QWORD);
|
||||||
using func_verify_new_t = QWORD (*)(QWORD, WxString *);
|
using func_verify_new_t = QWORD (*)(QWORD, WxString *);
|
||||||
using func_verify_ok_t = QWORD (*)(QWORD, WxString *, QWORD *, QWORD, QWORD, QWORD *, WxString *, QWORD *, WxString *);
|
using func_verify_ok_t = QWORD (*)(QWORD, WxString *, QWORD *, QWORD, QWORD, QWORD, QWORD, QWORD, WxString *);
|
||||||
|
|
||||||
#define FEAT_LEN 5
|
#define FEAT_LEN 5
|
||||||
static const uint8_t FEAT_COUNTRY[FEAT_LEN] = { 0xA4, 0xD9, 0x02, 0x4A, 0x18 };
|
static const uint8_t FEAT_COUNTRY[FEAT_LEN] = { 0xA4, 0xD9, 0x02, 0x4A, 0x18 };
|
||||||
@ -92,26 +92,24 @@ vector<RpcContact_t> get_contacts()
|
|||||||
|
|
||||||
int accept_new_friend(const std::string &v3, const std::string &v4, int scene)
|
int accept_new_friend(const std::string &v3, const std::string &v4, int scene)
|
||||||
{
|
{
|
||||||
// TODO: 处理来源、备注、标签等
|
// TODO: 备注、标签等
|
||||||
auto func_new = Spy::getFunction<func_verify_new_t>(OsCon::VERIFY_NEW);
|
auto func_new = Spy::getFunction<func_verify_new_t>(OsCon::VERIFY_NEW);
|
||||||
auto func_verify = Spy::getFunction<func_verify_ok_t>(OsCon::VERIFY_OK);
|
auto func_verify = Spy::getFunction<func_verify_ok_t>(OsCon::VERIFY_OK);
|
||||||
|
|
||||||
QWORD helper = util::get_qword(Spy::WeChatDll.load() + OsCon::ADD_FRIEND_HELPER);
|
QWORD helper = util::get_qword(Spy::WeChatDll.load() + OsCon::ADD_FRIEND_HELPER);
|
||||||
QWORD fvdf = util::get_qword(Spy::WeChatDll.load() + OsCon::FVDF);
|
QWORD fvdf = util::get_qword(Spy::WeChatDll.load() + OsCon::FVDF);
|
||||||
QWORD mgr = util::get_qword(Spy::WeChatDll.load() + OsCon::VERIFY_MGR);
|
|
||||||
QWORD a8 = util::get_qword(Spy::WeChatDll.load() + OsCon::VERIFY_A8);
|
|
||||||
|
|
||||||
auto pV3 = util::CreateWxString(v3);
|
auto pV3 = util::CreateWxString(v3);
|
||||||
auto pV4 = util::CreateWxString(v4);
|
auto pV4 = util::CreateWxString(v4);
|
||||||
|
|
||||||
QWORD v4Array[4] = { 0 };
|
QWORD v4Array[4] = { 0 };
|
||||||
QWORD p_v4Buff = func_new(reinterpret_cast<QWORD>(&v4Array), pV4);
|
QWORD pV4Buff = func_new(reinterpret_cast<QWORD>(&v4Array), pV4);
|
||||||
|
|
||||||
char buff[0x100] = { 0 };
|
char buff[0x100] = { 0 };
|
||||||
memcpy(buff, &helper, sizeof(&helper));
|
memcpy(buff, &helper, sizeof(&helper));
|
||||||
QWORD a1 = reinterpret_cast<QWORD>(&buff);
|
QWORD a1 = reinterpret_cast<QWORD>(&buff);
|
||||||
|
|
||||||
QWORD ret = func_verify(a1, pV3, &fvdf, 0x3A08A4, p_v4Buff, &mgr, pV4, &a8, pV4);
|
QWORD ret = func_verify(a1, pV3, &fvdf, 0x1D08B4, pV4Buff, 0x1, pV4Buff, scene, 0x0);
|
||||||
util::FreeWxString(pV3);
|
util::FreeWxString(pV3);
|
||||||
util::FreeWxString(pV4);
|
util::FreeWxString(pV4);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user