diff --git a/DWeChatRobot/FriendList.cpp b/DWeChatRobot/FriendList.cpp index 7a18bb620d5eda04faf6c0dccc21a0e095c2e05a..a01c294df2587e023ea124153326690ad87170e6 100644 --- a/DWeChatRobot/FriendList.cpp +++ b/DWeChatRobot/FriendList.cpp @@ -43,13 +43,14 @@ void GetFriendListFinish() { } void __stdcall GetFriendList() { - +#ifdef _DEBUG + wcout.imbue(locale("chs")); +#endif DWORD WeChatWinBase = GetWeChatWinBase(); DWORD LeftTreeAddr = 0; DWORD RightTreeAddr = 0; DWORD LeftTreeHead = 0; DWORD baseAddr = WeChatWinBase + LeftTreeOffset; - printf("0x%08X\n", baseAddr); __asm { pushad; mov eax, dword ptr[baseAddr]; @@ -90,6 +91,9 @@ void __stdcall GetFriendList() { } WxFriendStructW p(wxIdAddr, wxNumberAddr, wxNickNameAddr, wxRemarkAddr); WxFriendList.push_back(p); +#ifdef _DEBUG + wcout << (wchar_t*)(*(DWORD*)p.wxIdAddr) << endl; +#endif if (LeftTreeAddr == LeftTreeHead) { break; } diff --git a/DWeChatRobot/SelfInfo.cpp b/DWeChatRobot/SelfInfo.cpp index 1b9fe224c3a30cb0524b69cd2de92409c0bd445e..66138101a2aab7171e750e0bfa068037068667e1 100644 --- a/DWeChatRobot/SelfInfo.cpp +++ b/DWeChatRobot/SelfInfo.cpp @@ -8,32 +8,19 @@ struct SelfInfoStruct { DWORD length; } ret; -// 这里有待解决的BUG DWORD GetSelfInfoRemote() { DWORD WeChatWinBase = GetWeChatWinBase(); - /*vector SelfInfoAddr = { - *(DWORD*)(WeChatWinBase + 0x21DC9C4), - WeChatWinBase + 0x21DCBB8, - *(DWORD*)(WeChatWinBase + 0x21DCA3C), - *(DWORD*)(WeChatWinBase + 0x21DCB74), - *(DWORD*)(WeChatWinBase + 0x21DCD34), - *(DWORD*)(WeChatWinBase + 0x21DCD1C), - WeChatWinBase + 0x21DCC30, - WeChatWinBase + 0x21DCB44, - WeChatWinBase + 0x21DCB5C, - WeChatWinBase + 0x21DCA70 - };*/ vector SelfInfoAddr = { - *(DWORD*)(WeChatWinBase + 0x21DC9C4), - WeChatWinBase + 0x21DCBB8, - WeChatWinBase + 0x21DCA3C, - *(DWORD*)(WeChatWinBase + 0x21DCB74), - *(DWORD*)(WeChatWinBase + 0x21DCD34), - *(DWORD*)(WeChatWinBase + 0x21DCD1C), - WeChatWinBase + 0x21DCC30, - WeChatWinBase + 0x21DCB44, - WeChatWinBase + 0x21DCB5C, - WeChatWinBase + 0x21DCA70 + *(DWORD*)(WeChatWinBase + 0x222EB3C), + WeChatWinBase + 0x222ED30, + WeChatWinBase + 0x222EBB4, + *(DWORD*)(WeChatWinBase + 0x222ECEC), + *(DWORD*)(WeChatWinBase + 0x222EE94), + *(DWORD*)(WeChatWinBase + 0x222EEAC), + WeChatWinBase + 0x222EF30, + WeChatWinBase + 0x222ECBC, + WeChatWinBase + 0x222ECD4, + WeChatWinBase + 0x222EBE8 }; vector SelfInfoKey = { diff --git a/Release/DWeChatRobot.dll b/Release/DWeChatRobot.dll index f5d27f698978ac60687876fec4d7175ce5253435..ed404b4b5ba51194bf0815f16d81354d152e9860 100644 Binary files a/Release/DWeChatRobot.dll and b/Release/DWeChatRobot.dll differ