From ad848b69f1f48600f4f6a60106a3ce77e8c121ae Mon Sep 17 00:00:00 2001 From: Changhua Date: Sat, 22 Jun 2024 15:15:04 +0800 Subject: [PATCH 01/55] Update get contacts offsets --- WeChatFerry/spy/load_calls.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WeChatFerry/spy/load_calls.cpp b/WeChatFerry/spy/load_calls.cpp index 190c904..5321c7f 100644 --- a/WeChatFerry/spy/load_calls.cpp +++ b/WeChatFerry/spy/load_calls.cpp @@ -17,8 +17,8 @@ WxCalls_t wxCalls = { { 0xB8A70, 0x3ED5E0, 0x107F00, 0x3ED7B0, 0x2386FE4 }, // Send xml Message { 0x771980, 0x4777E0, 0x239E888 }, // Send Emotion Message /* Get Contacts: - call1, call2, wxId, Code, Remark,Name, Gender, Country, Province, City*/ - { 0x75A4A0, 0xC089F0, 0x10, 0x24, 0x58, 0x6C, 0x0E, 0x00, 0x00, 0x00 }, + call1, call2, wxId, Code, Remark,Name,Gender,Country,Province,City*/ + { 0x00, 0x00, 0x10, 0x30, 0x80, 0xA0, 0x0E, 0x00, 0x00, 0x00 }, /* Exec Sql: Exec, base, start, end, slot, name*/ { 0x141BDF0, 0x2366934, 0x1428, 0x142C, 0x3C, 0x50 }, From 4554f2376a5fd6fb369e6783411dccab0c0eb2d5 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 23 Jun 2024 19:38:15 +0800 Subject: [PATCH 02/55] Impl get_contacts --- WeChatFerry/spy/contact_mgmt.cpp | 59 +++++++++++++++----------------- WeChatFerry/spy/rpc_server.cpp | 6 ++-- 2 files changed, 30 insertions(+), 35 deletions(-) diff --git a/WeChatFerry/spy/contact_mgmt.cpp b/WeChatFerry/spy/contact_mgmt.cpp index 2039a40..d6d55f4 100644 --- a/WeChatFerry/spy/contact_mgmt.cpp +++ b/WeChatFerry/spy/contact_mgmt.cpp @@ -7,19 +7,22 @@ using namespace std; extern WxCalls_t g_WxCalls; -extern UINT64 g_WeChatWinDllAddr; -#if 0 +extern QWORD g_WeChatWinDllAddr; + +typedef QWORD (*funcGetContactMgr_t)(); +typedef QWORD (*funcGetContactList_t)(QWORD, QWORD); + #define FEAT_LEN 5 static const uint8_t FEAT_COUNTRY[FEAT_LEN] = { 0xA4, 0xD9, 0x02, 0x4A, 0x18 }; static const uint8_t FEAT_PROVINCE[FEAT_LEN] = { 0xE2, 0xEA, 0xA8, 0xD1, 0x18 }; static const uint8_t FEAT_CITY[FEAT_LEN] = { 0x1D, 0x02, 0x5B, 0xBF, 0x18 }; -static DWORD FindMem(DWORD start, DWORD end, const void *target, size_t len) +static QWORD FindMem(QWORD start, QWORD end, const void *target, size_t len) { uint8_t *p = (uint8_t *)start; - while ((DWORD)p < end) { + while ((QWORD)p < end) { if (memcmp((void *)p, target, len) == 0) { - return (DWORD)p; + return (QWORD)p; } p++; } @@ -27,9 +30,9 @@ static DWORD FindMem(DWORD start, DWORD end, const void *target, size_t len) return 0; } -static string GetCntString(DWORD start, DWORD end, const uint8_t *feat, size_t len) +static string GetCntString(QWORD start, QWORD end, const uint8_t *feat, size_t len) { - DWORD pfeat = FindMem(start, end, feat, len); + QWORD pfeat = FindMem(start, end, feat, len); if (pfeat == 0) { return ""; } @@ -45,34 +48,27 @@ static string GetCntString(DWORD start, DWORD end, const uint8_t *feat, size_t l vector GetContacts() { vector contacts; - DWORD call1 = g_WeChatWinDllAddr + g_WxCalls.contact.base; - DWORD call2 = g_WeChatWinDllAddr + g_WxCalls.contact.head; + funcGetContactMgr_t funcGetContactMgr = (funcGetContactMgr_t)(g_WeChatWinDllAddr + 0x1C0BDE0); + funcGetContactList_t funcGetContactList = (funcGetContactList_t)(g_WeChatWinDllAddr + 0x2265540); - int success = 0; - DWORD *addr[3] = { 0, 0, 0 }; - __asm { - pushad - call call1 - lea ecx,addr - push ecx - mov ecx,eax - call call2 - mov success,eax - popad + QWORD mgr = funcGetContactMgr(); + QWORD addr[3] = { 0 }; + if (funcGetContactList(mgr, (QWORD)addr) != 1) { + LOG_ERROR("GetContacts failed"); + return contacts; } - DWORD pstart = (DWORD)addr[0]; - DWORD pend = (DWORD)addr[2]; - + QWORD pstart = (QWORD)addr[0]; + QWORD pend = (QWORD)addr[2]; while (pstart < pend) { RpcContact_t cnt; - DWORD pbin = GET_DWORD(pstart + 0x150); - DWORD lenbin = GET_DWORD(pstart + 0x154); + QWORD pbin = GET_QWORD(pstart + 0x200); + QWORD lenbin = GET_DWORD(pstart + 0x208); - cnt.wxid = GetStringByAddress(pstart + g_WxCalls.contact.wxId); - cnt.code = GetStringByAddress(pstart + g_WxCalls.contact.wxCode); - cnt.remark = GetStringByAddress(pstart + g_WxCalls.contact.wxRemark); - cnt.name = GetStringByAddress(pstart + g_WxCalls.contact.wxName); + cnt.wxid = GetStringByWstrAddr(pstart + g_WxCalls.contact.wxId); // 0x10 + cnt.code = GetStringByWstrAddr(pstart + g_WxCalls.contact.wxCode); // 0x30 + cnt.remark = GetStringByWstrAddr(pstart + g_WxCalls.contact.wxRemark); // 0x80 + cnt.name = GetStringByWstrAddr(pstart + g_WxCalls.contact.wxName); // 0xA0 cnt.country = GetCntString(pbin, pbin + lenbin, FEAT_COUNTRY, FEAT_LEN); cnt.province = GetCntString(pbin, pbin + lenbin, FEAT_PROVINCE, FEAT_LEN); @@ -81,16 +77,17 @@ vector GetContacts() if (pbin == 0) { cnt.gender = 0; } else { - cnt.gender = (DWORD) * (uint8_t *)(pbin + g_WxCalls.contact.wxGender); + cnt.gender = (DWORD) * (uint8_t *)(pbin + g_WxCalls.contact.wxGender); // 0x0E } contacts.push_back(cnt); - pstart += 0x438; + pstart += 0x6A8; // 0x6A8 } return contacts; } +#if 0 int AcceptNewFriend(string v3, string v4, int scene) { int success = 0; diff --git a/WeChatFerry/spy/rpc_server.cpp b/WeChatFerry/spy/rpc_server.cpp index 4c5e8e0..92a6e00 100644 --- a/WeChatFerry/spy/rpc_server.cpp +++ b/WeChatFerry/spy/rpc_server.cpp @@ -129,7 +129,7 @@ bool func_get_msg_types(uint8_t *out, size_t *len) return true; } -#if 0 + bool func_get_contacts(uint8_t *out, size_t *len) { Response rsp = Response_init_default; @@ -149,7 +149,7 @@ bool func_get_contacts(uint8_t *out, size_t *len) return true; } -#endif + bool func_get_db_names(uint8_t *out, size_t *len) { Response rsp = Response_init_default; @@ -872,12 +872,10 @@ static bool dispatcher(uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len ret = func_get_msg_types(out, out_len); break; } -#if 0 case Functions_FUNC_GET_CONTACTS: { ret = func_get_contacts(out, out_len); break; } -#endif case Functions_FUNC_GET_DB_NAMES: { ret = func_get_db_names(out, out_len); break; From bd0387882df7336b8bb8e0c91ede683947f8833c Mon Sep 17 00:00:00 2001 From: Changhua Date: Mon, 24 Jun 2024 21:37:47 +0800 Subject: [PATCH 03/55] Impl NewWxStringFromStr and NewWxStringFromWstr --- WeChatFerry/com/util.cpp | 21 +++++++++++++++++++++ WeChatFerry/com/util.h | 4 ++++ 2 files changed, 25 insertions(+) diff --git a/WeChatFerry/com/util.cpp b/WeChatFerry/com/util.cpp index e52790c..273a1bd 100644 --- a/WeChatFerry/com/util.cpp +++ b/WeChatFerry/com/util.cpp @@ -8,6 +8,7 @@ #include #include +#include "log.h" #include "util.h" #pragma comment(lib, "shlwapi") @@ -296,3 +297,23 @@ void DbgMsg(const char *zcFormat, ...) OutputDebugStringA(strText.c_str()); } + +WxString *NewWxStringFromStr(const string &str) { return NewWxStringFromWstr(String2Wstring(str)); } + +WxString *NewWxStringFromWstr(const wstring &ws) +{ + WxString *p = (WxString *)HeapAlloc(GetProcessHeap(), 0, sizeof(WxString)); + wchar_t *pWstring = (wchar_t *)HeapAlloc(GetProcessHeap(), 0, (ws.size() + 1) * 2); + if (p == NULL || pWstring == NULL) { + LOG_ERROR("Out of Memory..."); + return NULL; + } + + wmemcpy(pWstring, ws.c_str(), ws.size() + 1); + p->wptr = pWstring; + p->size = (DWORD)ws.size(); + p->capacity = (DWORD)ws.size(); + p->ptr = 0; + p->clen = 0; + return p; +} diff --git a/WeChatFerry/com/util.h b/WeChatFerry/com/util.h index 8339464..00e50bb 100644 --- a/WeChatFerry/com/util.h +++ b/WeChatFerry/com/util.h @@ -2,6 +2,8 @@ #include +#include "spy_types.h" + #define WECHAREXE L"WeChat.exe" #define WECHATWINDLL L"WeChatWin.dll" #define WCFSDKDLL L"sdk.dll" @@ -34,3 +36,5 @@ std::string GetStringByAddress(UINT64 address); std::string GetStringByStrAddr(UINT64 addr); std::string GetStringByWstrAddr(UINT64 addr); void DbgMsg(const char *zcFormat, ...); +WxString *NewWxStringFromStr(const std::string &str); +WxString *NewWxStringFromWstr(const std::wstring &ws); From 770f56de50c82047b0aca047c783f57e6a8448f0 Mon Sep 17 00:00:00 2001 From: Changhua Date: Tue, 25 Jun 2024 18:38:27 +0800 Subject: [PATCH 04/55] Refactoring --- WeChatFerry/spy/send_msg.cpp | 43 +++++++----------------------------- 1 file changed, 8 insertions(+), 35 deletions(-) diff --git a/WeChatFerry/spy/send_msg.cpp b/WeChatFerry/spy/send_msg.cpp index 33ae4fc..4d325f2 100644 --- a/WeChatFerry/spy/send_msg.cpp +++ b/WeChatFerry/spy/send_msg.cpp @@ -115,37 +115,11 @@ void SendFileMessage(string wxid, string path) funcFree(pMsg); } -WxString *NewWxString(const std::wstring &ws) -{ - WxString *p = (WxString *)HeapAlloc(GetProcessHeap(), 0, sizeof(WxString)); - wchar_t *pWstring = (wchar_t *)HeapAlloc(GetProcessHeap(), 0, (ws.size() + 1) * 2); - if (p == NULL || pWstring == NULL) { - LOG_ERROR("Out of Memory..."); - return NULL; - } - - wmemcpy(pWstring, ws.c_str(), ws.size() + 1); - p->wptr = pWstring; - p->size = (DWORD)ws.size(); - p->capacity = (DWORD)ws.size(); - p->ptr = 0; - p->clen = 0; - return p; -} - int SendRichTextMessage(RichText_t &rt) { // TODO: Fix memory leak #define SRTM_SIZE 0x3F0 QWORD status = -1; - wstring receiver = String2Wstring(rt.receiver); - wstring title = String2Wstring(rt.title); - wstring url = String2Wstring(rt.url); - wstring thumburl = String2Wstring(rt.thumburl); - wstring account = String2Wstring(rt.account); - wstring name = String2Wstring(rt.name); - wstring digest = String2Wstring(rt.digest); - funcNew_t funcNew = (funcNew_t)(g_WeChatWinDllAddr + g_WxCalls.rt.call1); funcFree_t funcFree = (funcFree_t)(g_WeChatWinDllAddr + g_WxCalls.rt.call2); funcGetAppMsgMgr_t funcGetAppMsgMgr = (funcGetAppMsgMgr_t)(g_WeChatWinDllAddr + g_WxCalls.rt.call3); @@ -159,13 +133,13 @@ int SendRichTextMessage(RichText_t &rt) memset(buff, 0, SRTM_SIZE); funcNew((QWORD)buff); - WxString *pReceiver = NewWxString(receiver); - WxString *pTitle = NewWxString(title); - WxString *pUrl = NewWxString(url); - WxString *pThumburl = NewWxString(thumburl); - WxString *pDigest = NewWxString(digest); - WxString *pAccount = NewWxString(account); - WxString *pName = NewWxString(name); + WxString *pReceiver = NewWxStringFromStr(rt.receiver); + WxString *pTitle = NewWxStringFromStr(rt.title); + WxString *pUrl = NewWxStringFromStr(rt.url); + WxString *pThumburl = NewWxStringFromStr(rt.thumburl); + WxString *pDigest = NewWxStringFromStr(rt.digest); + WxString *pAccount = NewWxStringFromStr(rt.account); + WxString *pName = NewWxStringFromStr(rt.name); memcpy(buff + 0x8, pTitle, sizeof(WxString)); memcpy(buff + 0x48, pUrl, sizeof(WxString)); @@ -208,8 +182,7 @@ int ForwardMessage(QWORD msgid, string receiver) return status; } - wstring wsReceiver = String2Wstring(receiver); - WxString *pReceiver = NewWxString(wsReceiver); + WxString *pReceiver = NewWxStringFromStr(receiver); LARGE_INTEGER l; l.HighPart = dbIdx; From 1724009d5b507da932701a2aec455ff396919975 Mon Sep 17 00:00:00 2001 From: Changhua Date: Wed, 26 Jun 2024 22:37:06 +0800 Subject: [PATCH 05/55] Update AddChatroomMember offsets --- WeChatFerry/spy/load_calls.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WeChatFerry/spy/load_calls.cpp b/WeChatFerry/spy/load_calls.cpp index 5321c7f..54e7d0f 100644 --- a/WeChatFerry/spy/load_calls.cpp +++ b/WeChatFerry/spy/load_calls.cpp @@ -23,7 +23,7 @@ WxCalls_t wxCalls = { Exec, base, start, end, slot, name*/ { 0x141BDF0, 0x2366934, 0x1428, 0x142C, 0x3C, 0x50 }, { 0xA17D50, 0xF59E40, 0xA18BD0, 0xA17E70 }, // Accept New Friend application - { 0x78CF20, 0xF59E40, 0xBD1DC0 }, // Add chatroom members + { 0x1C4E200, 0x221B8A0, 0x00 }, // Add chatroom members { 0x78CF20, 0xF59E40, 0xBD22A0 }, // Delete chatroom members { 0x7B2E60, 0x15E2C20, 0x79C250 }, // Receive transfer /* Receive PYQ From 02030a4af06bea18fd9d81a602c9f34834c4b560 Mon Sep 17 00:00:00 2001 From: Changhua Date: Wed, 26 Jun 2024 22:37:52 +0800 Subject: [PATCH 06/55] Impl add chatroom member --- WeChatFerry/spy/chatroom_mgmt.cpp | 58 +++++++++++-------------------- WeChatFerry/spy/rpc_server.cpp | 4 +++ 2 files changed, 24 insertions(+), 38 deletions(-) diff --git a/WeChatFerry/spy/chatroom_mgmt.cpp b/WeChatFerry/spy/chatroom_mgmt.cpp index 7a6e4b9..5bcb35e 100644 --- a/WeChatFerry/spy/chatroom_mgmt.cpp +++ b/WeChatFerry/spy/chatroom_mgmt.cpp @@ -10,23 +10,22 @@ using namespace std; extern WxCalls_t g_WxCalls; -extern UINT64 g_WeChatWinDllAddr; -#if 0 +extern QWORD g_WeChatWinDllAddr; + +typedef QWORD (*funcGetChatRoomMgr_t)(); +typedef QWORD (*funcAddMemberToChatRoom_t)(QWORD, QWORD, QWORD, QWORD); + int AddChatroomMember(string roomid, string wxids) { + int status = -1; + if (roomid.empty() || wxids.empty()) { LOG_ERROR("Empty roomid or wxids."); - return -1; + return status; } - int rv = 0; - DWORD armCall1 = g_WeChatWinDllAddr + g_WxCalls.arm.call1; - DWORD armCall2 = g_WeChatWinDllAddr + g_WxCalls.arm.call2; - DWORD armCall3 = g_WeChatWinDllAddr + g_WxCalls.arm.call3; - - DWORD temp = 0; - wstring wsRoomid = String2Wstring(roomid); - WxString wxRoomid(wsRoomid); + funcGetChatRoomMgr_t funcGetChatRoomMgr = (funcGetChatRoomMgr_t)(g_WeChatWinDllAddr + g_WxCalls.arm.call1); + funcAddMemberToChatRoom_t funcAddMemberToChatRoom = (funcAddMemberToChatRoom_t)(g_WeChatWinDllAddr + g_WxCalls.arm.call2); vector vMembers; vector vWxMembers; @@ -35,37 +34,20 @@ int AddChatroomMember(string roomid, string wxids) wstring wstr; getline(wss, wstr, L','); vMembers.push_back(wstr); - WxString txtMember(vMembers.back()); - vWxMembers.push_back(txtMember); + WxString wxMember(vMembers.back()); + vWxMembers.push_back(wxMember); } - LOG_DEBUG("Adding {} members[{}] to {}", vWxMembers.size(), wxids.c_str(), roomid.c_str()); - __asm { - pushad; - pushfd; - call armCall1; - sub esp, 0x8; - mov temp, eax; - mov ecx, esp; - mov dword ptr[ecx], 0x0; - mov dword ptr[ecx + 4], 0x0; - test esi, esi; - sub esp, 0x14; - mov ecx, esp; - lea eax, wxRoomid; - push eax; - call armCall2; - mov ecx, temp; - lea eax, vWxMembers; - push eax; - call armCall3; - mov rv, eax; - popfd; - popad; - } - return rv; + QWORD temp[2] = { 0 }; + WxString *pWxRoomid = NewWxStringFromStr(roomid); + QWORD pMembers = (QWORD) & ((RawVector_t *)&vWxMembers)->start; + + QWORD mgr = funcGetChatRoomMgr(); + status = (int)funcAddMemberToChatRoom(mgr, pMembers, (QWORD)pWxRoomid, (QWORD)temp); + return status; } +#if 0 int DelChatroomMember(string roomid, string wxids) { if (roomid.empty() || wxids.empty()) { diff --git a/WeChatFerry/spy/rpc_server.cpp b/WeChatFerry/spy/rpc_server.cpp index 92a6e00..cd248cd 100644 --- a/WeChatFerry/spy/rpc_server.cpp +++ b/WeChatFerry/spy/rpc_server.cpp @@ -768,6 +768,7 @@ bool func_exec_ocr(char *path, uint8_t *out, size_t *len) *len = stream.bytes_written; return true; } +#endif bool func_add_room_members(char *roomid, char *wxids, uint8_t *out, size_t *len) { @@ -793,6 +794,7 @@ bool func_add_room_members(char *roomid, char *wxids, uint8_t *out, size_t *len) return true; } +#if 0 bool func_del_room_members(char *roomid, char *wxids, uint8_t *out, size_t *len) { Response rsp = Response_init_default; @@ -973,10 +975,12 @@ static bool dispatcher(uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len ret = func_exec_ocr(req.msg.str, out, out_len); break; } +#endif case Functions_FUNC_ADD_ROOM_MEMBERS: { ret = func_add_room_members(req.msg.m.roomid, req.msg.m.wxids, out, out_len); break; } +#if 0 case Functions_FUNC_DEL_ROOM_MEMBERS: { ret = func_del_room_members(req.msg.m.roomid, req.msg.m.wxids, out, out_len); break; From 75858ef0f3b5aba1be62300c9d8c2d8f933659ef Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 27 Jun 2024 20:57:25 +0800 Subject: [PATCH 07/55] Update delete chatroom member offsets --- WeChatFerry/spy/load_calls.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WeChatFerry/spy/load_calls.cpp b/WeChatFerry/spy/load_calls.cpp index 54e7d0f..99367d6 100644 --- a/WeChatFerry/spy/load_calls.cpp +++ b/WeChatFerry/spy/load_calls.cpp @@ -24,7 +24,7 @@ WxCalls_t wxCalls = { { 0x141BDF0, 0x2366934, 0x1428, 0x142C, 0x3C, 0x50 }, { 0xA17D50, 0xF59E40, 0xA18BD0, 0xA17E70 }, // Accept New Friend application { 0x1C4E200, 0x221B8A0, 0x00 }, // Add chatroom members - { 0x78CF20, 0xF59E40, 0xBD22A0 }, // Delete chatroom members + { 0x1C4E200, 0x221BEE0, 0x00 }, // Delete chatroom members { 0x7B2E60, 0x15E2C20, 0x79C250 }, // Receive transfer /* Receive PYQ hook, call, call1, call2, call3, start, end, ts, wxid, content, xml, step*/ From 820abd826bf0d6af1415243a63ccf626eaa8eaa5 Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 27 Jun 2024 21:06:08 +0800 Subject: [PATCH 08/55] Refactoring --- WeChatFerry/spy/chatroom_mgmt.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/WeChatFerry/spy/chatroom_mgmt.cpp b/WeChatFerry/spy/chatroom_mgmt.cpp index 5bcb35e..58df716 100644 --- a/WeChatFerry/spy/chatroom_mgmt.cpp +++ b/WeChatFerry/spy/chatroom_mgmt.cpp @@ -24,8 +24,8 @@ int AddChatroomMember(string roomid, string wxids) return status; } - funcGetChatRoomMgr_t funcGetChatRoomMgr = (funcGetChatRoomMgr_t)(g_WeChatWinDllAddr + g_WxCalls.arm.call1); - funcAddMemberToChatRoom_t funcAddMemberToChatRoom = (funcAddMemberToChatRoom_t)(g_WeChatWinDllAddr + g_WxCalls.arm.call2); + funcGetChatRoomMgr_t GetChatRoomMgr = (funcGetChatRoomMgr_t)(g_WeChatWinDllAddr + g_WxCalls.arm.call1); + funcAddMemberToChatRoom_t AddMembers = (funcAddMemberToChatRoom_t)(g_WeChatWinDllAddr + g_WxCalls.arm.call2); vector vMembers; vector vWxMembers; @@ -42,8 +42,8 @@ int AddChatroomMember(string roomid, string wxids) WxString *pWxRoomid = NewWxStringFromStr(roomid); QWORD pMembers = (QWORD) & ((RawVector_t *)&vWxMembers)->start; - QWORD mgr = funcGetChatRoomMgr(); - status = (int)funcAddMemberToChatRoom(mgr, pMembers, (QWORD)pWxRoomid, (QWORD)temp); + QWORD mgr = GetChatRoomMgr(); + status = (int)AddMembers(mgr, pMembers, (QWORD)pWxRoomid, (QWORD)temp); return status; } From 1dc476fb5b455ba824572830ea400f4ebc73c859 Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 27 Jun 2024 21:08:37 +0800 Subject: [PATCH 09/55] Impl delete chatroom members --- WeChatFerry/spy/chatroom_mgmt.cpp | 46 ++++++++++--------------------- WeChatFerry/spy/rpc_server.cpp | 4 +-- 2 files changed, 16 insertions(+), 34 deletions(-) diff --git a/WeChatFerry/spy/chatroom_mgmt.cpp b/WeChatFerry/spy/chatroom_mgmt.cpp index 58df716..0c01ccd 100644 --- a/WeChatFerry/spy/chatroom_mgmt.cpp +++ b/WeChatFerry/spy/chatroom_mgmt.cpp @@ -47,22 +47,17 @@ int AddChatroomMember(string roomid, string wxids) return status; } -#if 0 int DelChatroomMember(string roomid, string wxids) { + int status = -1; + if (roomid.empty() || wxids.empty()) { LOG_ERROR("Empty roomid or wxids."); - return -1; + return status; } - int rv = 0; - DWORD drmCall1 = g_WeChatWinDllAddr + g_WxCalls.drm.call1; - DWORD drmCall2 = g_WeChatWinDllAddr + g_WxCalls.drm.call2; - DWORD drmCall3 = g_WeChatWinDllAddr + g_WxCalls.drm.call3; - - DWORD temp = 0; - wstring wsRoomid = String2Wstring(roomid); - WxString wxRoomid(wsRoomid); + funcGetChatRoomMgr_t GetChatRoomMgr = (funcGetChatRoomMgr_t)(g_WeChatWinDllAddr + g_WxCalls.drm.call1); + funcDelMemberFromChatRoom_t DelMembers = (funcDelMemberFromChatRoom_t)(g_WeChatWinDllAddr + g_WxCalls.drm.call2); vector vMembers; vector vWxMembers; @@ -71,32 +66,19 @@ int DelChatroomMember(string roomid, string wxids) wstring wstr; getline(wss, wstr, L','); vMembers.push_back(wstr); - WxString txtMember(vMembers.back()); - vWxMembers.push_back(txtMember); + WxString wxMember(vMembers.back()); + vWxMembers.push_back(wxMember); } - LOG_DEBUG("Deleting {} members[{}] from {}", vWxMembers.size(), wxids.c_str(), roomid.c_str()); - __asm { - pushad; - pushfd; - call drmCall1; - sub esp, 0x14; - mov esi, eax; - mov ecx, esp; - lea edi, wxRoomid; - push edi; - call drmCall2; - mov ecx, esi; - lea eax, vWxMembers; - push eax; - call drmCall3; - mov rv, eax; - popfd; - popad; - } - return rv; + WxString *pWxRoomid = NewWxStringFromStr(roomid); + QWORD pMembers = (QWORD) & ((RawVector_t *)&vWxMembers)->start; + + QWORD mgr = GetChatRoomMgr(); + status = (int)DelMembers(mgr, pMembers, (QWORD)pWxRoomid); + return status; } +#if 0 int InviteChatroomMember(string roomid, string wxids) { wstring wsRoomid = String2Wstring((roomid)); diff --git a/WeChatFerry/spy/rpc_server.cpp b/WeChatFerry/spy/rpc_server.cpp index cd248cd..6756362 100644 --- a/WeChatFerry/spy/rpc_server.cpp +++ b/WeChatFerry/spy/rpc_server.cpp @@ -794,7 +794,6 @@ bool func_add_room_members(char *roomid, char *wxids, uint8_t *out, size_t *len) return true; } -#if 0 bool func_del_room_members(char *roomid, char *wxids, uint8_t *out, size_t *len) { Response rsp = Response_init_default; @@ -819,6 +818,7 @@ bool func_del_room_members(char *roomid, char *wxids, uint8_t *out, size_t *len) return true; } +#if 0 bool func_invite_room_members(char *roomid, char *wxids, uint8_t *out, size_t *len) { Response rsp = Response_init_default; @@ -980,11 +980,11 @@ static bool dispatcher(uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len ret = func_add_room_members(req.msg.m.roomid, req.msg.m.wxids, out, out_len); break; } -#if 0 case Functions_FUNC_DEL_ROOM_MEMBERS: { ret = func_del_room_members(req.msg.m.roomid, req.msg.m.wxids, out, out_len); break; } +#if 0 case Functions_FUNC_INV_ROOM_MEMBERS: { ret = func_invite_room_members(req.msg.m.roomid, req.msg.m.wxids, out, out_len); break; From 64a3a916f0e46aa58b75061a3041c4d4b0c55e9d Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 27 Jun 2024 21:12:37 +0800 Subject: [PATCH 10/55] Update invite chatroom member offsets --- WeChatFerry/spy/load_calls.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/WeChatFerry/spy/load_calls.cpp b/WeChatFerry/spy/load_calls.cpp index 99367d6..0913b80 100644 --- a/WeChatFerry/spy/load_calls.cpp +++ b/WeChatFerry/spy/load_calls.cpp @@ -35,8 +35,7 @@ WxCalls_t wxCalls = { {0x76F010, 0x792700, 0xBC0370, 0xBB5F70, 0x756E30}, {0x1C27D50, 0x1C27120, 0x1C23630, 0x21A09C0}, // Send Rich Text Message {0x2D669B0}, // Send Pat Message - /* call1, call2, call3, call4, call5, call6, call7, call8*/ - {0x78CB40, 0x7F99D0, 0x78CF20, 0x78CEF0, 0xF59E40, 0xBD1A00, 0x7FA980, 0x755060}, + {0x221B280, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // Invite chatroom members /* call1, call2, call3 */ {0x80A800, 0x80F270, 0x13DA3E0}, {0x238D350}, // Forward message From d56163709cd8068a33eef2bbff3ab3896409682b Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 27 Jun 2024 21:13:32 +0800 Subject: [PATCH 11/55] Impl invite chatroom members --- WeChatFerry/spy/chatroom_mgmt.cpp | 65 +++++++------------------------ WeChatFerry/spy/rpc_server.cpp | 4 -- 2 files changed, 15 insertions(+), 54 deletions(-) diff --git a/WeChatFerry/spy/chatroom_mgmt.cpp b/WeChatFerry/spy/chatroom_mgmt.cpp index 0c01ccd..5c21ca2 100644 --- a/WeChatFerry/spy/chatroom_mgmt.cpp +++ b/WeChatFerry/spy/chatroom_mgmt.cpp @@ -78,11 +78,17 @@ int DelChatroomMember(string roomid, string wxids) return status; } -#if 0 int InviteChatroomMember(string roomid, string wxids) { - wstring wsRoomid = String2Wstring((roomid)); - WxString wxRoomid(wsRoomid); + int status = -1; + + if (roomid.empty() || wxids.empty()) { + LOG_ERROR("Empty roomid or wxids."); + return status; + } + + funcInviteMemberToChatRoom_t InviteMembers + = (funcInviteMemberToChatRoom_t)(g_WeChatWinDllAddr + g_WxCalls.irm.call1); vector vMembers; vector vWxMembers; @@ -94,52 +100,11 @@ int InviteChatroomMember(string roomid, string wxids) WxString wxMember(vMembers.back()); vWxMembers.push_back(wxMember); } + QWORD temp[2] = { 0 }; + wstring wsRoomid = String2Wstring(roomid); + WxString *pWxRoomid = NewWxStringFromWstr(wsRoomid); + QWORD pMembers = (QWORD) & ((RawVector_t *)&vWxMembers)->start; - LOG_DEBUG("Inviting {} members[{}] to {}", vWxMembers.size(), wxids.c_str(), roomid.c_str()); - - DWORD irmCall1 = g_WeChatWinDllAddr + g_WxCalls.irm.call1; - DWORD irmCall2 = g_WeChatWinDllAddr + g_WxCalls.irm.call2; - DWORD irmCall3 = g_WeChatWinDllAddr + g_WxCalls.irm.call3; - DWORD irmCall4 = g_WeChatWinDllAddr + g_WxCalls.irm.call4; - DWORD irmCall5 = g_WeChatWinDllAddr + g_WxCalls.irm.call5; - DWORD irmCall6 = g_WeChatWinDllAddr + g_WxCalls.irm.call6; - DWORD irmCall7 = g_WeChatWinDllAddr + g_WxCalls.irm.call7; - DWORD irmCall8 = g_WeChatWinDllAddr + g_WxCalls.irm.call8; - - DWORD sys_addr = (DWORD)GetModuleHandleA("win32u.dll") + 0x116C; - DWORD addr[2] = { sys_addr, 0 }; - __asm { - pushad; - pushfd; - call irmCall1; - lea ecx, addr; - push ecx; - mov ecx, eax; - call irmCall2; - call irmCall3; - sub esp, 0x8; - lea eax, addr; - mov ecx, esp; - push eax; - call irmCall4; - sub esp, 0x14; - mov ecx, esp; - lea eax, wxRoomid; - push eax; - call irmCall5; - lea eax, vWxMembers; - push eax; - call irmCall6; - call irmCall1; - push 0x0; - push 0x1; - mov ecx, eax; - call irmCall7; - lea ecx, addr; - call irmCall8; - popfd; - popad; - } - return 1; + status = (int)InviteMembers((QWORD)wsRoomid.c_str(), pMembers, (QWORD)pWxRoomid, (QWORD)temp); + return status; } -#endif diff --git a/WeChatFerry/spy/rpc_server.cpp b/WeChatFerry/spy/rpc_server.cpp index 6756362..c660db6 100644 --- a/WeChatFerry/spy/rpc_server.cpp +++ b/WeChatFerry/spy/rpc_server.cpp @@ -818,7 +818,6 @@ bool func_del_room_members(char *roomid, char *wxids, uint8_t *out, size_t *len) return true; } -#if 0 bool func_invite_room_members(char *roomid, char *wxids, uint8_t *out, size_t *len) { Response rsp = Response_init_default; @@ -842,7 +841,6 @@ bool func_invite_room_members(char *roomid, char *wxids, uint8_t *out, size_t *l return true; } -#endif static bool dispatcher(uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len) { @@ -984,12 +982,10 @@ static bool dispatcher(uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len ret = func_del_room_members(req.msg.m.roomid, req.msg.m.wxids, out, out_len); break; } -#if 0 case Functions_FUNC_INV_ROOM_MEMBERS: { ret = func_invite_room_members(req.msg.m.roomid, req.msg.m.wxids, out, out_len); break; } -#endif default: { LOG_ERROR("[UNKNOW FUNCTION]"); break; From a66d269ce4e7c8fa06b40e8e39d90f4bc96e0a33 Mon Sep 17 00:00:00 2001 From: Changhua Date: Fri, 28 Jun 2024 00:03:34 +0800 Subject: [PATCH 12/55] Fix building errors --- WeChatFerry/spy/chatroom_mgmt.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/WeChatFerry/spy/chatroom_mgmt.cpp b/WeChatFerry/spy/chatroom_mgmt.cpp index 5c21ca2..18a8bda 100644 --- a/WeChatFerry/spy/chatroom_mgmt.cpp +++ b/WeChatFerry/spy/chatroom_mgmt.cpp @@ -14,6 +14,8 @@ extern QWORD g_WeChatWinDllAddr; typedef QWORD (*funcGetChatRoomMgr_t)(); typedef QWORD (*funcAddMemberToChatRoom_t)(QWORD, QWORD, QWORD, QWORD); +typedef QWORD (*funcDelMemberFromChatRoom_t)(QWORD, QWORD, QWORD); +typedef QWORD (*funcInviteMemberToChatRoom_t)(QWORD, QWORD, QWORD, QWORD); int AddChatroomMember(string roomid, string wxids) { From 746c52b125643d202d904a64abd7d1fe3d669f5e Mon Sep 17 00:00:00 2001 From: Changhua Date: Fri, 28 Jun 2024 00:19:40 +0800 Subject: [PATCH 13/55] Update Project Configuration --- WeChatFerry/sdk/SDK.vcxproj | 83 ---------------------- WeChatFerry/spy/Spy.vcxproj | 137 ------------------------------------ 2 files changed, 220 deletions(-) diff --git a/WeChatFerry/sdk/SDK.vcxproj b/WeChatFerry/sdk/SDK.vcxproj index 5c17179..1d038db 100644 --- a/WeChatFerry/sdk/SDK.vcxproj +++ b/WeChatFerry/sdk/SDK.vcxproj @@ -1,14 +1,6 @@ - - Debug - Win32 - - - Release - Win32 - Debug x64 @@ -26,19 +18,6 @@ 10.0 - - DynamicLibrary - true - v142 - Unicode - - - DynamicLibrary - false - v142 - true - Unicode - DynamicLibrary true @@ -57,12 +36,6 @@ - - - - - - @@ -70,72 +43,16 @@ - - true - - - false - true false - - true - x86-windows-static - true x64-windows-static - - - Level3 - true - WIN32;_DEBUG;SDK_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - Use - pch.h - - - Windows - true - false - sdk.def - - - - - Level3 - true - true - true - WIN32;NDEBUG;SDK_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - NotUsing - - - stdcpp17 - $(SolutionDir)spy;C:\Tools\vcpkg\installed\x86-windows-static\include - MultiThreaded - - - Windows - true - true - true - false - sdk.def - - - xcopy /y $(OutDir)$(TargetFileName) $(SolutionDir)Out - - - Copy files - - Level3 diff --git a/WeChatFerry/spy/Spy.vcxproj b/WeChatFerry/spy/Spy.vcxproj index 5277f1d..0377e89 100644 --- a/WeChatFerry/spy/Spy.vcxproj +++ b/WeChatFerry/spy/Spy.vcxproj @@ -1,14 +1,6 @@ - - Debug - Win32 - - - Release - Win32 - Debug x64 @@ -24,23 +16,9 @@ {4de80b82-5f6a-4c4c-9d16-1574308110fa} spy 10.0 - x86-windows-static x64-windows-static - - DynamicLibrary - true - v142 - Unicode - - - DynamicLibrary - false - v142 - true - Unicode - DynamicLibrary true @@ -59,12 +37,6 @@ - - - - - - @@ -72,15 +44,6 @@ - - true - $(ProjectName)_debug - true - - - false - true - true $(ProjectName)_debug @@ -88,13 +51,6 @@ false - - true - - - true - Release - true Release @@ -102,99 +58,6 @@ true - - - Level3 - true - true - true - WIN32;NDEBUG;SPY_EXPORTS;_WINDOWS;_USRDLL;ENABLE_DEBUG_LOG;%(PreprocessorDefinitions) - true - NotUsing - - - $(SolutionDir)rpc;$(SolutionDir)rpc\nanopb;$(SolutionDir)rpc\proto;$(SolutionDir)smc;$(SolutionDir)spy;C:\Tools\vcpkg\installed\x86-windows-static\include - - 4251;4731;4819 - MultiThreaded - stdcpp17 - /EHa %(AdditionalOptions) - - - Windows - true - true - true - false - iphlpapi.lib;wsock32.lib;ws2_32.lib;crypt32.lib;Codec.lib;%(AdditionalDependencies) - spy.def - $(SolutionDir)smc;%(AdditionalLibraryDirectories) - /ignore:4099 %(AdditionalOptions) - - - if not exist $(SolutionDir)Out md $(SolutionDir)Out -xcopy /y $(OutDir)$(TargetFileName) $(SolutionDir)Out -xcopy /y $(OutDir)$(TargetName).exp $(SolutionDir)Out -xcopy /y $(OutDir)$(TargetName).lib $(SolutionDir)Out -xcopy /y $(OutDir)$(TargetName).pdb $(SolutionDir)Out -xcopy /y $(OutDir)$(TargetFileName) $(SolutionDir)..\clients\python\wcferry - - - Copy spy.dll - - - cd $(SolutionDir)rpc\proto -$(SolutionDir)rpc\tool\protoc --nanopb_out=. wcf.proto - - - Generating PB files - - - - - Level3 - true - true - true - WIN32;NDEBUG;SPY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - NotUsing - - - $(SolutionDir)rpc;$(SolutionDir)rpc\nanopb;$(SolutionDir)rpc\proto;$(SolutionDir)smc;$(SolutionDir)spy;C:\Tools\vcpkg\installed\x86-windows-static\include - - 4251;4731;4819 - MultiThreaded - stdcpp17 - /EHa %(AdditionalOptions) - - - Windows - true - true - true - false - iphlpapi.lib;wsock32.lib;ws2_32.lib;crypt32.lib;Codec.lib;%(AdditionalDependencies) - spy.def - $(SolutionDir)smc;%(AdditionalLibraryDirectories) - /ignore:4099 %(AdditionalOptions) - - - if not exist $(SolutionDir)Out md $(SolutionDir)Out -xcopy /y $(OutDir)$(TargetFileName) $(SolutionDir)Out -xcopy /y $(OutDir)$(TargetFileName) $(SolutionDir)..\clients\python\wcferry - - - Copy spy.dll - - - cd $(SolutionDir)rpc\proto -$(SolutionDir)rpc\tool\protoc --nanopb_out=. wcf.proto - - - Generating PB files - - Level3 From b594db83ba75d25ba612b88a438d73ecdd95e626 Mon Sep 17 00:00:00 2001 From: Changhua Date: Fri, 28 Jun 2024 00:49:28 +0800 Subject: [PATCH 14/55] Update Project Configuration --- WeChatFerry/WeChatFerry.sln | 4 +++ WeChatFerry/sdk/SDK.vcxproj | 32 +++++++++++++++++ WeChatFerry/spy/Spy.vcxproj | 70 +++++++++++++++++++++++++++++++++++++ 3 files changed, 106 insertions(+) diff --git a/WeChatFerry/WeChatFerry.sln b/WeChatFerry/WeChatFerry.sln index 2122ba1..02ba879 100644 --- a/WeChatFerry/WeChatFerry.sln +++ b/WeChatFerry/WeChatFerry.sln @@ -13,14 +13,18 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 + Dev|x64 = Dev|x64 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {4DE80B82-5F6A-4C4C-9D16-1574308110FA}.Debug|x64.ActiveCfg = Debug|x64 {4DE80B82-5F6A-4C4C-9D16-1574308110FA}.Debug|x64.Build.0 = Debug|x64 + {4DE80B82-5F6A-4C4C-9D16-1574308110FA}.Dev|x64.ActiveCfg = Dev|x64 + {4DE80B82-5F6A-4C4C-9D16-1574308110FA}.Dev|x64.Build.0 = Dev|x64 {4DE80B82-5F6A-4C4C-9D16-1574308110FA}.Release|x64.ActiveCfg = Release|x64 {4DE80B82-5F6A-4C4C-9D16-1574308110FA}.Release|x64.Build.0 = Release|x64 {ABFCB647-137F-478B-A73E-F0B1E3ADC215}.Debug|x64.ActiveCfg = Debug|x64 + {ABFCB647-137F-478B-A73E-F0B1E3ADC215}.Dev|x64.ActiveCfg = Dev|x64 {ABFCB647-137F-478B-A73E-F0B1E3ADC215}.Release|x64.ActiveCfg = Release|x64 {ABFCB647-137F-478B-A73E-F0B1E3ADC215}.Release|x64.Build.0 = Release|x64 EndGlobalSection diff --git a/WeChatFerry/sdk/SDK.vcxproj b/WeChatFerry/sdk/SDK.vcxproj index 1d038db..af47a4b 100644 --- a/WeChatFerry/sdk/SDK.vcxproj +++ b/WeChatFerry/sdk/SDK.vcxproj @@ -5,6 +5,10 @@ Debug x64 + + Dev + x64 + Release x64 @@ -24,6 +28,12 @@ v142 Unicode + + DynamicLibrary + true + v142 + Unicode + DynamicLibrary false @@ -39,6 +49,9 @@ + + + @@ -46,6 +59,9 @@ true + + true + false @@ -69,6 +85,22 @@ sdk.def + + + Level3 + true + _DEBUG;SDK_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + false + sdk.def + + Level3 diff --git a/WeChatFerry/spy/Spy.vcxproj b/WeChatFerry/spy/Spy.vcxproj index 0377e89..ccf0ea3 100644 --- a/WeChatFerry/spy/Spy.vcxproj +++ b/WeChatFerry/spy/Spy.vcxproj @@ -5,6 +5,10 @@ Debug x64 + + Dev + x64 + Release x64 @@ -25,6 +29,12 @@ v142 Unicode + + DynamicLibrary + true + v142 + Unicode + DynamicLibrary false @@ -40,6 +50,9 @@ + + + @@ -48,6 +61,10 @@ true $(ProjectName)_debug + + true + $(ProjectName)_dev + false @@ -55,6 +72,10 @@ true Release + + true + Release + true @@ -100,6 +121,55 @@ xcopy /y $(OutDir)$(TargetFileName) $(SolutionDir)Out xcopy /y $(OutDir)$(TargetName).exp $(SolutionDir)Out xcopy /y $(OutDir)$(TargetName).lib $(SolutionDir)Out xcopy /y $(OutDir)$(TargetName).pdb $(SolutionDir)Out +xcopy /y $(OutDir)$(TargetFileName) $(SolutionDir)..\clients\python\wcferry + + + Copy spy.dll + + + + + Level3 + true + WIN32;NDEBUG;SPY_EXPORTS;_WINDOWS;_USRDLL;ENABLE_DEBUG_LOG;ENABLE_WX_LOG;%(PreprocessorDefinitions) + true + NotUsing + + + stdcpp17 + $(SolutionDir)com;$(SolutionDir)rpc;$(SolutionDir)rpc\nanopb;$(SolutionDir)rpc\proto;$(SolutionDir)smc;$(SolutionDir)spy;C:\Tools\vcpkg\installed\x64-windows-static\include + true + false + MultiThreaded + true + + + 4251;4731;4819 + /EHa %(AdditionalOptions) + + + Windows + true + false + spy.def + /ignore:4099 %(AdditionalOptions) + $(SolutionDir)smc;%(AdditionalLibraryDirectories) + iphlpapi.lib;wsock32.lib;ws2_32.lib;crypt32.lib;Codec.lib;%(AdditionalDependencies) + true + + + cd $(SolutionDir)rpc\proto +$(SolutionDir)rpc\tool\protoc --nanopb_out=. wcf.proto + + + Generating PB files + + + if not exist $(SolutionDir)Out md $(SolutionDir)Out +xcopy /y $(OutDir)$(TargetFileName) $(SolutionDir)Out +xcopy /y $(OutDir)$(TargetName).exp $(SolutionDir)Out +xcopy /y $(OutDir)$(TargetName).lib $(SolutionDir)Out +xcopy /y $(OutDir)$(TargetName).pdb $(SolutionDir)Out xcopy /y $(OutDir)$(TargetFileName) $(SolutionDir)..\clients\python\wcferry From a1a94d946c2d85b1e320f77338a023dfc0bab342 Mon Sep 17 00:00:00 2001 From: Changhua Date: Fri, 28 Jun 2024 20:12:42 +0800 Subject: [PATCH 15/55] Update target name --- WeChatFerry/spy/Spy.vcxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WeChatFerry/spy/Spy.vcxproj b/WeChatFerry/spy/Spy.vcxproj index ccf0ea3..94feb77 100644 --- a/WeChatFerry/spy/Spy.vcxproj +++ b/WeChatFerry/spy/Spy.vcxproj @@ -63,7 +63,7 @@ true - $(ProjectName)_dev + $(ProjectName)_debug false From ec2ad71ccfa402af8371544a815839ed1d49eb07 Mon Sep 17 00:00:00 2001 From: Changhua Date: Fri, 28 Jun 2024 20:15:29 +0800 Subject: [PATCH 16/55] Impl WX logging --- WeChatFerry/spy/receive_msg.cpp | 76 +++++++++++++++++++++++++++++++-- WeChatFerry/spy/receive_msg.h | 2 + WeChatFerry/spy/rpc_server.cpp | 8 +++- 3 files changed, 81 insertions(+), 5 deletions(-) diff --git a/WeChatFerry/spy/receive_msg.cpp b/WeChatFerry/spy/receive_msg.cpp index 8a518e9..7093151 100644 --- a/WeChatFerry/spy/receive_msg.cpp +++ b/WeChatFerry/spy/receive_msg.cpp @@ -13,18 +13,22 @@ #include "util.h" // Defined in rpc_server.cpp -extern bool gIsListening, gIsListeningPyq; +extern bool gIsLogging, gIsListening, gIsListeningPyq; extern mutex gMutex; extern condition_variable gCV; extern queue gMsgQueue; // Defined in spy.cpp extern WxCalls_t g_WxCalls; -extern UINT64 g_WeChatWinDllAddr; +extern QWORD g_WeChatWinDllAddr; + +typedef QWORD (*funcRecvMsg_t)(QWORD, QWORD); +typedef QWORD (*funcWxLog_t)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD); -typedef UINT64 (*funcRecvMsg_t)(UINT64, UINT64); static funcRecvMsg_t funcRecvMsg = nullptr; static funcRecvMsg_t realRecvMsg = nullptr; +static funcWxLog_t funcWxLog = nullptr; +static funcWxLog_t realWxLog = nullptr; MsgTypes_t GetMsgTypes() { @@ -67,7 +71,7 @@ MsgTypes_t GetMsgTypes() return m; } -static UINT64 DispatchMsg(UINT64 arg1, UINT64 arg2) +static QWORD DispatchMsg(QWORD arg1, QWORD arg2) { WxMsg_t wxMsg = { 0 }; try { @@ -123,6 +127,70 @@ static UINT64 DispatchMsg(UINT64 arg1, UINT64 arg2) return realRecvMsg(arg1, arg2); } +static QWORD PrintWxLog(QWORD a1, QWORD a2, QWORD a3, QWORD a4, QWORD a5, QWORD a6, QWORD a7, QWORD a8, QWORD a9, + QWORD a10, QWORD a11, QWORD a12) +{ + QWORD p = realWxLog(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); + if (p == 0 || p == 1) { + return p; + } + + LOG_INFO("【WX】\n{}", GB2312ToUtf8((char *)p)); + + return p; +} + +void EnableLog() +{ + MH_STATUS status = MH_UNKNOWN; + if (g_WeChatWinDllAddr == 0) { + LOG_WARN("g_WeChatWinDllAddr == 0"); + return; + } + funcWxLog_t funcWxLog = (funcWxLog_t)(g_WeChatWinDllAddr + 0x26DA2D0); + + status = MH_Initialize(); + if (status != MH_OK) { + LOG_ERROR("MH_Initialize failed: {}", to_string(status)); + return; + } + + status = MH_CreateHook(funcWxLog, &PrintWxLog, reinterpret_cast(&realWxLog)); + if (status != MH_OK) { + LOG_ERROR("MH_CreateHook failed: {}", to_string(status)); + return; + } + + status = MH_EnableHook(funcWxLog); + if (status != MH_OK) { + LOG_ERROR("MH_EnableHook failed: {}", to_string(status)); + return; + } + gIsLogging = true; +} + +void DisableLog() +{ + MH_STATUS status = MH_UNKNOWN; + if (!gIsLogging) { + return; + } + + status = MH_DisableHook(funcWxLog); + if (status != MH_OK) { + LOG_ERROR("MH_DisableHook failed: {}", to_string(status)); + return; + } + + status = MH_Uninitialize(); + if (status != MH_OK) { + LOG_ERROR("MH_Uninitialize failed: {}", to_string(status)); + return; + } + + gIsLogging = false; +} + void ListenMessage() { MH_STATUS status = MH_UNKNOWN; diff --git a/WeChatFerry/spy/receive_msg.h b/WeChatFerry/spy/receive_msg.h index ff17170..73d8759 100644 --- a/WeChatFerry/spy/receive_msg.h +++ b/WeChatFerry/spy/receive_msg.h @@ -2,6 +2,8 @@ #include "pb_types.h" +void EnableLog(); +void DisableLog(); void ListenPyq(); void UnListenPyq(); void ListenMessage(); diff --git a/WeChatFerry/spy/rpc_server.cpp b/WeChatFerry/spy/rpc_server.cpp index c660db6..a2aa840 100644 --- a/WeChatFerry/spy/rpc_server.cpp +++ b/WeChatFerry/spy/rpc_server.cpp @@ -40,6 +40,7 @@ namespace fs = std::filesystem; +bool gIsLogging = false; bool gIsListening = false; bool gIsListeningPyq = false; mutex gMutex; @@ -1067,7 +1068,9 @@ int RpcStartServer(int port) if (rpcThread != 0) { CloseHandle(rpcThread); } - +#if ENABLE_WX_LOG + EnableLog(); +#endif return 0; } @@ -1081,5 +1084,8 @@ int RpcStopServer() Sleep(1000); LOG_INFO("Server stoped."); } +#if ENABLE_WX_LOG + DisableLog(); +#endif return 0; } From 45cb2816eba25e2eab5b9a378c475370869f4da4 Mon Sep 17 00:00:00 2001 From: Changhua Date: Fri, 28 Jun 2024 20:21:36 +0800 Subject: [PATCH 17/55] Fix unhandled error --- WeChatFerry/spy/rpc_server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WeChatFerry/spy/rpc_server.cpp b/WeChatFerry/spy/rpc_server.cpp index a2aa840..56a4055 100644 --- a/WeChatFerry/spy/rpc_server.cpp +++ b/WeChatFerry/spy/rpc_server.cpp @@ -1051,7 +1051,7 @@ static int RunServer() } nng_free(in, in_len); } - lIsRunning = false; + RpcStopServer(); LOG_DEBUG("Leave RunServer"); return rv; } From d59f7f739783461bf355b8c54f36316ebb5807d8 Mon Sep 17 00:00:00 2001 From: Changhua Date: Fri, 28 Jun 2024 22:26:22 +0800 Subject: [PATCH 18/55] Refactoring --- WeChatFerry/spy/Spy.vcxproj | 2 - WeChatFerry/spy/Spy.vcxproj.filters | 6 --- WeChatFerry/spy/funcs.cpp | 46 +++++++++++++++++++++++ WeChatFerry/spy/funcs.h | 1 + WeChatFerry/spy/receive_transfer.cpp | 56 ---------------------------- WeChatFerry/spy/receive_transfer.h | 5 --- WeChatFerry/spy/rpc_server.cpp | 1 - 7 files changed, 47 insertions(+), 70 deletions(-) delete mode 100644 WeChatFerry/spy/receive_transfer.cpp delete mode 100644 WeChatFerry/spy/receive_transfer.h 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" From e7aad958c804364e234a590ff47ee62eb4834915 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sat, 29 Jun 2024 17:15:29 +0800 Subject: [PATCH 19/55] Update login flag --- WeChatFerry/spy/load_calls.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WeChatFerry/spy/load_calls.cpp b/WeChatFerry/spy/load_calls.cpp index 0913b80..01f9545 100644 --- a/WeChatFerry/spy/load_calls.cpp +++ b/WeChatFerry/spy/load_calls.cpp @@ -6,7 +6,7 @@ #define SUPPORT_VERSION L"3.9.10.27" WxCalls_t wxCalls = { - 0x5AB8A2C, // Login Status + 0x5AB86A8, // Login Status { 0x5AB7FB8, 0x5AB8098, 0x5AB7FD8, 0x5A7E190 }, // User Info: wxid, nickname, mobile, home { 0x1C1E690, 0x238DDD0, 0x1C1FF10 }, // Send Text Message /* Receive Message: From 9101b3716204497cffa5db5394021a4d42542f37 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sat, 29 Jun 2024 18:18:22 +0800 Subject: [PATCH 20/55] Impl refresh pyq --- WeChatFerry/spy/funcs.cpp | 74 +++----- WeChatFerry/spy/receive_msg.cpp | 302 +++++++++++--------------------- WeChatFerry/spy/rpc_server.cpp | 44 ++--- 3 files changed, 156 insertions(+), 264 deletions(-) diff --git a/WeChatFerry/spy/funcs.cpp b/WeChatFerry/spy/funcs.cpp index 3c6a683..5f808b0 100644 --- a/WeChatFerry/spy/funcs.cpp +++ b/WeChatFerry/spy/funcs.cpp @@ -23,9 +23,14 @@ namespace fs = std::filesystem; extern bool gIsListeningPyq; extern WxCalls_t g_WxCalls; -extern UINT64 g_WeChatWinDllAddr; +extern QWORD g_WeChatWinDllAddr; -int IsLogin(void) { return (int)GET_UINT64(g_WeChatWinDllAddr + g_WxCalls.login); } +typedef QWORD (*funcGetSNSDataMgr_t)(); +typedef QWORD (*funcGetSnsTimeLineMgr_t)(); +typedef QWORD (*funcGetSNSFirstPage_t)(QWORD, QWORD, QWORD); +typedef QWORD (*funcGetSNSNextPageScene_t)(QWORD, QWORD); + +int IsLogin(void) { return (int)GET_QWORD(g_WeChatWinDllAddr + g_WxCalls.login); } static string get_key(uint8_t header1, uint8_t header2, uint8_t *key) { @@ -114,56 +119,34 @@ string DecryptImage(string src, string dir) return dst; } -#if 0 static int GetFirstPage() { - int rv = -1; - DWORD pyqCall1 = g_WeChatWinDllAddr + g_WxCalls.pyq.call1; - DWORD pyqCall2 = g_WeChatWinDllAddr + g_WxCalls.pyq.call2; + int status = -1; - char buf[0xB44] = { 0 }; - __asm { - pushad; - call pyqCall1; - push 0x1; - lea ecx, buf; - push ecx; - mov ecx, eax; - call pyqCall2; - mov rv, eax; - popad; - } + funcGetSNSDataMgr_t GetSNSDataMgr = (funcGetSNSDataMgr_t)(g_WeChatWinDllAddr + 0x22A91C0); + funcGetSNSFirstPage_t GetSNSFirstPage = (funcGetSNSFirstPage_t)(g_WeChatWinDllAddr + 0x2ED9080); - return rv; + QWORD buff[16] = { 0 }; + QWORD mgr = GetSNSDataMgr(); + status = (int)GetSNSFirstPage(mgr, (QWORD)buff, 1); + + return status; } -static int GetNextPage(uint64_t id) +static int GetNextPage(QWORD id) { - int rv = -1; - DWORD pyqCall1 = g_WeChatWinDllAddr + g_WxCalls.pyq.call1; - DWORD pyqCall3 = g_WeChatWinDllAddr + g_WxCalls.pyq.call3; + int status = -1; - RawVector_t tmp = { 0 }; + funcGetSnsTimeLineMgr_t GetSnsTimeLineMgr = (funcGetSnsTimeLineMgr_t)(g_WeChatWinDllAddr + 0x2E6B110); + funcGetSNSNextPageScene_t GetSNSNextPageScene = (funcGetSNSNextPageScene_t)(g_WeChatWinDllAddr + 0x2EFEC00); - __asm { - pushad; - call pyqCall1; - lea ecx, tmp; - push ecx; - mov ebx, dword ptr [id + 0x04]; - push ebx; - mov edi, dword ptr [id] - push edi; - mov ecx, eax; - call pyqCall3; - mov rv, eax; - popad; - } + QWORD mgr = GetSnsTimeLineMgr(); + status = (int)GetSNSNextPageScene(mgr, id); - return rv; + return status; } -int RefreshPyq(uint64_t id) +int RefreshPyq(QWORD id) { if (!gIsListeningPyq) { LOG_ERROR("没有启动朋友圈消息接收,参考:enable_receiving_msg"); @@ -177,10 +160,11 @@ int RefreshPyq(uint64_t id) return GetNextPage(id); } -int DownloadAttach(uint64_t id, string thumb, string extra) +#if 0 +int DownloadAttach(QWORD id, string thumb, string extra) { int status = -1; - uint64_t localId; + QWORD localId; uint32_t dbIdx; if (fs::exists(extra)) { // 第一道,不重复下载 @@ -279,10 +263,10 @@ int DownloadAttach(uint64_t id, string thumb, string extra) return status; } -int RevokeMsg(uint64_t id) +int RevokeMsg(QWORD id) { int status = -1; - uint64_t localId; + QWORD localId; uint32_t dbIdx; if (GetLocalIdandDbidx(id, &localId, &dbIdx) != 0) { LOG_ERROR("Failed to get localId, Please check id: {}", to_string(id)); @@ -325,7 +309,7 @@ int RevokeMsg(uint64_t id) } #endif -string GetAudio(uint64_t id, string dir) +string GetAudio(QWORD id, string dir) { string mp3path = (dir.back() == '\\' || dir.back() == '/') ? dir : (dir + "/"); mp3path += to_string(id) + ".mp3"; diff --git a/WeChatFerry/spy/receive_msg.cpp b/WeChatFerry/spy/receive_msg.cpp index 7093151..6fc96ec 100644 --- a/WeChatFerry/spy/receive_msg.cpp +++ b/WeChatFerry/spy/receive_msg.cpp @@ -24,11 +24,15 @@ extern QWORD g_WeChatWinDllAddr; typedef QWORD (*funcRecvMsg_t)(QWORD, QWORD); typedef QWORD (*funcWxLog_t)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD); +typedef QWORD (*funcRecvPyq_t)(QWORD, QWORD, QWORD); static funcRecvMsg_t funcRecvMsg = nullptr; static funcRecvMsg_t realRecvMsg = nullptr; static funcWxLog_t funcWxLog = nullptr; static funcWxLog_t realWxLog = nullptr; +static funcRecvPyq_t funcRecvPyq = nullptr; +static funcRecvPyq_t realRecvPyq = nullptr; +static bool isMH_Initialized = false; MsgTypes_t GetMsgTypes() { @@ -140,6 +144,38 @@ static QWORD PrintWxLog(QWORD a1, QWORD a2, QWORD a3, QWORD a4, QWORD a5, QWORD return p; } +static void DispatchPyq(QWORD arg1, QWORD arg2, QWORD arg3) +{ + QWORD startAddr = *(QWORD *)(arg2 + 0x30); + QWORD endAddr = *(QWORD *)(arg2 + 0x38); + + if (startAddr == 0) { + return; + } + + while (startAddr < endAddr) { + WxMsg_t wxMsg; + + wxMsg.type = 0x00; // 朋友圈消息 + wxMsg.is_self = false; + wxMsg.is_group = false; + wxMsg.id = GET_QWORD(startAddr); + wxMsg.ts = GET_DWORD(startAddr + 0x38); + wxMsg.xml = GetStringByWstrAddr(startAddr + 0x9B8); + wxMsg.sender = GetStringByWstrAddr(startAddr + 0x18); + wxMsg.content = GetStringByWstrAddr(startAddr + 0x48); + + { + unique_lock lock(gMutex); + gMsgQueue.push(wxMsg); // 推送到队列 + } + + gCV.notify_all(); // 通知各方消息就绪 + + startAddr += 0x1618; + } +} + void EnableLog() { MH_STATUS status = MH_UNKNOWN; @@ -149,10 +185,13 @@ void EnableLog() } funcWxLog_t funcWxLog = (funcWxLog_t)(g_WeChatWinDllAddr + 0x26DA2D0); - status = MH_Initialize(); - if (status != MH_OK) { - LOG_ERROR("MH_Initialize failed: {}", to_string(status)); - return; + if (!isMH_Initialized) { + status = MH_Initialize(); + if (status != MH_OK) { + LOG_ERROR("MH_Initialize failed: {}", to_string(status)); + return; + } + isMH_Initialized = true; } status = MH_CreateHook(funcWxLog, &PrintWxLog, reinterpret_cast(&realWxLog)); @@ -182,13 +221,14 @@ void DisableLog() return; } - status = MH_Uninitialize(); - if (status != MH_OK) { - LOG_ERROR("MH_Uninitialize failed: {}", to_string(status)); - return; - } - gIsLogging = false; + if (isMH_Initialized and !gIsLogging and !gIsListening and !gIsListeningPyq) { + status = MH_Uninitialize(); + if (status != MH_OK) { + LOG_ERROR("MH_Uninitialize failed: {}", to_string(status)); + return; + } + } } void ListenMessage() @@ -200,10 +240,13 @@ void ListenMessage() } funcRecvMsg = (funcRecvMsg_t)(g_WeChatWinDllAddr + g_WxCalls.recvMsg.call); - status = MH_Initialize(); - if (status != MH_OK) { - LOG_ERROR("MH_Initialize failed: {}", to_string(status)); - return; + if (!isMH_Initialized) { + status = MH_Initialize(); + if (status != MH_OK) { + LOG_ERROR("MH_Initialize failed: {}", to_string(status)); + return; + } + isMH_Initialized = true; } status = MH_CreateHook(funcRecvMsg, &DispatchMsg, reinterpret_cast(&realRecvMsg)); @@ -241,208 +284,73 @@ void UnListenMessage() } gIsListening = false; -} - -void ListenPyq() { } - -void UnListenPyq() { } - -#if 0 -// static DWORD reg_buffer = 0; -// static DWORD recvMsgHookAddr = 0; -// static DWORD recvMsgCallAddr = 0; -// static DWORD recvMsgJumpBackAddr = 0; -// static CHAR recvMsgBackupCode[5] = { 0 }; - -// static DWORD recvPyqHookAddr = 0; -// static DWORD recvPyqCallAddr = 0; -// static DWORD recvPyqJumpBackAddr = 0; -// static CHAR recvPyqBackupCode[5] = { 0 }; - -void HookAddress(DWORD hookAddr, LPVOID funcAddr, CHAR recvMsgBackupCode[5]) -{ - // 组装跳转数据 - BYTE jmpCode[5] = { 0 }; - jmpCode[0] = 0xE9; - - // 计算偏移 - *(DWORD *)&jmpCode[1] = (DWORD)funcAddr - hookAddr - 5; - - // 备份原来的代码 - ReadProcessMemory(GetCurrentProcess(), (LPVOID)hookAddr, recvMsgBackupCode, 5, 0); - // 写入新的代码 - WriteProcessMemory(GetCurrentProcess(), (LPVOID)hookAddr, jmpCode, 5, 0); -} - -void UnHookAddress(DWORD hookAddr, CHAR restoreCode[5]) -{ - WriteProcessMemory(GetCurrentProcess(), (LPVOID)hookAddr, restoreCode, 5, 0); -} - -void DispatchMsg(DWORD reg) -{ - WxMsg_t wxMsg; - try { - wxMsg.id = GET_QWORD(reg + g_WxCalls.recvMsg.msgId); - wxMsg.type = GET_DWORD(reg + g_WxCalls.recvMsg.type); - wxMsg.is_self = GET_DWORD(reg + g_WxCalls.recvMsg.isSelf); - wxMsg.ts = GET_DWORD(reg + g_WxCalls.recvMsg.ts); - wxMsg.content = GetStringByWstrAddr(reg + g_WxCalls.recvMsg.content); - wxMsg.sign = GetStringByStrAddr(reg + g_WxCalls.recvMsg.sign); - wxMsg.xml = GetStringByStrAddr(reg + g_WxCalls.recvMsg.msgXml); - - string roomid = GetStringByWstrAddr(reg + g_WxCalls.recvMsg.roomId); - if (roomid.find("@chatroom") != string::npos) { // 群 ID 的格式为 xxxxxxxxxxx@chatroom - wxMsg.is_group = true; - wxMsg.roomid = roomid; - if (wxMsg.is_self) { - wxMsg.sender = GetSelfWxid(); - } else { - wxMsg.sender = GetStringByStrAddr(reg + g_WxCalls.recvMsg.wxid); - } - } else { - wxMsg.is_group = false; - if (wxMsg.is_self) { - wxMsg.sender = GetSelfWxid(); - } else { - wxMsg.sender = roomid; - } + if (isMH_Initialized and !gIsLogging and !gIsListening and !gIsListeningPyq) { + status = MH_Uninitialize(); + if (status != MH_OK) { + LOG_ERROR("MH_Uninitialize failed: {}", to_string(status)); + return; } - - wxMsg.thumb = GetStringByStrAddr(reg + g_WxCalls.recvMsg.thumb); - if (!wxMsg.thumb.empty()) { - wxMsg.thumb = GetHomePath() + wxMsg.thumb; - replace(wxMsg.thumb.begin(), wxMsg.thumb.end(), '\\', '/'); - } - - wxMsg.extra = GetStringByStrAddr(reg + g_WxCalls.recvMsg.extra); - if (!wxMsg.extra.empty()) { - wxMsg.extra = GetHomePath() + wxMsg.extra; - replace(wxMsg.extra.begin(), wxMsg.extra.end(), '\\', '/'); - } - } catch (const std::exception &e) { - LOG_ERROR(GB2312ToUtf8(e.what())); - } catch (...) { - LOG_ERROR("Unknow exception."); - } - - { - unique_lock lock(gMutex); - gMsgQueue.push(wxMsg); // 推送到队列 - } - - gCV.notify_all(); // 通知各方消息就绪 -} - -__declspec(naked) void RecieveMsgFunc() -{ - __asm { - pushad - pushfd - push ecx - call DispatchMsg - add esp, 0x4 - popfd - popad - call recvMsgCallAddr // 这个为被覆盖的call - jmp recvMsgJumpBackAddr // 跳回被HOOK指令的下一条指令 - } -} - -void ListenMessage() -{ - // DbgMsg("ListenMessage"); - // OutputDebugString(L"ListenMessage\n"); - // MessageBox(NULL, L"ListenMessage", L"ListenMessage", 0); - if (gIsListening || (g_WeChatWinDllAddr == 0)) { - return; - } - - recvMsgHookAddr = g_WeChatWinDllAddr + g_WxCalls.recvMsg.hook; - recvMsgCallAddr = g_WeChatWinDllAddr + g_WxCalls.recvMsg.call; - recvMsgJumpBackAddr = recvMsgHookAddr + 5; - - HookAddress(recvMsgHookAddr, RecieveMsgFunc, recvMsgBackupCode); - gIsListening = true; -} - -void UnListenMessage() -{ - if (!gIsListening) { - return; - } - UnHookAddress(recvMsgHookAddr, recvMsgBackupCode); - gIsListening = false; -} - -void DispatchPyq(DWORD reg) -{ - DWORD startAddr = *(DWORD *)(reg + g_WxCalls.pyq.start); - DWORD endAddr = *(DWORD *)(reg + g_WxCalls.pyq.end); - - if (startAddr == 0) { - return; - } - - while (startAddr < endAddr) { - WxMsg_t wxMsg; - - wxMsg.type = 0x00; // 朋友圈消息 - wxMsg.is_self = false; - wxMsg.is_group = false; - wxMsg.id = GET_QWORD(startAddr); - wxMsg.ts = GET_DWORD(startAddr + g_WxCalls.pyq.ts); - wxMsg.xml = GetStringByWstrAddr(startAddr + g_WxCalls.pyq.xml); - wxMsg.sender = GetStringByWstrAddr(startAddr + g_WxCalls.pyq.wxid); - wxMsg.content = GetStringByWstrAddr(startAddr + g_WxCalls.pyq.content); - - { - unique_lock lock(gMutex); - gMsgQueue.push(wxMsg); // 推送到队列 - } - - gCV.notify_all(); // 通知各方消息就绪 - - startAddr += g_WxCalls.pyq.step; - } -} - -__declspec(naked) void RecievePyqFunc() -{ - __asm { - pushad - pushfd - push [esp + 0x24] - call DispatchPyq - add esp, 0x4 - popfd - popad - call recvPyqCallAddr // 这个为被覆盖的call - jmp recvPyqJumpBackAddr // 跳回被HOOK指令的下一条指令 } } void ListenPyq() { + MH_STATUS status = MH_UNKNOWN; if (gIsListeningPyq || (g_WeChatWinDllAddr == 0)) { + LOG_WARN("gIsListeningPyq || (g_WeChatWinDllAddr == 0)"); + return; + } + funcRecvPyq = (funcRecvPyq_t)(g_WeChatWinDllAddr + 0x2EFAA10); + + if (!isMH_Initialized) { + status = MH_Initialize(); + if (status != MH_OK) { + LOG_ERROR("MH_Initialize failed: {}", to_string(status)); + return; + } + isMH_Initialized = true; + } + + status = MH_CreateHook(funcRecvPyq, &DispatchPyq, reinterpret_cast(&realRecvPyq)); + if (status != MH_OK) { + LOG_ERROR("MH_CreateHook failed: {}", to_string(status)); return; } - recvPyqHookAddr = g_WeChatWinDllAddr + g_WxCalls.pyq.hook; - recvPyqCallAddr = g_WeChatWinDllAddr + g_WxCalls.pyq.call; - recvPyqJumpBackAddr = recvPyqHookAddr + 5; + status = MH_EnableHook(funcRecvPyq); + if (status != MH_OK) { + LOG_ERROR("MH_EnableHook failed: {}", to_string(status)); + return; + } - HookAddress(recvPyqHookAddr, RecievePyqFunc, recvPyqBackupCode); gIsListeningPyq = true; } void UnListenPyq() { + MH_STATUS status = MH_UNKNOWN; if (!gIsListeningPyq) { return; } - UnHookAddress(recvPyqHookAddr, recvPyqBackupCode); + status = MH_DisableHook(funcRecvPyq); + if (status != MH_OK) { + LOG_ERROR("MH_DisableHook failed: {}", to_string(status)); + return; + } + + status = MH_Uninitialize(); + if (status != MH_OK) { + LOG_ERROR("MH_Uninitialize failed: {}", to_string(status)); + return; + } + gIsListeningPyq = false; + if (isMH_Initialized and !gIsLogging and !gIsListening and !gIsListeningPyq) { + status = MH_Uninitialize(); + if (status != MH_OK) { + LOG_ERROR("MH_Uninitialize failed: {}", to_string(status)); + return; + } + } } -#endif diff --git a/WeChatFerry/spy/rpc_server.cpp b/WeChatFerry/spy/rpc_server.cpp index ca1819d..9da06c3 100644 --- a/WeChatFerry/spy/rpc_server.cpp +++ b/WeChatFerry/spy/rpc_server.cpp @@ -571,6 +571,24 @@ bool func_exec_db_query(char *db, char *sql, uint8_t *out, size_t *len) return true; } +bool func_refresh_pyq(uint64_t id, uint8_t *out, size_t *len) +{ + Response rsp = Response_init_default; + rsp.func = Functions_FUNC_REFRESH_PYQ; + rsp.which_msg = Response_status_tag; + + rsp.msg.status = RefreshPyq(id); + + pb_ostream_t stream = pb_ostream_from_buffer(out, *len); + if (!pb_encode(&stream, Response_fields, &rsp)) { + LOG_ERROR("Encoding failed: {}", PB_GET_ERROR(&stream)); + return false; + } + *len = stream.bytes_written; + + return true; +} + #if 0 bool func_accept_friend(char *v3, char *v4, int32_t scene, uint8_t *out, size_t *len) { @@ -618,24 +636,6 @@ bool func_receive_transfer(char *wxid, char *tfid, char *taid, uint8_t *out, siz return true; } -bool func_refresh_pyq(uint64_t id, uint8_t *out, size_t *len) -{ - Response rsp = Response_init_default; - rsp.func = Functions_FUNC_REFRESH_PYQ; - rsp.which_msg = Response_status_tag; - - rsp.msg.status = RefreshPyq(id); - - pb_ostream_t stream = pb_ostream_from_buffer(out, *len); - if (!pb_encode(&stream, Response_fields, &rsp)) { - LOG_ERROR("Encoding failed: {}", PB_GET_ERROR(&stream)); - return false; - } - *len = stream.bytes_written; - - return true; -} - bool func_download_attach(AttachMsg att, uint8_t *out, size_t *len) { Response rsp = Response_init_default; @@ -934,6 +934,10 @@ static bool dispatcher(uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len ret = func_exec_db_query(req.msg.query.db, req.msg.query.sql, out, out_len); break; } + case Functions_FUNC_REFRESH_PYQ: { + ret = func_refresh_pyq(req.msg.ui64, out, out_len); + break; + } #if 0 case Functions_FUNC_ACCEPT_FRIEND: { ret = func_accept_friend(req.msg.v.v3, req.msg.v.v4, req.msg.v.scene, out, out_len); @@ -943,10 +947,6 @@ static bool dispatcher(uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len ret = func_receive_transfer(req.msg.tf.wxid, req.msg.tf.tfid, req.msg.tf.taid, out, out_len); break; } - case Functions_FUNC_REFRESH_PYQ: { - ret = func_refresh_pyq(req.msg.ui64, out, out_len); - break; - } case Functions_FUNC_DOWNLOAD_ATTACH: { ret = func_download_attach(req.msg.att, out, out_len); break; From 5481e6d3ec73cb513c6a38943c53fdb8fb6fa90f Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 30 Jun 2024 16:23:12 +0800 Subject: [PATCH 21/55] Fix operator --- WeChatFerry/spy/receive_msg.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WeChatFerry/spy/receive_msg.cpp b/WeChatFerry/spy/receive_msg.cpp index 6fc96ec..f244f29 100644 --- a/WeChatFerry/spy/receive_msg.cpp +++ b/WeChatFerry/spy/receive_msg.cpp @@ -222,7 +222,7 @@ void DisableLog() } gIsLogging = false; - if (isMH_Initialized and !gIsLogging and !gIsListening and !gIsListeningPyq) { + if (isMH_Initialized && !gIsLogging && !gIsListening && !gIsListeningPyq) { status = MH_Uninitialize(); if (status != MH_OK) { LOG_ERROR("MH_Uninitialize failed: {}", to_string(status)); @@ -284,7 +284,7 @@ void UnListenMessage() } gIsListening = false; - if (isMH_Initialized and !gIsLogging and !gIsListening and !gIsListeningPyq) { + if (isMH_Initialized && !gIsLogging && !gIsListening && !gIsListeningPyq) { status = MH_Uninitialize(); if (status != MH_OK) { LOG_ERROR("MH_Uninitialize failed: {}", to_string(status)); @@ -346,7 +346,7 @@ void UnListenPyq() } gIsListeningPyq = false; - if (isMH_Initialized and !gIsLogging and !gIsListening and !gIsListeningPyq) { + if (isMH_Initialized && !gIsLogging && !gIsListening && !gIsListeningPyq) { status = MH_Uninitialize(); if (status != MH_OK) { LOG_ERROR("MH_Uninitialize failed: {}", to_string(status)); From 642fa63b39b434fab2013f1f02ff0d240dd26074 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 30 Jun 2024 16:49:33 +0800 Subject: [PATCH 22/55] Impl download attachments --- WeChatFerry/spy/funcs.cpp | 95 ++++++++++++++++------------------ WeChatFerry/spy/rpc_server.cpp | 52 +++++++++---------- 2 files changed, 71 insertions(+), 76 deletions(-) diff --git a/WeChatFerry/spy/funcs.cpp b/WeChatFerry/spy/funcs.cpp index 5f808b0..14e90e7 100644 --- a/WeChatFerry/spy/funcs.cpp +++ b/WeChatFerry/spy/funcs.cpp @@ -29,6 +29,12 @@ typedef QWORD (*funcGetSNSDataMgr_t)(); typedef QWORD (*funcGetSnsTimeLineMgr_t)(); typedef QWORD (*funcGetSNSFirstPage_t)(QWORD, QWORD, QWORD); typedef QWORD (*funcGetSNSNextPageScene_t)(QWORD, QWORD); +typedef QWORD (*GetChatMgr_t)(); +typedef QWORD (*NewChatMsg_t)(QWORD); +typedef QWORD (*FreeChatMsg_t)(QWORD); +typedef QWORD (*GetPreDownLoadMgr_t)(); +typedef QWORD (*GetMgrByPrefixLocalId_t)(QWORD, QWORD); +typedef QWORD (*PushAttachTask_t)(QWORD, QWORD, QWORD, QWORD); int IsLogin(void) { return (int)GET_QWORD(g_WeChatWinDllAddr + g_WxCalls.login); } @@ -160,14 +166,21 @@ int RefreshPyq(QWORD id) return GetNextPage(id); } -#if 0 +/******************************************************************************* + * 都说我不写注释,写一下吧 + * 其实也没啥好写的,就是下载资源 + * 主要介绍一下几个参数: + * id:好理解,消息 id + * thumb:图片或者视频的缩略图路径;如果是视频,后缀为 mp4 后就是存在路径了 + * extra:图片、文件的路径 + *******************************************************************************/ int DownloadAttach(QWORD id, string thumb, string extra) { int status = -1; QWORD localId; uint32_t dbIdx; - if (fs::exists(extra)) { // 第一道,不重复下载 + if (fs::exists(extra)) { // 第一道,不重复下载。TODO: 通过文件大小来判断 return 0; } @@ -176,30 +189,28 @@ int DownloadAttach(QWORD id, string thumb, string extra) return status; } - char buff[0x2D8] = { 0 }; - DWORD dlCall1 = g_WeChatWinDllAddr + g_WxCalls.da.call1; - DWORD dlCall2 = g_WeChatWinDllAddr + g_WxCalls.da.call2; - DWORD dlCall3 = g_WeChatWinDllAddr + g_WxCalls.da.call3; - DWORD dlCall4 = g_WeChatWinDllAddr + g_WxCalls.da.call4; - DWORD dlCall5 = g_WeChatWinDllAddr + g_WxCalls.da.call5; - DWORD dlCall6 = g_WeChatWinDllAddr + g_WxCalls.da.call6; + NewChatMsg_t NewChatMsg = (NewChatMsg_t)(g_WeChatWinDllAddr + 0x1C28800); + FreeChatMsg_t FreeChatMsg = (FreeChatMsg_t)(g_WeChatWinDllAddr + 0x1C1FF10); + GetChatMgr_t GetChatMgr = (GetChatMgr_t)(g_WeChatWinDllAddr + 0x1C51CF0); + GetMgrByPrefixLocalId_t GetMgrByPrefixLocalId = (GetMgrByPrefixLocalId_t)(g_WeChatWinDllAddr + 0x2206280); + GetPreDownLoadMgr_t GetPreDownLoadMgr = (GetPreDownLoadMgr_t)(g_WeChatWinDllAddr + 0x1CD87E0); + PushAttachTask_t PushAttachTask = (PushAttachTask_t)(g_WeChatWinDllAddr + 0x1DA69C0); - __asm { - pushad; - pushfd; - lea ecx, buff; - call dlCall1; - call dlCall2; - push dword ptr [dbIdx]; - lea ecx, buff; - push dword ptr [localId]; - call dlCall3; - add esp, 0x8; - popfd; - popad; + LARGE_INTEGER l; + l.HighPart = dbIdx; + l.LowPart = (DWORD)localId; + + char *buff = (char *)HeapAlloc(GetProcessHeap(), 0, 0x460); + if (buff == nullptr) { + LOG_ERROR("Failed to allocate memory."); + return status; } - DWORD type = GET_DWORD(buff + 0x38); + QWORD pChatMsg = NewChatMsg((QWORD)buff); + GetChatMgr(); + GetMgrByPrefixLocalId(l.QuadPart, pChatMsg); + + QWORD type = GET_QWORD(buff + 0x38); string save_path = ""; string thumb_path = ""; @@ -223,7 +234,7 @@ int DownloadAttach(QWORD id, string thumb, string extra) break; } - if (fs::exists(save_path)) { // 不重复下载 + if (fs::exists(save_path)) { // 不重复下载。TODO: 通过文件大小来判断 return 0; } @@ -231,38 +242,22 @@ int DownloadAttach(QWORD id, string thumb, string extra) // 创建父目录,由于路径来源于微信,不做检查 fs::create_directory(fs::path(save_path).parent_path().string()); - wstring wsSavePath = String2Wstring(save_path); - wstring wsThumbPath = String2Wstring(thumb_path); + int temp = 1; + WxString *pSavePath = NewWxStringFromStr(save_path); + WxString *pThumbPath = NewWxStringFromStr(thumb_path); - WxString wxSavePath(wsSavePath); - WxString wxThumbPath(wsThumbPath); + memcpy(&buff[0x280], pThumbPath, sizeof(WxString)); + memcpy(&buff[0x2A0], pSavePath, sizeof(WxString)); + memcpy(&buff[0x40C], &temp, sizeof(temp)); - int temp = 1; - memcpy(&buff[0x19C], &wxThumbPath, sizeof(wxThumbPath)); - memcpy(&buff[0x1B0], &wxSavePath, sizeof(wxSavePath)); - memcpy(&buff[0x29C], &temp, sizeof(temp)); - - __asm { - pushad; - pushfd; - call dlCall4; - push 0x1; - push 0x0; - lea ecx, buff; - push ecx; - mov ecx, eax; - call dlCall5; - mov status, eax; - lea ecx, buff; - push 0x0; - call dlCall6; - popfd; - popad; - } + QWORD mgr = GetPreDownLoadMgr(); + status = (int)PushAttachTask(mgr, pChatMsg, 0, 1); + FreeChatMsg(pChatMsg); return status; } +#if 0 int RevokeMsg(QWORD id) { int status = -1; diff --git a/WeChatFerry/spy/rpc_server.cpp b/WeChatFerry/spy/rpc_server.cpp index 9da06c3..835a1e6 100644 --- a/WeChatFerry/spy/rpc_server.cpp +++ b/WeChatFerry/spy/rpc_server.cpp @@ -589,6 +589,28 @@ bool func_refresh_pyq(uint64_t id, uint8_t *out, size_t *len) return true; } +bool func_download_attach(AttachMsg att, uint8_t *out, size_t *len) +{ + Response rsp = Response_init_default; + rsp.func = Functions_FUNC_DOWNLOAD_ATTACH; + rsp.which_msg = Response_status_tag; + + uint64_t id = att.id; + string thumb = string(att.thumb ? att.thumb : ""); + string extra = string(att.extra ? att.extra : ""); + + rsp.msg.status = DownloadAttach(id, thumb, extra); + + pb_ostream_t stream = pb_ostream_from_buffer(out, *len); + if (!pb_encode(&stream, Response_fields, &rsp)) { + LOG_ERROR("Encoding failed: {}", PB_GET_ERROR(&stream)); + return false; + } + *len = stream.bytes_written; + + return true; +} + #if 0 bool func_accept_friend(char *v3, char *v4, int32_t scene, uint8_t *out, size_t *len) { @@ -636,28 +658,6 @@ bool func_receive_transfer(char *wxid, char *tfid, char *taid, uint8_t *out, siz return true; } -bool func_download_attach(AttachMsg att, uint8_t *out, size_t *len) -{ - Response rsp = Response_init_default; - rsp.func = Functions_FUNC_DOWNLOAD_ATTACH; - rsp.which_msg = Response_status_tag; - - uint64_t id = att.id; - string thumb = string(att.thumb ? att.thumb : ""); - string extra = string(att.extra ? att.extra : ""); - - rsp.msg.status = DownloadAttach(id, thumb, extra); - - pb_ostream_t stream = pb_ostream_from_buffer(out, *len); - if (!pb_encode(&stream, Response_fields, &rsp)) { - LOG_ERROR("Encoding failed: {}", PB_GET_ERROR(&stream)); - return false; - } - *len = stream.bytes_written; - - return true; -} - bool func_get_contact_info(string wxid, uint8_t *out, size_t *len) { /*借用 Functions_FUNC_GET_CONTACTS */ @@ -938,6 +938,10 @@ static bool dispatcher(uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len ret = func_refresh_pyq(req.msg.ui64, out, out_len); break; } + case Functions_FUNC_DOWNLOAD_ATTACH: { + ret = func_download_attach(req.msg.att, out, out_len); + break; + } #if 0 case Functions_FUNC_ACCEPT_FRIEND: { ret = func_accept_friend(req.msg.v.v3, req.msg.v.v4, req.msg.v.scene, out, out_len); @@ -947,10 +951,6 @@ static bool dispatcher(uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len ret = func_receive_transfer(req.msg.tf.wxid, req.msg.tf.tfid, req.msg.tf.taid, out, out_len); break; } - case Functions_FUNC_DOWNLOAD_ATTACH: { - ret = func_download_attach(req.msg.att, out, out_len); - break; - } case Functions_FUNC_GET_CONTACT_INFO: { ret = func_get_contact_info(req.msg.str, out, out_len); break; From 668f984240473e18cfca44dcc3ea5bdd6a8b8793 Mon Sep 17 00:00:00 2001 From: Changhua Date: Mon, 1 Jul 2024 07:59:39 +0800 Subject: [PATCH 23/55] Refactoring --- WeChatFerry/spy/funcs.cpp | 216 +++++++-------------------------- WeChatFerry/spy/rpc_server.cpp | 110 ++++++++--------- 2 files changed, 96 insertions(+), 230 deletions(-) diff --git a/WeChatFerry/spy/funcs.cpp b/WeChatFerry/spy/funcs.cpp index 14e90e7..2b8792e 100644 --- a/WeChatFerry/spy/funcs.cpp +++ b/WeChatFerry/spy/funcs.cpp @@ -35,6 +35,8 @@ typedef QWORD (*FreeChatMsg_t)(QWORD); typedef QWORD (*GetPreDownLoadMgr_t)(); typedef QWORD (*GetMgrByPrefixLocalId_t)(QWORD, QWORD); typedef QWORD (*PushAttachTask_t)(QWORD, QWORD, QWORD, QWORD); +typedef QWORD (*GetOCRManager_t)(); +typedef QWORD (*DoOCRTask_t)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD); int IsLogin(void) { return (int)GET_QWORD(g_WeChatWinDllAddr + g_WxCalls.login); } @@ -257,53 +259,6 @@ int DownloadAttach(QWORD id, string thumb, string extra) return status; } -#if 0 -int RevokeMsg(QWORD id) -{ - int status = -1; - QWORD localId; - uint32_t dbIdx; - if (GetLocalIdandDbidx(id, &localId, &dbIdx) != 0) { - LOG_ERROR("Failed to get localId, Please check id: {}", to_string(id)); - return status; - } - - char chat_msg[0x2D8] = { 0 }; - - DWORD rmCall1 = g_WeChatWinDllAddr + g_WxCalls.rm.call1; - DWORD rmCall2 = g_WeChatWinDllAddr + g_WxCalls.rm.call2; - DWORD rmCall3 = g_WeChatWinDllAddr + g_WxCalls.rm.call3; - DWORD rmCall4 = g_WeChatWinDllAddr + g_WxCalls.rm.call4; - DWORD rmCall5 = g_WeChatWinDllAddr + g_WxCalls.rm.call5; - - __asm { - pushad; - pushfd; - lea ecx, chat_msg; - call rmCall1; - call rmCall2; - push dword ptr [dbIdx]; - lea ecx, chat_msg; - push dword ptr [localId]; - call rmCall3; - add esp, 0x8; - call rmCall2; - lea ecx, chat_msg; - push ecx; - mov ecx, eax; - call rmCall4; - mov status, eax; - lea ecx, chat_msg; - push 0x0; - call rmCall5; - popfd; - popad; - } - - return status; -} -#endif - string GetAudio(QWORD id, string dir) { string mp3path = (dir.back() == '\\' || dir.back() == '/') ? dir : (dir + "/"); @@ -324,154 +279,69 @@ string GetAudio(QWORD id, string dir) return mp3path; } -#if 0 OcrResult_t GetOcrResult(string path) { OcrResult_t ret = { -1, "" }; - +#if 0 // 参数没调好,会抛异常,看看有没有好心人来修复 if (!fs::exists(path)) { LOG_ERROR("Can not find: {}", path); return ret; } + GetOCRManager_t GetOCRManager = (GetOCRManager_t)(g_WeChatWinDllAddr + 0x1D6C3C0); + DoOCRTask_t DoOCRTask = (DoOCRTask_t)(g_WeChatWinDllAddr + 0x2D10BC0); + + QWORD unk1 = 0, unk2 = 0, unused = 0; + QWORD *pUnk1 = &unk1; + QWORD *pUnk2 = &unk2; // 路径分隔符有要求,必须为 `\` wstring wsPath = String2Wstring(fs::path(path).make_preferred().string()); - WxString wxPath(wsPath); - WxString nullObj; - WxString ocrBuffer; + vector *pv = (vector *)HeapAlloc(GetProcessHeap(), 0, 0x20); + RawVector_t *pRv = (RawVector_t *)pv; + pRv->finish = pRv->start; + char buff[0x98] = { 0 }; + memcpy(buff, &pRv->start, sizeof(QWORD)); - DWORD ocrCall1 = g_WeChatWinDllAddr + g_WxCalls.ocr.call1; - DWORD ocrCall2 = g_WeChatWinDllAddr + g_WxCalls.ocr.call2; - DWORD ocrCall3 = g_WeChatWinDllAddr + g_WxCalls.ocr.call3; + QWORD mgr = GetOCRManager(); + ret.status = (int)DoOCRTask(mgr, (QWORD)&wxPath, unused, (QWORD)buff, (QWORD)&pUnk1, (QWORD)&pUnk2); - DWORD tmp = 0; - int status = -1; - __asm { - pushad; - pushfd; - lea ecx, ocrBuffer; - call ocrCall1; - call ocrCall2; - lea ecx, nullObj; - push ecx; - lea ecx, tmp; - push ecx; - lea ecx, ocrBuffer; - push ecx; - push 0x0; - lea ecx, wxPath; - push ecx; - mov ecx, eax; - call ocrCall3; - mov status, eax; - popfd; - popad; + QWORD count = GET_QWORD(buff + 0x8); + if (count > 0) { + QWORD header = GET_QWORD(buff); + for (QWORD i = 0; i < count; i++) { + QWORD content = GET_QWORD(header); + ret.result += Wstring2String(GET_WSTRING(content + 0x28)); + ret.result += "\n"; + header = content; + } } - - if (status != 0) - { - LOG_ERROR("OCR status: {}", to_string(status)); - return ret; // 识别出错 - } - - ret.status = status; - - DWORD addr = (DWORD)&ocrBuffer; - DWORD header = GET_DWORD(addr); - DWORD num = GET_DWORD(addr + 0x4); - if (num <= 0) { - return ret; // 识别内容为空 - } - - for (uint32_t i = 0; i < num; i++) { - DWORD content = GET_DWORD(header); - ret.result += Wstring2String(GET_WSTRING(content + 0x14)); - ret.result += "\n"; - header = content; - } - +#endif return ret; } +int RevokeMsg(QWORD id) +{ + int status = -1; +#if 0 // 这个挺鸡肋的,因为自己发的消息没法直接获得 msgid,就这样吧 + QWORD localId; + uint32_t dbIdx; + if (GetLocalIdandDbidx(id, &localId, &dbIdx) != 0) { + LOG_ERROR("Failed to get localId, Please check id: {}", to_string(id)); + return status; + } +#endif + return status; +} + string GetLoginUrl() { - if (GET_DWORD(g_WeChatWinDllAddr + g_WxCalls.login) == 1) { - LOG_DEBUG("Already logined."); - return ""; // 已登录直接返回空字符 - } - - DWORD refreshLoginQrcodeCall1 = g_WeChatWinDllAddr + g_WxCalls.rlq.call1; - DWORD refreshLoginQrcodeCall2 = g_WeChatWinDllAddr + g_WxCalls.rlq.call2; - - // 刷新二维码 - __asm { - pushad; - pushfd; - call refreshLoginQrcodeCall1; - mov ecx, eax; - call refreshLoginQrcodeCall2; - popfd; - popad; - } - - // 获取二维码链接 - char *url = GET_STRING(g_WeChatWinDllAddr + g_WxCalls.rlq.url); - uint8_t cnt = 0; - while (url[0] == 0) { // 刷新需要时间,太快了会获取不到 - if (cnt > 5) { - LOG_ERROR("Refresh QR Code timeout."); - return ""; - } - Sleep(1000); - cnt++; - } + char url[] = "方法还没实现"; 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; + // 别想了,这个不实现了 + return -1; } -#endif diff --git a/WeChatFerry/spy/rpc_server.cpp b/WeChatFerry/spy/rpc_server.cpp index 835a1e6..37b096a 100644 --- a/WeChatFerry/spy/rpc_server.cpp +++ b/WeChatFerry/spy/rpc_server.cpp @@ -611,19 +611,31 @@ bool func_download_attach(AttachMsg att, uint8_t *out, size_t *len) return true; } -#if 0 -bool func_accept_friend(char *v3, char *v4, int32_t scene, uint8_t *out, size_t *len) +bool func_revoke_msg(uint64_t id, uint8_t *out, size_t *len) { Response rsp = Response_init_default; - rsp.func = Functions_FUNC_ACCEPT_FRIEND; + rsp.func = Functions_FUNC_REVOKE_MSG; rsp.which_msg = Response_status_tag; - if ((v3 == NULL) || (v4 == NULL)) { - rsp.msg.status = -1; - LOG_ERROR("Empty V3 or V4."); - } else { - rsp.msg.status = AcceptNewFriend(v3, v4, scene); + rsp.msg.status = RevokeMsg(id); + + pb_ostream_t stream = pb_ostream_from_buffer(out, *len); + if (!pb_encode(&stream, Response_fields, &rsp)) { + LOG_ERROR("Encoding failed: {}", PB_GET_ERROR(&stream)); + return false; } + *len = stream.bytes_written; + + return true; +} + +bool func_refresh_qrcode(uint8_t *out, size_t *len) +{ + Response rsp = Response_init_default; + rsp.func = Functions_FUNC_REFRESH_QRCODE; + rsp.which_msg = Response_str_tag; + + rsp.msg.str = (char *)GetLoginUrl().c_str(); pb_ostream_t stream = pb_ostream_from_buffer(out, *len); if (!pb_encode(&stream, Response_fields, &rsp)) { @@ -658,6 +670,30 @@ bool func_receive_transfer(char *wxid, char *tfid, char *taid, uint8_t *out, siz return true; } +#if 0 +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_ACCEPT_FRIEND; + rsp.which_msg = Response_status_tag; + + if ((v3 == NULL) || (v4 == NULL)) { + rsp.msg.status = -1; + LOG_ERROR("Empty V3 or V4."); + } else { + rsp.msg.status = AcceptNewFriend(v3, v4, scene); + } + + pb_ostream_t stream = pb_ostream_from_buffer(out, *len); + if (!pb_encode(&stream, Response_fields, &rsp)) { + LOG_ERROR("Encoding failed: {}", PB_GET_ERROR(&stream)); + return false; + } + *len = stream.bytes_written; + + return true; +} + bool func_get_contact_info(string wxid, uint8_t *out, size_t *len) { /*借用 Functions_FUNC_GET_CONTACTS */ @@ -680,42 +716,6 @@ bool func_get_contact_info(string wxid, uint8_t *out, size_t *len) return true; } - -bool func_revoke_msg(uint64_t id, uint8_t *out, size_t *len) -{ - Response rsp = Response_init_default; - rsp.func = Functions_FUNC_REVOKE_MSG; - rsp.which_msg = Response_status_tag; - - rsp.msg.status = RevokeMsg(id); - - pb_ostream_t stream = pb_ostream_from_buffer(out, *len); - if (!pb_encode(&stream, Response_fields, &rsp)) { - LOG_ERROR("Encoding failed: {}", PB_GET_ERROR(&stream)); - return false; - } - *len = stream.bytes_written; - - return true; -} - -bool func_refresh_qrcode(uint8_t *out, size_t *len) -{ - Response rsp = Response_init_default; - rsp.func = Functions_FUNC_REFRESH_QRCODE; - rsp.which_msg = Response_str_tag; - - rsp.msg.str = (char *)GetLoginUrl().c_str(); - - pb_ostream_t stream = pb_ostream_from_buffer(out, *len); - if (!pb_encode(&stream, Response_fields, &rsp)) { - LOG_ERROR("Encoding failed: {}", PB_GET_ERROR(&stream)); - return false; - } - *len = stream.bytes_written; - - return true; -} #endif bool func_decrypt_image(DecPath dec, uint8_t *out, size_t *len) @@ -743,7 +743,6 @@ bool func_decrypt_image(DecPath dec, uint8_t *out, size_t *len) return true; } -#if 0 bool func_exec_ocr(char *path, uint8_t *out, size_t *len) { Response rsp = Response_init_default; @@ -768,7 +767,6 @@ bool func_exec_ocr(char *path, uint8_t *out, size_t *len) *len = stream.bytes_written; return true; } -#endif bool func_add_room_members(char *roomid, char *wxids, uint8_t *out, size_t *len) { @@ -942,19 +940,10 @@ static bool dispatcher(uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len ret = func_download_attach(req.msg.att, out, out_len); break; } -#if 0 - case Functions_FUNC_ACCEPT_FRIEND: { - ret = func_accept_friend(req.msg.v.v3, req.msg.v.v4, req.msg.v.scene, out, out_len); - break; - } case Functions_FUNC_RECV_TRANSFER: { ret = func_receive_transfer(req.msg.tf.wxid, req.msg.tf.tfid, req.msg.tf.taid, out, out_len); break; } - case Functions_FUNC_GET_CONTACT_INFO: { - ret = func_get_contact_info(req.msg.str, out, out_len); - break; - } case Functions_FUNC_REVOKE_MSG: { ret = func_revoke_msg(req.msg.ui64, out, out_len); break; @@ -963,17 +952,24 @@ static bool dispatcher(uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len ret = func_refresh_qrcode(out, out_len); break; } +#if 0 + case Functions_FUNC_ACCEPT_FRIEND: { + ret = func_accept_friend(req.msg.v.v3, req.msg.v.v4, req.msg.v.scene, out, out_len); + break; + } + case Functions_FUNC_GET_CONTACT_INFO: { + ret = func_get_contact_info(req.msg.str, out, out_len); + break; + } #endif case Functions_FUNC_DECRYPT_IMAGE: { ret = func_decrypt_image(req.msg.dec, out, out_len); break; } -#if 0 case Functions_FUNC_EXEC_OCR: { ret = func_exec_ocr(req.msg.str, out, out_len); break; } -#endif case Functions_FUNC_ADD_ROOM_MEMBERS: { ret = func_add_room_members(req.msg.m.roomid, req.msg.m.wxids, out, out_len); break; From 94febf73912be7219597d5658159fa070e9dbcd5 Mon Sep 17 00:00:00 2001 From: origin <15806889114@163.com> Date: Mon, 1 Jul 2024 10:01:30 +0800 Subject: [PATCH 24/55] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=9A=84=E6=8F=8F=E8=BF=B0=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clients/go_wcf_http/README.MD | 16 + clients/go_wcf_http/app/api.go | 450 +++ clients/go_wcf_http/app/robot.go | 88 + clients/go_wcf_http/go.mod | 43 + clients/go_wcf_http/go.sum | 181 + clients/go_wcf_http/mian.go | 213 ++ clients/go_wcf_http/proto/wcf.proto | 236 ++ .../templates/wechatFerryGoHttp.html | 224 ++ clients/go_wcf_http/wcf/wcf.go | 605 ++++ clients/go_wcf_http/wcf/wcf.pb.go | 2982 +++++++++++++++++ 10 files changed, 5038 insertions(+) create mode 100644 clients/go_wcf_http/README.MD create mode 100644 clients/go_wcf_http/app/api.go create mode 100644 clients/go_wcf_http/app/robot.go create mode 100644 clients/go_wcf_http/go.mod create mode 100644 clients/go_wcf_http/go.sum create mode 100644 clients/go_wcf_http/mian.go create mode 100644 clients/go_wcf_http/proto/wcf.proto create mode 100644 clients/go_wcf_http/templates/wechatFerryGoHttp.html create mode 100644 clients/go_wcf_http/wcf/wcf.go create mode 100644 clients/go_wcf_http/wcf/wcf.pb.go diff --git a/clients/go_wcf_http/README.MD b/clients/go_wcf_http/README.MD new file mode 100644 index 0000000..19bc228 --- /dev/null +++ b/clients/go_wcf_http/README.MD @@ -0,0 +1,16 @@ +# wechatFerry 的 go版本http端 + +接口文档:https://apifox.com/apidoc/shared-6e6950ec-1a6d-4545-90d6-d27d31af2b7c + +http服务器的端口是 8000 需要修改的自行编译懒得写配置文件 +localhost:8000是本地接口文档 + +由于用到了cgo 编译需要安装Mingw +Mingw下载地址:https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-win32/sjlj/x86_64-8.1.0-release-win32-sjlj-rt_v6-rev0.7z/download + +打包命令 + +#x86 win 编译 +set GOOS=windows +set GOARCH=amd64 +go build -ldflags="-s -w" -o go_wcf_http3.9.10.27.exe .\main.go diff --git a/clients/go_wcf_http/app/api.go b/clients/go_wcf_http/app/api.go new file mode 100644 index 0000000..af34556 --- /dev/null +++ b/clients/go_wcf_http/app/api.go @@ -0,0 +1,450 @@ +package app + +import ( + "fmt" + "github.com/gin-gonic/gin" + "net/http" +) + +type Result struct { + Code int `json:"code"` + Message string `json:"message"` + Data interface{} `json:"data"` +} + +// SetMessageCallbackUrl 设置消息回调地址 +func SetMessageCallbackUrl(c *gin.Context) { + var result Result + var RequestData struct { + CallbackUrl string `json:"callback_url"` + } + if err := c.BindJSON(&RequestData); err != nil { + result.Code = 0 + result.Message = "json解析失败" + var data = make(map[string]interface{}) + result.Data = data + c.JSON(http.StatusOK, result) + return + } + result.Code = 1 + result.Message = "回调url设置成功" + var data = map[string]string{"callback_url": RequestData.CallbackUrl} + result.Data = data + WxClient.MessageCallbackUrl = RequestData.CallbackUrl + c.JSON(http.StatusOK, result) +} + +// GetSelfWXID 获取登录者的wxid +func GetSelfWXID(c *gin.Context) { + var result Result + wxId := WxClient.GetSelfWXID() + if wxId == "" { + result.Code = 0 + result.Message = "获取登录者的wx_id失败" + var data = map[string]string{"wx_id": wxId} + result.Data = data + c.JSON(http.StatusOK, result) + return + } + result.Code = 1 + result.Message = "获取登录者的wx_id成功" + var data = map[string]string{"wx_id": wxId} + result.Data = data + c.JSON(http.StatusOK, result) +} + +// GetUserInfo 获取自己的信息 +func GetUserInfo(c *gin.Context) { + var result Result + result.Code = 1 + result.Message = "获取个人信息成功" + result.Data = WxClient.GetUserInfo() + c.JSON(http.StatusOK, result) +} + +// GetMsgTypes 获取消息类型列表 +func GetMsgTypes(c *gin.Context) { + var result Result + result.Code = 1 + result.Message = "获取消息类型列表成功" + result.Data = WxClient.GetMsgTypes() + c.JSON(http.StatusOK, result) +} + +// GetContacts 获取通讯录 +func GetContacts(c *gin.Context) { + var result Result + // 此处手动修改了wcf.pd.go文件 原文件为json字段为空时不返回 如有需要可以自行补上, omitempty + result.Code = 1 + result.Message = "获取通讯录成功" + result.Data = WxClient.GetContacts() + c.JSON(http.StatusOK, result) +} + +// GetRoomMembersAll 获取全部群的群成员 +func GetRoomMembersAll(c *gin.Context) { + var result Result + var RoomMemberList = make(map[string]string) + contacts := WxClient.ExecDBQuery("MicroMsg.db", "SELECT UserName, NickName FROM Contact;") + for _, v := range contacts { + RoomMemberList[string(v.GetFields()[0].Content)] = string(v.GetFields()[1].Content) + } + result.Code = 1 + result.Message = "获取全部数据成功" + result.Data = RoomMemberList + c.JSON(http.StatusOK, result) +} + +// GetRoomMember 获取指定群成员 +func GetRoomMember(c *gin.Context) { + var result Result + var RequestData struct { + RoomId string `json:"room_id"` + } + if err := c.BindJSON(&RequestData); err != nil { + result.Code = 0 + result.Message = "json解析失败" + var data = make(map[string]interface{}) + result.Data = data + c.JSON(http.StatusOK, result) + return + } + contacts := WxClient.ExecDBQuery("MicroMsg.db", "SELECT RoomData FROM ChatRoom WHERE ChatRoomName = '"+RequestData.RoomId+"';") + for _, v := range contacts { + fmt.Print(v.GetFields()[0].Content) + } +} + +// GetDBNames 获取全部的数据库 +func GetDBNames(c *gin.Context) { + var result Result + // 此处手动修改了wcf.pd.go文件 原文件为json字段为空时不返回 如有需要可以自行补上, omitempty + result.Code = 1 + result.Message = "获取全部的数据库成功" + result.Data = WxClient.GetDBNames() + c.JSON(http.StatusOK, result) +} + +// GetDBTables 获取表 +func GetDBTables(c *gin.Context) { + var result Result + var RequestData struct { + DbName string `json:"db_name"` + } + if err := c.BindJSON(&RequestData); err != nil { + result.Code = 0 + result.Message = "json解析失败" + var data = make(map[string]interface{}) + result.Data = data + c.JSON(http.StatusOK, result) + return + } + result.Code = 1 + result.Message = "获取成功" + result.Data = WxClient.GetDBTables(RequestData.DbName) + c.JSON(http.StatusOK, result) +} + +// ExecDBQuery 执行sql +func ExecDBQuery(c *gin.Context) { + var result Result + var RequestData struct { + Db string `json:"db"` + Sql string `json:"sql"` + } + if err := c.BindJSON(&RequestData); err != nil { + result.Code = 0 + result.Message = "json解析失败" + var data = make(map[string]interface{}) + result.Data = data + c.JSON(http.StatusOK, result) + return + } + result.Code = 1 + result.Message = "获取成功" + var data = WxClient.ExecDBQuery(RequestData.Db, RequestData.Sql) + result.Data = data + c.JSON(http.StatusOK, result) +} + +// SendTxt 发送文本内容 +func SendTxt(c *gin.Context) { + var result Result + var RequestData struct { + Msg string `json:"msg"` + Receiver string `json:"receiver"` + Ates []string `json:"ates"` + } + if err := c.BindJSON(&RequestData); err != nil { + result.Code = 0 + result.Message = "json解析失败" + var data = make(map[string]interface{}) + result.Data = data + c.JSON(http.StatusOK, result) + return + } + result.Code = 1 + result.Message = "发送完成" + var data = WxClient.SendTxt(RequestData.Msg, RequestData.Receiver, RequestData.Ates) + result.Data = data + c.JSON(http.StatusOK, result) +} + +// SendIMG 发送图片 +func SendIMG(c *gin.Context) { + var result Result + var RequestData struct { + Path string `json:"path"` + Receiver string `json:"receiver"` + } + if err := c.BindJSON(&RequestData); err != nil { + result.Code = 0 + result.Message = "json解析失败" + var data = make(map[string]interface{}) + result.Data = data + c.JSON(http.StatusOK, result) + return + } + result.Code = 1 + result.Message = "发送完成" + var data = WxClient.SendIMG(RequestData.Path, RequestData.Receiver) + result.Data = data + c.JSON(http.StatusOK, result) +} + +// SendFile 发送文件 +func SendFile(c *gin.Context) { + var result Result + var RequestData struct { + Path string `json:"path"` + Receiver string `json:"receiver"` + } + if err := c.BindJSON(&RequestData); err != nil { + result.Code = 0 + result.Message = "json解析失败" + var data = make(map[string]interface{}) + result.Data = data + c.JSON(http.StatusOK, result) + return + } + result.Code = 1 + result.Message = "发送完成" + var data = WxClient.SendFile(RequestData.Path, RequestData.Receiver) + result.Data = data + c.JSON(http.StatusOK, result) +} + +// SendRichText 发送卡片消息 +func SendRichText(c *gin.Context) { + var result Result + var RequestData struct { + Name string `json:"name"` + Account string `json:"account"` + Title string `json:"title"` + Digest string `json:"digest"` + Url string `json:"url"` + ThumbUrl string `json:"thumb_url"` + Receiver string `json:"receiver"` + } + if err := c.BindJSON(&RequestData); err != nil { + result.Code = 0 + result.Message = "json解析失败" + var data = make(map[string]interface{}) + result.Data = data + c.JSON(http.StatusOK, result) + return + } + result.Code = 1 + result.Message = "发送完成" + var data = WxClient.SendRichText(RequestData.Name, RequestData.Account, RequestData.Title, RequestData.Digest, RequestData.Url, RequestData.ThumbUrl, RequestData.Receiver) + result.Data = data + c.JSON(http.StatusOK, result) +} + +// SendPat 发送拍一拍消息 +func SendPat(c *gin.Context) { + var result Result + var RequestData struct { + RoomId string `json:"room_id"` + WxId string `json:"wx_id"` + } + if err := c.BindJSON(&RequestData); err != nil { + result.Code = 0 + result.Message = "json解析失败" + var data = make(map[string]interface{}) + result.Data = data + c.JSON(http.StatusOK, result) + return + } + result.Code = 1 + result.Message = "发送完成" + var data = WxClient.SendPat(RequestData.RoomId, RequestData.WxId) + result.Data = data + c.JSON(http.StatusOK, result) +} + +// ForwardMsg 发送拍一拍消息 +func ForwardMsg(c *gin.Context) { + var result Result + var RequestData struct { + Id uint64 `json:"id"` + Receiver string `json:"receiver"` + } + if err := c.BindJSON(&RequestData); err != nil { + result.Code = 0 + result.Message = "json解析失败" + var data = make(map[string]interface{}) + result.Data = data + c.JSON(http.StatusOK, result) + return + } + result.Code = 1 + result.Message = "转发完成" + var data = WxClient.ForwardMsg(RequestData.Id, RequestData.Receiver) + result.Data = data + c.JSON(http.StatusOK, result) +} + +// SendEmotion 发送gif +func SendEmotion(c *gin.Context) { + var result Result + var RequestData struct { + Path string `json:"path"` + Receiver string `json:"receiver"` + } + if err := c.BindJSON(&RequestData); err != nil { + result.Code = 0 + result.Message = "json解析失败" + var data = make(map[string]interface{}) + result.Data = data + c.JSON(http.StatusOK, result) + return + } + result.Code = 1 + result.Message = "发送完成" + var data = WxClient.SendEmotion(RequestData.Path, RequestData.Receiver) + result.Data = data + c.JSON(http.StatusOK, result) +} + +// AcceptFriend 接受好友请求 +func AcceptFriend(c *gin.Context) { + var result Result + var RequestData struct { + V3 string `json:"v3"` + V4 string `json:"v4"` + Scene int32 `json:"scene"` + } + if err := c.BindJSON(&RequestData); err != nil { + result.Code = 0 + result.Message = "json解析失败" + var data = make(map[string]interface{}) + result.Data = data + c.JSON(http.StatusOK, result) + return + } + result.Code = 1 + result.Message = "接收成功" + var data = WxClient.AcceptFriend(RequestData.V3, RequestData.V4, RequestData.Scene) + result.Data = data + c.JSON(http.StatusOK, result) +} + +// AddChatroomMembers 添加群成员 +func AddChatroomMembers(c *gin.Context) { + var result Result + var RequestData struct { + RoomId string `json:"room_id"` + WxId []string `json:"wx_ids"` + } + if err := c.BindJSON(&RequestData); err != nil { + result.Code = 0 + result.Message = "json解析失败" + var data = make(map[string]interface{}) + result.Data = data + c.JSON(http.StatusOK, result) + return + } + result.Code = 1 + result.Message = "发送完成" + var data = WxClient.AddChatRoomMembers(RequestData.RoomId, RequestData.WxId) + result.Data = data + c.JSON(http.StatusOK, result) +} + +// DelChatRoomMembers 添加群成员 +func DelChatRoomMembers(c *gin.Context) { + var result Result + var RequestData struct { + RoomId string `json:"room_id"` + WxId []string `json:"wx_ids"` + } + if err := c.BindJSON(&RequestData); err != nil { + result.Code = 0 + result.Message = "json解析失败" + var data = make(map[string]interface{}) + result.Data = data + c.JSON(http.StatusOK, result) + return + } + result.Code = 1 + result.Message = "发送完成" + var data = WxClient.DelChatRoomMembers(RequestData.RoomId, RequestData.WxId) + result.Data = data + c.JSON(http.StatusOK, result) +} + +// InvChatRoomMembers 邀请群成员 +func InvChatRoomMembers(c *gin.Context) { + var result Result + var RequestData struct { + RoomId string `json:"room_id"` + WxId []string `json:"wx_ids"` + } + if err := c.BindJSON(&RequestData); err != nil { + result.Code = 0 + result.Message = "json解析失败" + var data = make(map[string]interface{}) + result.Data = data + c.JSON(http.StatusOK, result) + return + } + result.Code = 1 + result.Message = "发送完成" + var data = WxClient.InvChatRoomMembers(RequestData.RoomId, RequestData.WxId) + result.Data = data + c.JSON(http.StatusOK, result) +} + +// RefreshPyq 刷新朋友圈 +func RefreshPyq(c *gin.Context) { + var result Result + result.Code = 1 + result.Message = "发送完成" + var data = WxClient.RefreshPYQ() + result.Data = data + c.JSON(http.StatusOK, result) +} + +// DownloadAttach 下载附件 +func DownloadAttach(c *gin.Context) { + var result Result + var RequestData struct { + Id uint64 `json:"id"` + Thumb string `json:"thumb"` + Extra string `json:"extra"` + } + if err := c.BindJSON(&RequestData); err != nil { + result.Code = 0 + result.Message = "json解析失败" + var data = make(map[string]interface{}) + result.Data = data + c.JSON(http.StatusOK, result) + return + } + result.Code = 1 + result.Message = "下载附件调用成功" + var data = WxClient.DownloadAttach(RequestData.Id, RequestData.Thumb, RequestData.Extra) + result.Data = data + c.JSON(http.StatusOK, result) +} diff --git a/clients/go_wcf_http/app/robot.go b/clients/go_wcf_http/app/robot.go new file mode 100644 index 0000000..ec9c6cd --- /dev/null +++ b/clients/go_wcf_http/app/robot.go @@ -0,0 +1,88 @@ +package app + +/* +#cgo LDFLAGS: -L../ -lsdk +#include +#include + +extern int WxInitSDK(bool, int); +extern int WxDestroySDK(); +*/ +import "C" +import ( + "fmt" + "go_wechatFerry/wcf" + "time" +) + +var WxClient *wcf.Client + +// Message 组装成一个结构体展示消息 +type Message struct { + IsGroup bool `json:"is_group,omitempty"` + MessageId uint64 `json:"message_id,omitempty"` + Type uint32 `json:"type,omitempty"` + Ts uint32 `json:"ts,omitempty"` + RoomId string `json:"room_id,omitempty"` + Content string `json:"content,omitempty"` + WxId string `json:"wx_id,omitempty"` + Sign string `json:"sign,omitempty"` + Xml string `json:"xml,omitempty"` +} + +// WechatFerryInit 调用sdk.dll中的WxInitSdk 进行启动微信并注入 +func WechatFerryInit() { + + // 调试模式 端口 + initSuccess := C.WxInitSDK(C.bool(false), C.int(10086)) + if initSuccess == 0 { + fmt.Println("SDK 初始化成功") + } else { + fmt.Println("SDK 初始化失败") + } + time.Sleep(time.Millisecond * 5000) + // 连接服务器 + client, errs := wcf.NewWCF("") + if errs != nil { + return + } + // 一定要在这里判断是否登录成功 否则会导致用户列表获取失败 + for true { + if client.IsLogin() == true { + fmt.Println("登录成功...等待初始化中...") + time.Sleep(2000 * time.Millisecond) + break + } + time.Sleep(1000 * time.Millisecond) + } + WxClient = client + ContactsInit() + fmt.Println("初始化完成") +} + +// ContactsInit 通讯录初始化 +func ContactsInit() { + var contactsMap []map[string]string + contacts := WxClient.GetContacts() + for _, v := range contacts { + gender := "" + if v.Gender == 1 { + gender = "男" + } + if v.Gender == 2 { + gender = "女" + } + contactsMaps := map[string]string{ + "wxId": v.Wxid, + "code": v.Code, + "remark": v.Remark, + "name": v.Name, + "country": v.Country, + "province": v.Province, + "city": v.City, + "gender": gender, + } + contactsMap = append(contactsMap, contactsMaps) + } + WxClient.ContactsMap = contactsMap +} diff --git a/clients/go_wcf_http/go.mod b/clients/go_wcf_http/go.mod new file mode 100644 index 0000000..a12ae38 --- /dev/null +++ b/clients/go_wcf_http/go.mod @@ -0,0 +1,43 @@ +module go_wechatFerry + +go 1.21.5 + +require ( + github.com/danbai225/go-logs v0.3.2 + github.com/gin-gonic/gin v1.10.0 + github.com/go-resty/resty/v2 v2.13.1 + github.com/gorilla/websocket v1.5.0 + go.nanomsg.org/mangos/v3 v3.4.2 + google.golang.org/protobuf v1.34.2 +) + +require ( + github.com/Microsoft/go-winio v0.5.2 // indirect + github.com/bytedance/sonic v1.11.6 // indirect + github.com/bytedance/sonic/loader v0.1.1 // indirect + github.com/cloudwego/base64x v0.1.4 // indirect + github.com/cloudwego/iasm v0.2.0 // indirect + github.com/gabriel-vasile/mimetype v1.4.3 // indirect + github.com/gin-contrib/sse v0.1.0 // indirect + github.com/go-playground/locales v0.14.1 // indirect + github.com/go-playground/universal-translator v0.18.1 // indirect + github.com/go-playground/validator/v10 v10.20.0 // indirect + github.com/goccy/go-json v0.10.2 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/cpuid/v2 v2.2.7 // indirect + github.com/kpango/fastime v1.1.9 // indirect + github.com/kpango/glg v1.6.15 // indirect + github.com/leodido/go-urn v1.4.0 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect + github.com/ugorji/go/codec v1.2.12 // indirect + golang.org/x/arch v0.8.0 // indirect + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/clients/go_wcf_http/go.sum b/clients/go_wcf_http/go.sum new file mode 100644 index 0000000..648f5c6 --- /dev/null +++ b/clients/go_wcf_http/go.sum @@ -0,0 +1,181 @@ +github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0= +github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4= +github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM= +github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= +github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= +github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= +github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= +github.com/danbai225/go-logs v0.3.2 h1:CXMudhrC9rj5hb3tyZvn2APZStioB68QZauZeBPFkmU= +github.com/danbai225/go-logs v0.3.2/go.mod h1:hHxvTTAIkZ3a6XRksnN50gxkqGIlQ1XkNl2U//2erH0= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0= +github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk= +github.com/gdamore/optopia v0.2.0/go.mod h1:YKYEwo5C1Pa617H7NlPcmQXl+vG6YnSSNB44n8dNL0Q= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU= +github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= +github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= +github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= +github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8= +github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= +github.com/go-resty/resty/v2 v2.13.1 h1:x+LHXBI2nMB1vqndymf26quycC4aggYJ7DECYbiz03g= +github.com/go-resty/resty/v2 v2.13.1/go.mod h1:GznXlLxkq6Nh4sU59rPmUw3VtgpO3aS96ORAI6Q7d+0= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= +github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= +github.com/kpango/fastime v1.1.9 h1:xVQHcqyPt5M69DyFH7g1EPRns1YQNap9d5eLhl/Jy84= +github.com/kpango/fastime v1.1.9/go.mod h1:vyD7FnUn08zxY4b/QFBZVG+9EWMYsNl+QF0uE46urD4= +github.com/kpango/glg v1.6.15 h1:nw0xSxpSyrDIWHeb3dvnE08PW+SCbK+aYFETT75IeLA= +github.com/kpango/glg v1.6.15/go.mod h1:cmsc7Yeu8AS3wHLmN7bhwENXOpxfq+QoqxCIk2FneRk= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= +github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= +github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= +github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.nanomsg.org/mangos/v3 v3.4.2 h1:gHlopxjWvJcVCcUilQIsRQk9jdj6/HB7wrTiUN8Ki7Q= +go.nanomsg.org/mangos/v3 v3.4.2/go.mod h1:8+hjBMQub6HvXmuGvIq6hf19uxGQIjCofmc62lbedLA= +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc= +golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/clients/go_wcf_http/mian.go b/clients/go_wcf_http/mian.go new file mode 100644 index 0000000..40268d9 --- /dev/null +++ b/clients/go_wcf_http/mian.go @@ -0,0 +1,213 @@ +package main + +import ( + "encoding/json" + "fmt" + "github.com/gin-gonic/gin" + resty "github.com/go-resty/resty/v2" + "github.com/gorilla/websocket" + "go_wechatFerry/app" + "go_wechatFerry/wcf" + "log" + "net" + "net/http" + "os" + "os/signal" + "strings" + "time" +) + +func init() { + // 运行sdk.dll中的函数 + app.WechatFerryInit() +} + +func httpInit() { + // 1.创建路由 + r := gin.New() + gin.SetMode(gin.ReleaseMode) + // 2.绑定路由规则,执行的函数 + // gin.Context,封装了request和response + // 设置模板目录 + r.LoadHTMLGlob("templates/*") + r.GET("/", func(c *gin.Context) { + c.HTML(http.StatusOK, "wechatFerryGoHttp.html", gin.H{}) + }) + + r.POST("/testHttp", func(c *gin.Context) { + type RequestData struct { + Code int `json:"code"` + Message string `json:"message"` + Data struct { + IsGroup bool `json:"is_group"` + MessageId uint64 `json:"message_id"` + Type uint32 `json:"type"` + Ts uint32 `json:"ts"` + RoomId string `json:"room_id"` + Content string `json:"content"` + WxId string `json:"wx_id"` + Sign string `json:"sign"` + Xml string `json:"xml"` + } `json:"data"` + } + var requestData RequestData + c.BindJSON(&requestData) + fmt.Println(requestData) + }) + + // 设置消息回调地址 + r.POST("/api/SetMessageCallbackUrl", app.SetMessageCallbackUrl) + // 获取登录的wx_id + r.GET("/api/GetSelfWXID", app.GetSelfWXID) + // 获取自己的信息 + r.GET("/api/GetUserInfo", app.GetUserInfo) + // 获取消息类型列表 + r.GET("/api/GetMsgTypes", app.GetMsgTypes) + // 获取通讯录成功 + r.GET("/api/GetContacts", app.GetContacts) + // 获取全部群的群成员 + r.GET("/api/GetRoomMembersAll", app.GetRoomMembersAll) + // 获取单个群成员列表 + r.POST("/api/GetRoomMember", app.GetRoomMember) + // 获取数据库名 + r.GET("/api/GetDBNames", app.GetDBNames) + // 获取表 + r.POST("/api/GetDBTables", app.GetDBTables) + // 执行sql + r.POST("/api/ExecDBQuery", app.ExecDBQuery) + // 发送文本消息 + r.POST("/api/SendTxt", app.SendTxt) + // 发送图片 + r.POST("/api/SendIMG", app.SendIMG) + // 发送文件 + r.POST("/api/SendFile", app.SendFile) + // 发送卡片消息 + r.POST("/api/SendRichText", app.SendRichText) + // 发送拍一拍消息 + r.POST("/api/SendPat", app.SendPat) + // 转发消息 + r.POST("/api/ForwardMsg", app.ForwardMsg) + + // 发送emoji消息 + r.POST("/api/SendEmotion", app.SendEmotion) + // 接受好友请求 + r.POST("/api/AcceptFriend", app.AcceptFriend) + // 添加群成员 + r.POST("/api/AddChatroomMembers", app.AddChatroomMembers) + // 邀请群成员 + r.POST("/api/InvChatRoomMembers", app.InvChatRoomMembers) + // 删除群成员 + r.POST("/api/DelChatRoomMembers", app.DelChatRoomMembers) + // 刷新朋友圈 + r.POST("/api/RefreshPyq", app.RefreshPyq) + // 下载附件 + r.POST("/api/DownloadAttach", app.DownloadAttach) + + r.Run(":8000") +} + +func OnMsg() { + err := app.WxClient.OnMSG(func(msg *wcf.WxMsg) { + var message app.Message + message.IsGroup = msg.IsGroup + message.MessageId = msg.Id + message.Type = msg.Type + message.Ts = msg.Ts + message.RoomId = msg.Roomid + message.Content = msg.Content + message.Sign = msg.Sign + message.WxId = msg.Sender + message.Xml = msg.Xml + if app.WxClient.MessageCallbackUrl != "" { + var data = map[string]interface{}{ + "code": 0, + "message": "微信消息", + "data": message, + } + jsonData, _ := json.Marshal(data) + if strings.Contains(app.WxClient.MessageCallbackUrl, "tcp://") { + conn, err := net.Dial("tcp", app.WxClient.MessageCallbackUrl) + defer conn.Close() + if err != nil { + fmt.Println("err :", err) + } else { + _, err := conn.Write(jsonData) + fmt.Println("err :", err) + } + } + if strings.Contains(app.WxClient.MessageCallbackUrl, "udp://") { + addr, err := net.ResolveUDPAddr("udp", app.WxClient.MessageCallbackUrl) + if err != nil { + fmt.Println("Error resolving address:", err) + return + } + // 创建 UDP 连接 + conn, err := net.DialUDP("udp", nil, addr) + if err != nil { + fmt.Println("Error dialing:", err) + return + } + defer conn.Close() + // 发送消息 + _, err = conn.Write(jsonData) + if err != nil { + fmt.Println("Error sending message:", err) + return + } + } + if strings.Contains(app.WxClient.MessageCallbackUrl, "ws://") { + // 创建 WebSocket 连接 + conn, _, err := websocket.DefaultDialer.Dial(app.WxClient.MessageCallbackUrl, nil) + if err != nil { + log.Fatal("Dial error:", err) + } + defer conn.Close() + // 设置写入超时 + conn.SetWriteDeadline(time.Now().Add(5 * time.Second)) + // 发送消息 + err = conn.WriteMessage(websocket.TextMessage, jsonData) + if err != nil { + log.Fatal("Write error:", err) + } + } + if strings.Contains(app.WxClient.MessageCallbackUrl, "http") { + _, err := resty.New().SetTimeout(5 * time.Second).R().SetBody(jsonData).Post(app.WxClient.MessageCallbackUrl) + if err != nil { + fmt.Println("http消息发送失败") + } + } + } else { + // 植入我自己的功能接口 + fmt.Println("请设置消息回调的url") + } + }) + fmt.Println(err) + if err != nil { + fmt.Println(err) + OnMsg() + } else { + fmt.Println("为正常接受消息状态") + } +} + +// 入口 +func main() { + // 注册Ctrl+C信号处理函数 + signalChan := make(chan os.Signal, 1) + signal.Notify(signalChan, os.Interrupt) + go func() { + <-signalChan + // 在收到Ctrl+C信号时执行清理操作 + fmt.Println("\n感谢温柔的ctrl+c关闭,下次可直接运行程序,无需重启微信。") + app.WxClient.Close() + os.Exit(0) + }() + // 开启接收消息 + _ = app.WxClient.EnableRecvTxt() + // 先启动http服务器 下面的会阻塞 + go httpInit() + // 启动推送消息的地方 + go OnMsg() + // 防止主goroutine退出 + select {} +} diff --git a/clients/go_wcf_http/proto/wcf.proto b/clients/go_wcf_http/proto/wcf.proto new file mode 100644 index 0000000..97083dd --- /dev/null +++ b/clients/go_wcf_http/proto/wcf.proto @@ -0,0 +1,236 @@ +syntax = "proto3"; + +package wcf; +option java_package = "com.iamteer"; +option go_package = "../wcf"; + +enum Functions { + FUNC_RESERVED = 0x00; + FUNC_IS_LOGIN = 0x01; + FUNC_GET_SELF_WXID = 0x10; + FUNC_GET_MSG_TYPES = 0x11; + FUNC_GET_CONTACTS = 0x12; + FUNC_GET_DB_NAMES = 0x13; + FUNC_GET_DB_TABLES = 0x14; + FUNC_GET_USER_INFO = 0x15; + FUNC_GET_AUDIO_MSG = 0x16; + FUNC_SEND_TXT = 0x20; + FUNC_SEND_IMG = 0x21; + FUNC_SEND_FILE = 0x22; + FUNC_SEND_XML = 0x23; + FUNC_SEND_EMOTION = 0x24; + FUNC_SEND_RICH_TXT = 0x25; + FUNC_SEND_PAT_MSG = 0x26; + FUNC_FORWARD_MSG = 0x27; + FUNC_ENABLE_RECV_TXT = 0x30; + FUNC_DISABLE_RECV_TXT = 0x40; + FUNC_EXEC_DB_QUERY = 0x50; + FUNC_ACCEPT_FRIEND = 0x51; + FUNC_RECV_TRANSFER = 0x52; + FUNC_REFRESH_PYQ = 0x53; + FUNC_DOWNLOAD_ATTACH = 0x54; + FUNC_GET_CONTACT_INFO = 0x55; + FUNC_REVOKE_MSG = 0x56; + FUNC_DECRYPT_IMAGE = 0x60; + FUNC_EXEC_OCR = 0x61; + FUNC_ADD_ROOM_MEMBERS = 0x70; + FUNC_DEL_ROOM_MEMBERS = 0x71; + FUNC_INV_ROOM_MEMBERS = 0x72; +} + +message Request +{ + Functions func = 1; + oneof msg + { + Empty empty = 2; + string str = 3; + TextMsg txt = 4; + PathMsg file = 5; + DbQuery query = 6; + Verification v = 7; + MemberMgmt m = 8; // 群成员管理,添加、删除、邀请 + XmlMsg xml = 9; + DecPath dec = 10; + Transfer tf = 11; + uint64 ui64 = 12; // 64 位整数,通用 + bool flag = 13; + AttachMsg att = 14; + AudioMsg am = 15; + RichText rt = 16; + PatMsg pm = 17; + ForwardMsg fm = 18; + } +} + +message Response +{ + Functions func = 1; + oneof msg + { + int32 status = 2; // Int 状态,通用 + string str = 3; // 字符串 + WxMsg wxmsg = 4; // 微信消息 + MsgTypes types = 5; // 消息类型 + RpcContacts contacts = 6; // 联系人 + DbNames dbs = 7; // 数据库列表 + DbTables tables = 8; // 表列表 + DbRows rows = 9; // 行列表 + UserInfo ui = 10; // 个人信息 + OcrMsg ocr = 11; // OCR 结果 + }; +} + +message Empty { } + +message WxMsg +{ + bool is_self = 1; // 是否自己发送的 + bool is_group = 2; // 是否群消息 + uint64 id = 3; // 消息 id + uint32 type = 4; // 消息类型 + uint32 ts = 5; // 消息类型 + string roomid = 6; // 群 id(如果是群消息的话) + string content = 7; // 消息内容 + string sender = 8; // 消息发送者 + string sign = 9; // Sign + string thumb = 10; // 缩略图 + string extra = 11; // 附加内容 + string xml = 12; // 消息 xml +} + +message TextMsg +{ + string msg = 1; // 要发送的消息内容 + string receiver = 2; // 消息接收人,当为群时可@ + string aters = 3; // 要@的人列表,逗号分隔 +} + +message PathMsg +{ + string path = 1; // 要发送的图片的路径 + string receiver = 2; // 消息接收人 +} + +message XmlMsg +{ + string receiver = 1; // 消息接收人 + string content = 2; // xml 内容 + string path = 3; // 图片路径 + int32 type = 4; // 消息类型 +} + +message MsgTypes { map types = 1; } + +message RpcContact +{ + string wxid = 1; // 微信 id + string code = 2; // 微信号 + string remark = 3; // 备注 + string name = 4; // 微信昵称 + string country = 5; // 国家 + string province = 6; // 省/州 + string city = 7; // 城市 + int32 gender = 8; // 性别 +} +message RpcContacts { repeated RpcContact contacts = 1; } + +message DbNames { repeated string names = 1; } + +message DbTable +{ + string name = 1; // 表名 + string sql = 2; // 建表 SQL +} +message DbTables { repeated DbTable tables = 1; } + +message DbQuery +{ + string db = 1; // 目标数据库 + string sql = 2; // 查询 SQL +} + +message DbField +{ + int32 type = 1; // 字段类型 + string column = 2; // 字段名称 + bytes content = 3; // 字段内容 +} +message DbRow { repeated DbField fields = 1; } +message DbRows { repeated DbRow rows = 1; } + +message Verification +{ + string v3 = 1; // 加密的用户名 + string v4 = 2; // Ticket + int32 scene = 3; // 添加方式:17 名片,30 扫码 +} + +message MemberMgmt +{ + string roomid = 1; // 要加的群ID + string wxids = 2; // 要加群的人列表,逗号分隔 +} + +message UserInfo +{ + string wxid = 1; // 微信ID + string name = 2; // 昵称 + string mobile = 3; // 手机号 + string home = 4; // 文件/图片等父路径 +} + +message DecPath +{ + string src = 1; // 源路径 + string dst = 2; // 目标路径 +} + +message Transfer +{ + string wxid = 1; // 转账人 + string tfid = 2; // 转账id transferid + string taid = 3; // Transaction id +} + +message AttachMsg +{ + uint64 id = 1; // 消息 id + string thumb = 2; // 消息中的 thumb + string extra = 3; // 消息中的 extra +} + +message AudioMsg +{ + uint64 id = 1; // 语音消息 id + string dir = 2; // 存放目录 +} + +message RichText +{ + string name = 1; // 显示名字 + string account = 2; // 公众号 id + string title = 3; // 标题 + string digest = 4; // 摘要 + string url = 5; // 链接 + string thumburl = 6; // 缩略图 + string receiver = 7; // 接收人 +} + +message PatMsg +{ + string roomid = 1; // 群 id + string wxid = 2; // wxid +} + +message OcrMsg +{ + int32 status = 1; // 状态 + string result = 2; // 结果 +} + +message ForwardMsg +{ + uint64 id = 1; // 待转发消息 ID + string receiver = 2; // 转发接收目标,群为 roomId,个人为 wxid +} diff --git a/clients/go_wcf_http/templates/wechatFerryGoHttp.html b/clients/go_wcf_http/templates/wechatFerryGoHttp.html new file mode 100644 index 0000000..a653024 --- /dev/null +++ b/clients/go_wcf_http/templates/wechatFerryGoHttp.html @@ -0,0 +1,224 @@ + + + + + + Apifox 接口文档 + + + + + + + +
+ + + + + + diff --git a/clients/go_wcf_http/wcf/wcf.go b/clients/go_wcf_http/wcf/wcf.go new file mode 100644 index 0000000..76d5ec5 --- /dev/null +++ b/clients/go_wcf_http/wcf/wcf.go @@ -0,0 +1,605 @@ +package wcf + +import ( + logs "github.com/danbai225/go-logs" + "go.nanomsg.org/mangos/v3" + "go.nanomsg.org/mangos/v3/protocol" + "go.nanomsg.org/mangos/v3/protocol/pair1" + _ "go.nanomsg.org/mangos/v3/transport/all" + "google.golang.org/protobuf/proto" + "strconv" + "strings" +) + +type Client struct { + add string + socket protocol.Socket + RecvTxt bool + ContactsMap []map[string]string + MessageCallbackUrl string +} + +func (c *Client) conn() error { + socket, err := pair1.NewSocket() + if err != nil { + return err + } + err = socket.Dial(c.add) + if err != nil { + return err + } + c.socket = socket + return err +} + +func (c *Client) send(data []byte) error { + return c.socket.Send(data) +} + +func (c *Client) Recv() (*Response, error) { + msg := &Response{} + recv, err := c.socket.Recv() + if err != nil { + return msg, err + } + err = proto.Unmarshal(recv, msg) + return msg, err +} + +// Close 退出 +func (c *Client) Close() error { + c.DisableRecvTxt() + return c.socket.Close() +} + +// IsLogin 查看是否登录 +func (c *Client) IsLogin() bool { + err := c.send(genFunReq(Functions_FUNC_IS_LOGIN).build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + if recv.GetStatus() == 1 { + return true + } + return false +} + +// GetSelfWXID 获取登录的id +func (c *Client) GetSelfWXID() string { + err := c.send(genFunReq(Functions_FUNC_GET_SELF_WXID).build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetStr() +} + +// GetMsgTypes 获取消息类型 +func (c *Client) GetMsgTypes() map[int32]string { + err := c.send(genFunReq(Functions_FUNC_GET_MSG_TYPES).build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetTypes().GetTypes() +} + +// GetContacts 获取通讯录 +func (c *Client) GetContacts() []*RpcContact { + err := c.send(genFunReq(Functions_FUNC_GET_CONTACTS).build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetContacts().GetContacts() +} + +// GetDBNames 获取数据库名 +func (c *Client) GetDBNames() []string { + err := c.send(genFunReq(Functions_FUNC_GET_DB_NAMES).build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetDbs().Names +} + +// GetDBTables 获取表 +func (c *Client) GetDBTables(tab string) []*DbTable { + req := genFunReq(Functions_FUNC_GET_DB_TABLES) + str := &Request_Str{Str: tab} + req.Msg = str + err := c.send(req.build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetTables().GetTables() +} + +// ExecDBQuery 执行sql +func (c *Client) ExecDBQuery(db, sql string) []*DbRow { + req := genFunReq(Functions_FUNC_EXEC_DB_QUERY) + q := Request_Query{ + Query: &DbQuery{ + Db: db, + Sql: sql, + }, + } + req.Msg = &q + err := c.send(req.build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetRows().GetRows() +} + +// AcceptFriend 接收好友请求 +func (c *Client) AcceptFriend(v3, v4 string, scene int32) int32 { + req := genFunReq(Functions_FUNC_ACCEPT_FRIEND) + q := Request_V{ + V: &Verification{ + V3: v3, + V4: v4, + Scene: scene, + }} + + req.Msg = &q + err := c.send(req.build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetStatus() +} + +func (c *Client) AddChatroomMembers(roomID, wxIDs string) int32 { + req := genFunReq(Functions_FUNC_ADD_ROOM_MEMBERS) + q := Request_M{ + M: &MemberMgmt{Roomid: roomID, Wxids: wxIDs}, + } + req.Msg = &q + err := c.send(req.build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetStatus() +} + +// ReceiveTransfer 接收转账 +func (c *Client) ReceiveTransfer(wxid, tfid, taid string) int32 { + req := genFunReq(Functions_FUNC_RECV_TRANSFER) + q := Request_Tf{ + Tf: &Transfer{ + Wxid: wxid, + Tfid: tfid, + Taid: taid, + }, + } + req.Msg = &q + err := c.send(req.build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetStatus() +} + +// RefreshPYQ 刷新朋友圈 +func (c *Client) RefreshPYQ() int32 { + req := genFunReq(Functions_FUNC_REFRESH_PYQ) + q := Request_Ui64{ + Ui64: 0, + } + req.Msg = &q + err := c.send(req.build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetStatus() +} + +// DecryptImage 解密图片 加密路径,解密路径 +func (c *Client) DecryptImage(src, dst string) int32 { + req := genFunReq(Functions_FUNC_DECRYPT_IMAGE) + q := Request_Dec{ + Dec: &DecPath{Src: src, Dst: dst}, + } + req.Msg = &q + err := c.send(req.build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetStatus() +} + +// AddChatRoomMembers 添加群成员 +func (c *Client) AddChatRoomMembers(roomId string, wxIds []string) int32 { + req := genFunReq(Functions_FUNC_ADD_ROOM_MEMBERS) + q := Request_M{ + M: &MemberMgmt{Roomid: roomId, + Wxids: strings.Join(wxIds, ",")}, + } + req.Msg = &q + err := c.send(req.build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetStatus() +} + +// InvChatRoomMembers 邀请群成员 +func (c *Client) InvChatRoomMembers(roomId string, wxIds []string) int32 { + req := genFunReq(Functions_FUNC_INV_ROOM_MEMBERS) + q := Request_M{ + M: &MemberMgmt{Roomid: roomId, + Wxids: strings.Join(wxIds, ",")}, + } + req.Msg = &q + err := c.send(req.build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetStatus() +} + +// DelChatRoomMembers 删除群成员 +func (c *Client) DelChatRoomMembers(roomId string, wxIds []string) int32 { + req := genFunReq(Functions_FUNC_DEL_ROOM_MEMBERS) + q := Request_M{ + M: &MemberMgmt{Roomid: roomId, + Wxids: strings.Join(wxIds, ",")}, + } + req.Msg = &q + err := c.send(req.build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetStatus() +} + +// GetUserInfo 获取自己的信息 +func (c *Client) GetUserInfo() *UserInfo { + err := c.send(genFunReq(Functions_FUNC_GET_USER_INFO).build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetUi() +} + +// SendTxt 发送文本内容 +func (c *Client) SendTxt(msg string, receiver string, ates []string) int32 { + req := genFunReq(Functions_FUNC_SEND_TXT) + req.Msg = &Request_Txt{ + Txt: &TextMsg{ + Msg: msg, + Receiver: receiver, + Aters: strings.Join(ates, ","), + }, + } + err := c.send(req.build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetStatus() +} + +// ForwardMsg 转发消息 +func (c *Client) ForwardMsg(Id uint64, receiver string) int32 { + req := genFunReq(Functions_FUNC_FORWARD_MSG) + req.Msg = &Request_Fm{ + Fm: &ForwardMsg{ + Id: Id, + Receiver: receiver, + }, + } + err := c.send(req.build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetStatus() +} + +// SendIMG 发送图片 +func (c *Client) SendIMG(path string, receiver string) int32 { + req := genFunReq(Functions_FUNC_SEND_IMG) + req.Msg = &Request_File{ + File: &PathMsg{ + Path: path, + Receiver: receiver, + }, + } + err := c.send(req.build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetStatus() +} + +// SendFile 发送文件 +func (c *Client) SendFile(path string, receiver string) int32 { + req := genFunReq(Functions_FUNC_SEND_FILE) + req.Msg = &Request_File{ + File: &PathMsg{ + Path: path, + Receiver: receiver, + }, + } + err := c.send(req.build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetStatus() +} + +// SendRichText 发送卡片消息 +func (c *Client) SendRichText(name string, account string, title string, digest string, url string, thumburl string, receiver string) int32 { + req := genFunReq(Functions_FUNC_SEND_RICH_TXT) + req.Msg = &Request_Rt{ + Rt: &RichText{ + Name: name, + Account: account, + Title: title, + Digest: digest, + Url: url, + Thumburl: thumburl, + Receiver: receiver, + }, + } + err := c.send(req.build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetStatus() +} + +// SendXml 发送xml数据 +func (c *Client) SendXml(path, content, receiver string, Type int32) int32 { + req := genFunReq(Functions_FUNC_SEND_XML) + req.Msg = &Request_Xml{ + Xml: &XmlMsg{ + Receiver: receiver, + Content: content, + Path: path, + Type: Type, + }, + } + err := c.send(req.build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetStatus() +} + +// SendEmotion 发送emoji +func (c *Client) SendEmotion(path, receiver string) int32 { + req := genFunReq(Functions_FUNC_SEND_EMOTION) + req.Msg = &Request_File{ + File: &PathMsg{ + Path: path, + Receiver: receiver, + }, + } + err := c.send(req.build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetStatus() +} + +// SendPat 发送拍一拍消息 +func (c *Client) SendPat(roomId, wxId string) int32 { + req := genFunReq(Functions_FUNC_SEND_PAT_MSG) + req.Msg = &Request_Pm{ + Pm: &PatMsg{ + Roomid: roomId, + Wxid: wxId, + }, + } + err := c.send(req.build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetStatus() +} + +// DownloadAttach 下载附件 +func (c *Client) DownloadAttach(id uint64, thumb, extra string) int32 { + req := genFunReq(Functions_FUNC_SEND_PAT_MSG) + req.Msg = &Request_Att{ + Att: &AttachMsg{ + Id: id, + Thumb: thumb, + Extra: extra, + }, + } + err := c.send(req.build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + return recv.GetStatus() +} + +// EnableRecvTxt 开启接收数据 +func (c *Client) EnableRecvTxt() int32 { + req := genFunReq(Functions_FUNC_ENABLE_RECV_TXT) + req.Msg = &Request_Flag{ + Flag: true, + } + err := c.send(req.build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + c.RecvTxt = true + return recv.GetStatus() +} + +// DisableRecvTxt 关闭接收消息 +func (c *Client) DisableRecvTxt() int32 { + err := c.send(genFunReq(Functions_FUNC_DISABLE_RECV_TXT).build()) + if err != nil { + logs.Err(err) + } + recv, err := c.Recv() + if err != nil { + logs.Err(err) + } + c.RecvTxt = false + return recv.GetStatus() +} + +// OnMSG 接收消息 +func (c *Client) OnMSG(f func(msg *WxMsg)) error { + socket, err := pair1.NewSocket() + if err != nil { + return err + } + _ = socket.SetOption(mangos.OptionRecvDeadline, 5000) + _ = socket.SetOption(mangos.OptionSendDeadline, 5000) + err = socket.Dial(addPort(c.add)) + if err != nil { + return err + } + defer socket.Close() + for c.RecvTxt { + msg := &Response{} + recv, err := socket.Recv() + if err != nil { + return err + } + _ = proto.Unmarshal(recv, msg) + go f(msg.GetWxmsg()) + + } + return err +} + +// NewWCF 连接 +func NewWCF(add string) (*Client, error) { + if add == "" { + add = "tcp://127.0.0.1:10086" + } + client := &Client{add: add} + err := client.conn() + return client, err +} + +type cmdMSG struct { + *Request +} + +func (c *cmdMSG) build() []byte { + marshal, _ := proto.Marshal(c) + return marshal +} + +func genFunReq(fun Functions) *cmdMSG { + return &cmdMSG{ + &Request{Func: fun, + Msg: nil}, + } +} + +func addPort(add string) string { + parts := strings.Split(add, ":") + port, _ := strconv.Atoi(parts[2]) + newPort := port + 1 + return parts[0] + ":" + parts[1] + ":" + strconv.Itoa(newPort) +} diff --git a/clients/go_wcf_http/wcf/wcf.pb.go b/clients/go_wcf_http/wcf/wcf.pb.go new file mode 100644 index 0000000..2d5c1c3 --- /dev/null +++ b/clients/go_wcf_http/wcf/wcf.pb.go @@ -0,0 +1,2982 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.12 +// source: wcf.proto + +package wcf + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Functions int32 + +const ( + Functions_FUNC_RESERVED Functions = 0 + Functions_FUNC_IS_LOGIN Functions = 1 + Functions_FUNC_GET_SELF_WXID Functions = 16 + Functions_FUNC_GET_MSG_TYPES Functions = 17 + Functions_FUNC_GET_CONTACTS Functions = 18 + Functions_FUNC_GET_DB_NAMES Functions = 19 + Functions_FUNC_GET_DB_TABLES Functions = 20 + Functions_FUNC_GET_USER_INFO Functions = 21 + Functions_FUNC_GET_AUDIO_MSG Functions = 22 + Functions_FUNC_SEND_TXT Functions = 32 + Functions_FUNC_SEND_IMG Functions = 33 + Functions_FUNC_SEND_FILE Functions = 34 + Functions_FUNC_SEND_XML Functions = 35 + Functions_FUNC_SEND_EMOTION Functions = 36 + Functions_FUNC_SEND_RICH_TXT Functions = 37 + Functions_FUNC_SEND_PAT_MSG Functions = 38 + Functions_FUNC_FORWARD_MSG Functions = 39 + Functions_FUNC_ENABLE_RECV_TXT Functions = 48 + Functions_FUNC_DISABLE_RECV_TXT Functions = 64 + Functions_FUNC_EXEC_DB_QUERY Functions = 80 + Functions_FUNC_ACCEPT_FRIEND Functions = 81 + Functions_FUNC_RECV_TRANSFER Functions = 82 + Functions_FUNC_REFRESH_PYQ Functions = 83 + Functions_FUNC_DOWNLOAD_ATTACH Functions = 84 + Functions_FUNC_GET_CONTACT_INFO Functions = 85 + Functions_FUNC_REVOKE_MSG Functions = 86 + Functions_FUNC_DECRYPT_IMAGE Functions = 96 + Functions_FUNC_EXEC_OCR Functions = 97 + Functions_FUNC_ADD_ROOM_MEMBERS Functions = 112 + Functions_FUNC_DEL_ROOM_MEMBERS Functions = 113 + Functions_FUNC_INV_ROOM_MEMBERS Functions = 114 +) + +// Enum value maps for Functions. +var ( + Functions_name = map[int32]string{ + 0: "FUNC_RESERVED", + 1: "FUNC_IS_LOGIN", + 16: "FUNC_GET_SELF_WXID", + 17: "FUNC_GET_MSG_TYPES", + 18: "FUNC_GET_CONTACTS", + 19: "FUNC_GET_DB_NAMES", + 20: "FUNC_GET_DB_TABLES", + 21: "FUNC_GET_USER_INFO", + 22: "FUNC_GET_AUDIO_MSG", + 32: "FUNC_SEND_TXT", + 33: "FUNC_SEND_IMG", + 34: "FUNC_SEND_FILE", + 35: "FUNC_SEND_XML", + 36: "FUNC_SEND_EMOTION", + 37: "FUNC_SEND_RICH_TXT", + 38: "FUNC_SEND_PAT_MSG", + 39: "FUNC_FORWARD_MSG", + 48: "FUNC_ENABLE_RECV_TXT", + 64: "FUNC_DISABLE_RECV_TXT", + 80: "FUNC_EXEC_DB_QUERY", + 81: "FUNC_ACCEPT_FRIEND", + 82: "FUNC_RECV_TRANSFER", + 83: "FUNC_REFRESH_PYQ", + 84: "FUNC_DOWNLOAD_ATTACH", + 85: "FUNC_GET_CONTACT_INFO", + 86: "FUNC_REVOKE_MSG", + 96: "FUNC_DECRYPT_IMAGE", + 97: "FUNC_EXEC_OCR", + 112: "FUNC_ADD_ROOM_MEMBERS", + 113: "FUNC_DEL_ROOM_MEMBERS", + 114: "FUNC_INV_ROOM_MEMBERS", + } + Functions_value = map[string]int32{ + "FUNC_RESERVED": 0, + "FUNC_IS_LOGIN": 1, + "FUNC_GET_SELF_WXID": 16, + "FUNC_GET_MSG_TYPES": 17, + "FUNC_GET_CONTACTS": 18, + "FUNC_GET_DB_NAMES": 19, + "FUNC_GET_DB_TABLES": 20, + "FUNC_GET_USER_INFO": 21, + "FUNC_GET_AUDIO_MSG": 22, + "FUNC_SEND_TXT": 32, + "FUNC_SEND_IMG": 33, + "FUNC_SEND_FILE": 34, + "FUNC_SEND_XML": 35, + "FUNC_SEND_EMOTION": 36, + "FUNC_SEND_RICH_TXT": 37, + "FUNC_SEND_PAT_MSG": 38, + "FUNC_FORWARD_MSG": 39, + "FUNC_ENABLE_RECV_TXT": 48, + "FUNC_DISABLE_RECV_TXT": 64, + "FUNC_EXEC_DB_QUERY": 80, + "FUNC_ACCEPT_FRIEND": 81, + "FUNC_RECV_TRANSFER": 82, + "FUNC_REFRESH_PYQ": 83, + "FUNC_DOWNLOAD_ATTACH": 84, + "FUNC_GET_CONTACT_INFO": 85, + "FUNC_REVOKE_MSG": 86, + "FUNC_DECRYPT_IMAGE": 96, + "FUNC_EXEC_OCR": 97, + "FUNC_ADD_ROOM_MEMBERS": 112, + "FUNC_DEL_ROOM_MEMBERS": 113, + "FUNC_INV_ROOM_MEMBERS": 114, + } +) + +func (x Functions) Enum() *Functions { + p := new(Functions) + *p = x + return p +} + +func (x Functions) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Functions) Descriptor() protoreflect.EnumDescriptor { + return file_wcf_proto_enumTypes[0].Descriptor() +} + +func (Functions) Type() protoreflect.EnumType { + return &file_wcf_proto_enumTypes[0] +} + +func (x Functions) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Functions.Descriptor instead. +func (Functions) EnumDescriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{0} +} + +type Request struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Func Functions `protobuf:"varint,1,opt,name=func,proto3,enum=wcf.Functions" json:"func,omitempty"` + // Types that are assignable to Msg: + // + // *Request_Empty + // *Request_Str + // *Request_Txt + // *Request_File + // *Request_Query + // *Request_V + // *Request_M + // *Request_Xml + // *Request_Dec + // *Request_Tf + // *Request_Ui64 + // *Request_Flag + // *Request_Att + // *Request_Am + // *Request_Rt + // *Request_Pm + // *Request_Fm + Msg isRequest_Msg `protobuf_oneof:"msg"` +} + +func (x *Request) Reset() { + *x = Request{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Request) ProtoMessage() {} + +func (x *Request) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Request.ProtoReflect.Descriptor instead. +func (*Request) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{0} +} + +func (x *Request) GetFunc() Functions { + if x != nil { + return x.Func + } + return Functions_FUNC_RESERVED +} + +func (m *Request) GetMsg() isRequest_Msg { + if m != nil { + return m.Msg + } + return nil +} + +func (x *Request) GetEmpty() *Empty { + if x, ok := x.GetMsg().(*Request_Empty); ok { + return x.Empty + } + return nil +} + +func (x *Request) GetStr() string { + if x, ok := x.GetMsg().(*Request_Str); ok { + return x.Str + } + return "" +} + +func (x *Request) GetTxt() *TextMsg { + if x, ok := x.GetMsg().(*Request_Txt); ok { + return x.Txt + } + return nil +} + +func (x *Request) GetFile() *PathMsg { + if x, ok := x.GetMsg().(*Request_File); ok { + return x.File + } + return nil +} + +func (x *Request) GetQuery() *DbQuery { + if x, ok := x.GetMsg().(*Request_Query); ok { + return x.Query + } + return nil +} + +func (x *Request) GetV() *Verification { + if x, ok := x.GetMsg().(*Request_V); ok { + return x.V + } + return nil +} + +func (x *Request) GetM() *MemberMgmt { + if x, ok := x.GetMsg().(*Request_M); ok { + return x.M + } + return nil +} + +func (x *Request) GetXml() *XmlMsg { + if x, ok := x.GetMsg().(*Request_Xml); ok { + return x.Xml + } + return nil +} + +func (x *Request) GetDec() *DecPath { + if x, ok := x.GetMsg().(*Request_Dec); ok { + return x.Dec + } + return nil +} + +func (x *Request) GetTf() *Transfer { + if x, ok := x.GetMsg().(*Request_Tf); ok { + return x.Tf + } + return nil +} + +func (x *Request) GetUi64() uint64 { + if x, ok := x.GetMsg().(*Request_Ui64); ok { + return x.Ui64 + } + return 0 +} + +func (x *Request) GetFlag() bool { + if x, ok := x.GetMsg().(*Request_Flag); ok { + return x.Flag + } + return false +} + +func (x *Request) GetAtt() *AttachMsg { + if x, ok := x.GetMsg().(*Request_Att); ok { + return x.Att + } + return nil +} + +func (x *Request) GetAm() *AudioMsg { + if x, ok := x.GetMsg().(*Request_Am); ok { + return x.Am + } + return nil +} + +func (x *Request) GetRt() *RichText { + if x, ok := x.GetMsg().(*Request_Rt); ok { + return x.Rt + } + return nil +} + +func (x *Request) GetPm() *PatMsg { + if x, ok := x.GetMsg().(*Request_Pm); ok { + return x.Pm + } + return nil +} + +func (x *Request) GetFm() *ForwardMsg { + if x, ok := x.GetMsg().(*Request_Fm); ok { + return x.Fm + } + return nil +} + +type isRequest_Msg interface { + isRequest_Msg() +} + +type Request_Empty struct { + Empty *Empty `protobuf:"bytes,2,opt,name=empty,proto3,oneof"` +} + +type Request_Str struct { + Str string `protobuf:"bytes,3,opt,name=str,proto3,oneof"` +} + +type Request_Txt struct { + Txt *TextMsg `protobuf:"bytes,4,opt,name=txt,proto3,oneof"` +} + +type Request_File struct { + File *PathMsg `protobuf:"bytes,5,opt,name=file,proto3,oneof"` +} + +type Request_Query struct { + Query *DbQuery `protobuf:"bytes,6,opt,name=query,proto3,oneof"` +} + +type Request_V struct { + V *Verification `protobuf:"bytes,7,opt,name=v,proto3,oneof"` +} + +type Request_M struct { + M *MemberMgmt `protobuf:"bytes,8,opt,name=m,proto3,oneof"` // 群成员管理,添加、删除、邀请 +} + +type Request_Xml struct { + Xml *XmlMsg `protobuf:"bytes,9,opt,name=xml,proto3,oneof"` +} + +type Request_Dec struct { + Dec *DecPath `protobuf:"bytes,10,opt,name=dec,proto3,oneof"` +} + +type Request_Tf struct { + Tf *Transfer `protobuf:"bytes,11,opt,name=tf,proto3,oneof"` +} + +type Request_Ui64 struct { + Ui64 uint64 `protobuf:"varint,12,opt,name=ui64,proto3,oneof"` // 64 位整数,通用 +} + +type Request_Flag struct { + Flag bool `protobuf:"varint,13,opt,name=flag,proto3,oneof"` +} + +type Request_Att struct { + Att *AttachMsg `protobuf:"bytes,14,opt,name=att,proto3,oneof"` +} + +type Request_Am struct { + Am *AudioMsg `protobuf:"bytes,15,opt,name=am,proto3,oneof"` +} + +type Request_Rt struct { + Rt *RichText `protobuf:"bytes,16,opt,name=rt,proto3,oneof"` +} + +type Request_Pm struct { + Pm *PatMsg `protobuf:"bytes,17,opt,name=pm,proto3,oneof"` +} + +type Request_Fm struct { + Fm *ForwardMsg `protobuf:"bytes,18,opt,name=fm,proto3,oneof"` +} + +func (*Request_Empty) isRequest_Msg() {} + +func (*Request_Str) isRequest_Msg() {} + +func (*Request_Txt) isRequest_Msg() {} + +func (*Request_File) isRequest_Msg() {} + +func (*Request_Query) isRequest_Msg() {} + +func (*Request_V) isRequest_Msg() {} + +func (*Request_M) isRequest_Msg() {} + +func (*Request_Xml) isRequest_Msg() {} + +func (*Request_Dec) isRequest_Msg() {} + +func (*Request_Tf) isRequest_Msg() {} + +func (*Request_Ui64) isRequest_Msg() {} + +func (*Request_Flag) isRequest_Msg() {} + +func (*Request_Att) isRequest_Msg() {} + +func (*Request_Am) isRequest_Msg() {} + +func (*Request_Rt) isRequest_Msg() {} + +func (*Request_Pm) isRequest_Msg() {} + +func (*Request_Fm) isRequest_Msg() {} + +type Response struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Func Functions `protobuf:"varint,1,opt,name=func,proto3,enum=wcf.Functions" json:"func,omitempty"` + // Types that are assignable to Msg: + // + // *Response_Status + // *Response_Str + // *Response_Wxmsg + // *Response_Types + // *Response_Contacts + // *Response_Dbs + // *Response_Tables + // *Response_Rows + // *Response_Ui + // *Response_Ocr + Msg isResponse_Msg `protobuf_oneof:"msg"` +} + +func (x *Response) Reset() { + *x = Response{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Response) ProtoMessage() {} + +func (x *Response) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Response.ProtoReflect.Descriptor instead. +func (*Response) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{1} +} + +func (x *Response) GetFunc() Functions { + if x != nil { + return x.Func + } + return Functions_FUNC_RESERVED +} + +func (m *Response) GetMsg() isResponse_Msg { + if m != nil { + return m.Msg + } + return nil +} + +func (x *Response) GetStatus() int32 { + if x, ok := x.GetMsg().(*Response_Status); ok { + return x.Status + } + return 0 +} + +func (x *Response) GetStr() string { + if x, ok := x.GetMsg().(*Response_Str); ok { + return x.Str + } + return "" +} + +func (x *Response) GetWxmsg() *WxMsg { + if x, ok := x.GetMsg().(*Response_Wxmsg); ok { + return x.Wxmsg + } + return nil +} + +func (x *Response) GetTypes() *MsgTypes { + if x, ok := x.GetMsg().(*Response_Types); ok { + return x.Types + } + return nil +} + +func (x *Response) GetContacts() *RpcContacts { + if x, ok := x.GetMsg().(*Response_Contacts); ok { + return x.Contacts + } + return nil +} + +func (x *Response) GetDbs() *DbNames { + if x, ok := x.GetMsg().(*Response_Dbs); ok { + return x.Dbs + } + return nil +} + +func (x *Response) GetTables() *DbTables { + if x, ok := x.GetMsg().(*Response_Tables); ok { + return x.Tables + } + return nil +} + +func (x *Response) GetRows() *DbRows { + if x, ok := x.GetMsg().(*Response_Rows); ok { + return x.Rows + } + return nil +} + +func (x *Response) GetUi() *UserInfo { + if x, ok := x.GetMsg().(*Response_Ui); ok { + return x.Ui + } + return nil +} + +func (x *Response) GetOcr() *OcrMsg { + if x, ok := x.GetMsg().(*Response_Ocr); ok { + return x.Ocr + } + return nil +} + +type isResponse_Msg interface { + isResponse_Msg() +} + +type Response_Status struct { + Status int32 `protobuf:"varint,2,opt,name=status,proto3,oneof"` // Int 状态,通用 +} + +type Response_Str struct { + Str string `protobuf:"bytes,3,opt,name=str,proto3,oneof"` // 字符串 +} + +type Response_Wxmsg struct { + Wxmsg *WxMsg `protobuf:"bytes,4,opt,name=wxmsg,proto3,oneof"` // 微信消息 +} + +type Response_Types struct { + Types *MsgTypes `protobuf:"bytes,5,opt,name=types,proto3,oneof"` // 消息类型 +} + +type Response_Contacts struct { + Contacts *RpcContacts `protobuf:"bytes,6,opt,name=contacts,proto3,oneof"` // 联系人 +} + +type Response_Dbs struct { + Dbs *DbNames `protobuf:"bytes,7,opt,name=dbs,proto3,oneof"` // 数据库列表 +} + +type Response_Tables struct { + Tables *DbTables `protobuf:"bytes,8,opt,name=tables,proto3,oneof"` // 表列表 +} + +type Response_Rows struct { + Rows *DbRows `protobuf:"bytes,9,opt,name=rows,proto3,oneof"` // 行列表 +} + +type Response_Ui struct { + Ui *UserInfo `protobuf:"bytes,10,opt,name=ui,proto3,oneof"` // 个人信息 +} + +type Response_Ocr struct { + Ocr *OcrMsg `protobuf:"bytes,11,opt,name=ocr,proto3,oneof"` // OCR 结果 +} + +func (*Response_Status) isResponse_Msg() {} + +func (*Response_Str) isResponse_Msg() {} + +func (*Response_Wxmsg) isResponse_Msg() {} + +func (*Response_Types) isResponse_Msg() {} + +func (*Response_Contacts) isResponse_Msg() {} + +func (*Response_Dbs) isResponse_Msg() {} + +func (*Response_Tables) isResponse_Msg() {} + +func (*Response_Rows) isResponse_Msg() {} + +func (*Response_Ui) isResponse_Msg() {} + +func (*Response_Ocr) isResponse_Msg() {} + +type Empty struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Empty) Reset() { + *x = Empty{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Empty) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Empty) ProtoMessage() {} + +func (x *Empty) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Empty.ProtoReflect.Descriptor instead. +func (*Empty) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{2} +} + +type WxMsg struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsSelf bool `protobuf:"varint,1,opt,name=is_self,json=isSelf,proto3" json:"is_self,omitempty"` // 是否自己发送的 + IsGroup bool `protobuf:"varint,2,opt,name=is_group,json=isGroup,proto3" json:"is_group,omitempty"` // 是否群消息 + Id uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` // 消息 id + Type uint32 `protobuf:"varint,4,opt,name=type,proto3" json:"type,omitempty"` // 消息类型 + Ts uint32 `protobuf:"varint,5,opt,name=ts,proto3" json:"ts,omitempty"` // 消息类型 + Roomid string `protobuf:"bytes,6,opt,name=roomid,proto3" json:"roomid,omitempty"` // 群 id(如果是群消息的话) + Content string `protobuf:"bytes,7,opt,name=content,proto3" json:"content,omitempty"` // 消息内容 + Sender string `protobuf:"bytes,8,opt,name=sender,proto3" json:"sender,omitempty"` // 消息发送者 + Sign string `protobuf:"bytes,9,opt,name=sign,proto3" json:"sign,omitempty"` // Sign + Thumb string `protobuf:"bytes,10,opt,name=thumb,proto3" json:"thumb,omitempty"` // 缩略图 + Extra string `protobuf:"bytes,11,opt,name=extra,proto3" json:"extra,omitempty"` // 附加内容 + Xml string `protobuf:"bytes,12,opt,name=xml,proto3" json:"xml,omitempty"` // 消息 xml +} + +func (x *WxMsg) Reset() { + *x = WxMsg{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WxMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WxMsg) ProtoMessage() {} + +func (x *WxMsg) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WxMsg.ProtoReflect.Descriptor instead. +func (*WxMsg) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{3} +} + +func (x *WxMsg) GetIsSelf() bool { + if x != nil { + return x.IsSelf + } + return false +} + +func (x *WxMsg) GetIsGroup() bool { + if x != nil { + return x.IsGroup + } + return false +} + +func (x *WxMsg) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *WxMsg) GetType() uint32 { + if x != nil { + return x.Type + } + return 0 +} + +func (x *WxMsg) GetTs() uint32 { + if x != nil { + return x.Ts + } + return 0 +} + +func (x *WxMsg) GetRoomid() string { + if x != nil { + return x.Roomid + } + return "" +} + +func (x *WxMsg) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +func (x *WxMsg) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *WxMsg) GetSign() string { + if x != nil { + return x.Sign + } + return "" +} + +func (x *WxMsg) GetThumb() string { + if x != nil { + return x.Thumb + } + return "" +} + +func (x *WxMsg) GetExtra() string { + if x != nil { + return x.Extra + } + return "" +} + +func (x *WxMsg) GetXml() string { + if x != nil { + return x.Xml + } + return "" +} + +type TextMsg struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // 要发送的消息内容 + Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` // 消息接收人,当为群时可@ + Aters string `protobuf:"bytes,3,opt,name=aters,proto3" json:"aters,omitempty"` // 要@的人列表,逗号分隔 +} + +func (x *TextMsg) Reset() { + *x = TextMsg{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TextMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextMsg) ProtoMessage() {} + +func (x *TextMsg) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TextMsg.ProtoReflect.Descriptor instead. +func (*TextMsg) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{4} +} + +func (x *TextMsg) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +func (x *TextMsg) GetReceiver() string { + if x != nil { + return x.Receiver + } + return "" +} + +func (x *TextMsg) GetAters() string { + if x != nil { + return x.Aters + } + return "" +} + +type PathMsg struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // 要发送的图片的路径 + Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` // 消息接收人 +} + +func (x *PathMsg) Reset() { + *x = PathMsg{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PathMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PathMsg) ProtoMessage() {} + +func (x *PathMsg) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PathMsg.ProtoReflect.Descriptor instead. +func (*PathMsg) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{5} +} + +func (x *PathMsg) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *PathMsg) GetReceiver() string { + if x != nil { + return x.Receiver + } + return "" +} + +type XmlMsg struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Receiver string `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"` // 消息接收人 + Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` // xml 内容 + Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` // 图片路径 + Type int32 `protobuf:"varint,4,opt,name=type,proto3" json:"type,omitempty"` // 消息类型 +} + +func (x *XmlMsg) Reset() { + *x = XmlMsg{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *XmlMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*XmlMsg) ProtoMessage() {} + +func (x *XmlMsg) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use XmlMsg.ProtoReflect.Descriptor instead. +func (*XmlMsg) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{6} +} + +func (x *XmlMsg) GetReceiver() string { + if x != nil { + return x.Receiver + } + return "" +} + +func (x *XmlMsg) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +func (x *XmlMsg) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *XmlMsg) GetType() int32 { + if x != nil { + return x.Type + } + return 0 +} + +type MsgTypes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Types map[int32]string `protobuf:"bytes,1,rep,name=types,proto3" json:"types,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *MsgTypes) Reset() { + *x = MsgTypes{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgTypes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgTypes) ProtoMessage() {} + +func (x *MsgTypes) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MsgTypes.ProtoReflect.Descriptor instead. +func (*MsgTypes) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{7} +} + +func (x *MsgTypes) GetTypes() map[int32]string { + if x != nil { + return x.Types + } + return nil +} + +type RpcContact struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Wxid string `protobuf:"bytes,1,opt,name=wxid,proto3" json:"wxid"` // 微信 id + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code"` // 微信号 + Remark string `protobuf:"bytes,3,opt,name=remark,proto3" json:"remark"` // 备注 + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name"` // 微信昵称 + Country string `protobuf:"bytes,5,opt,name=country,proto3" json:"country"` // 国家 + Province string `protobuf:"bytes,6,opt,name=province,proto3" json:"province"` // 省/州 + City string `protobuf:"bytes,7,opt,name=city,proto3" json:"city"` // 城市 + Gender int32 `protobuf:"varint,8,opt,name=gender,proto3" json:"gender"` // 性别 +} + +func (x *RpcContact) Reset() { + *x = RpcContact{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RpcContact) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RpcContact) ProtoMessage() {} + +func (x *RpcContact) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RpcContact.ProtoReflect.Descriptor instead. +func (*RpcContact) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{8} +} + +func (x *RpcContact) GetWxid() string { + if x != nil { + return x.Wxid + } + return "" +} + +func (x *RpcContact) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *RpcContact) GetRemark() string { + if x != nil { + return x.Remark + } + return "" +} + +func (x *RpcContact) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RpcContact) GetCountry() string { + if x != nil { + return x.Country + } + return "" +} + +func (x *RpcContact) GetProvince() string { + if x != nil { + return x.Province + } + return "" +} + +func (x *RpcContact) GetCity() string { + if x != nil { + return x.City + } + return "" +} + +func (x *RpcContact) GetGender() int32 { + if x != nil { + return x.Gender + } + return 0 +} + +type RpcContacts struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Contacts []*RpcContact `protobuf:"bytes,1,rep,name=contacts,proto3" json:"contacts,omitempty"` +} + +func (x *RpcContacts) Reset() { + *x = RpcContacts{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RpcContacts) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RpcContacts) ProtoMessage() {} + +func (x *RpcContacts) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RpcContacts.ProtoReflect.Descriptor instead. +func (*RpcContacts) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{9} +} + +func (x *RpcContacts) GetContacts() []*RpcContact { + if x != nil { + return x.Contacts + } + return nil +} + +type DbNames struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` +} + +func (x *DbNames) Reset() { + *x = DbNames{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DbNames) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DbNames) ProtoMessage() {} + +func (x *DbNames) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DbNames.ProtoReflect.Descriptor instead. +func (*DbNames) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{10} +} + +func (x *DbNames) GetNames() []string { + if x != nil { + return x.Names + } + return nil +} + +type DbTable struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // 表名 + Sql string `protobuf:"bytes,2,opt,name=sql,proto3" json:"sql,omitempty"` // 建表 SQL +} + +func (x *DbTable) Reset() { + *x = DbTable{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DbTable) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DbTable) ProtoMessage() {} + +func (x *DbTable) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DbTable.ProtoReflect.Descriptor instead. +func (*DbTable) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{11} +} + +func (x *DbTable) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DbTable) GetSql() string { + if x != nil { + return x.Sql + } + return "" +} + +type DbTables struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tables []*DbTable `protobuf:"bytes,1,rep,name=tables,proto3" json:"tables,omitempty"` +} + +func (x *DbTables) Reset() { + *x = DbTables{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DbTables) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DbTables) ProtoMessage() {} + +func (x *DbTables) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DbTables.ProtoReflect.Descriptor instead. +func (*DbTables) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{12} +} + +func (x *DbTables) GetTables() []*DbTable { + if x != nil { + return x.Tables + } + return nil +} + +type DbQuery struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Db string `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"` // 目标数据库 + Sql string `protobuf:"bytes,2,opt,name=sql,proto3" json:"sql,omitempty"` // 查询 SQL +} + +func (x *DbQuery) Reset() { + *x = DbQuery{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DbQuery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DbQuery) ProtoMessage() {} + +func (x *DbQuery) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DbQuery.ProtoReflect.Descriptor instead. +func (*DbQuery) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{13} +} + +func (x *DbQuery) GetDb() string { + if x != nil { + return x.Db + } + return "" +} + +func (x *DbQuery) GetSql() string { + if x != nil { + return x.Sql + } + return "" +} + +type DbField struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type int32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"` // 字段类型 + Column string `protobuf:"bytes,2,opt,name=column,proto3" json:"column,omitempty"` // 字段名称 + Content []byte `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"` // 字段内容 +} + +func (x *DbField) Reset() { + *x = DbField{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DbField) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DbField) ProtoMessage() {} + +func (x *DbField) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DbField.ProtoReflect.Descriptor instead. +func (*DbField) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{14} +} + +func (x *DbField) GetType() int32 { + if x != nil { + return x.Type + } + return 0 +} + +func (x *DbField) GetColumn() string { + if x != nil { + return x.Column + } + return "" +} + +func (x *DbField) GetContent() []byte { + if x != nil { + return x.Content + } + return nil +} + +type DbRow struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Fields []*DbField `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"` +} + +func (x *DbRow) Reset() { + *x = DbRow{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DbRow) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DbRow) ProtoMessage() {} + +func (x *DbRow) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DbRow.ProtoReflect.Descriptor instead. +func (*DbRow) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{15} +} + +func (x *DbRow) GetFields() []*DbField { + if x != nil { + return x.Fields + } + return nil +} + +type DbRows struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Rows []*DbRow `protobuf:"bytes,1,rep,name=rows,proto3" json:"rows,omitempty"` +} + +func (x *DbRows) Reset() { + *x = DbRows{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DbRows) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DbRows) ProtoMessage() {} + +func (x *DbRows) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DbRows.ProtoReflect.Descriptor instead. +func (*DbRows) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{16} +} + +func (x *DbRows) GetRows() []*DbRow { + if x != nil { + return x.Rows + } + return nil +} + +type Verification struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + V3 string `protobuf:"bytes,1,opt,name=v3,proto3" json:"v3,omitempty"` // 加密的用户名 + V4 string `protobuf:"bytes,2,opt,name=v4,proto3" json:"v4,omitempty"` // Ticket + Scene int32 `protobuf:"varint,3,opt,name=scene,proto3" json:"scene,omitempty"` // 添加方式:17 名片,30 扫码 +} + +func (x *Verification) Reset() { + *x = Verification{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Verification) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Verification) ProtoMessage() {} + +func (x *Verification) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Verification.ProtoReflect.Descriptor instead. +func (*Verification) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{17} +} + +func (x *Verification) GetV3() string { + if x != nil { + return x.V3 + } + return "" +} + +func (x *Verification) GetV4() string { + if x != nil { + return x.V4 + } + return "" +} + +func (x *Verification) GetScene() int32 { + if x != nil { + return x.Scene + } + return 0 +} + +type MemberMgmt struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Roomid string `protobuf:"bytes,1,opt,name=roomid,proto3" json:"roomid,omitempty"` // 要加的群ID + Wxids string `protobuf:"bytes,2,opt,name=wxids,proto3" json:"wxids,omitempty"` // 要加群的人列表,逗号分隔 +} + +func (x *MemberMgmt) Reset() { + *x = MemberMgmt{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MemberMgmt) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MemberMgmt) ProtoMessage() {} + +func (x *MemberMgmt) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MemberMgmt.ProtoReflect.Descriptor instead. +func (*MemberMgmt) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{18} +} + +func (x *MemberMgmt) GetRoomid() string { + if x != nil { + return x.Roomid + } + return "" +} + +func (x *MemberMgmt) GetWxids() string { + if x != nil { + return x.Wxids + } + return "" +} + +type UserInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Wxid string `protobuf:"bytes,1,opt,name=wxid,proto3" json:"wxid,omitempty"` // 微信ID + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 昵称 + Mobile string `protobuf:"bytes,3,opt,name=mobile,proto3" json:"mobile,omitempty"` // 手机号 + Home string `protobuf:"bytes,4,opt,name=home,proto3" json:"home,omitempty"` // 文件/图片等父路径 +} + +func (x *UserInfo) Reset() { + *x = UserInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserInfo) ProtoMessage() {} + +func (x *UserInfo) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserInfo.ProtoReflect.Descriptor instead. +func (*UserInfo) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{19} +} + +func (x *UserInfo) GetWxid() string { + if x != nil { + return x.Wxid + } + return "" +} + +func (x *UserInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UserInfo) GetMobile() string { + if x != nil { + return x.Mobile + } + return "" +} + +func (x *UserInfo) GetHome() string { + if x != nil { + return x.Home + } + return "" +} + +type DecPath struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src string `protobuf:"bytes,1,opt,name=src,proto3" json:"src,omitempty"` // 源路径 + Dst string `protobuf:"bytes,2,opt,name=dst,proto3" json:"dst,omitempty"` // 目标路径 +} + +func (x *DecPath) Reset() { + *x = DecPath{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DecPath) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DecPath) ProtoMessage() {} + +func (x *DecPath) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DecPath.ProtoReflect.Descriptor instead. +func (*DecPath) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{20} +} + +func (x *DecPath) GetSrc() string { + if x != nil { + return x.Src + } + return "" +} + +func (x *DecPath) GetDst() string { + if x != nil { + return x.Dst + } + return "" +} + +type Transfer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Wxid string `protobuf:"bytes,1,opt,name=wxid,proto3" json:"wxid,omitempty"` // 转账人 + Tfid string `protobuf:"bytes,2,opt,name=tfid,proto3" json:"tfid,omitempty"` // 转账id transferid + Taid string `protobuf:"bytes,3,opt,name=taid,proto3" json:"taid,omitempty"` // Transaction id +} + +func (x *Transfer) Reset() { + *x = Transfer{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Transfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transfer) ProtoMessage() {} + +func (x *Transfer) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transfer.ProtoReflect.Descriptor instead. +func (*Transfer) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{21} +} + +func (x *Transfer) GetWxid() string { + if x != nil { + return x.Wxid + } + return "" +} + +func (x *Transfer) GetTfid() string { + if x != nil { + return x.Tfid + } + return "" +} + +func (x *Transfer) GetTaid() string { + if x != nil { + return x.Taid + } + return "" +} + +type AttachMsg struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 消息 id + Thumb string `protobuf:"bytes,2,opt,name=thumb,proto3" json:"thumb,omitempty"` // 消息中的 thumb + Extra string `protobuf:"bytes,3,opt,name=extra,proto3" json:"extra,omitempty"` // 消息中的 extra +} + +func (x *AttachMsg) Reset() { + *x = AttachMsg{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AttachMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AttachMsg) ProtoMessage() {} + +func (x *AttachMsg) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AttachMsg.ProtoReflect.Descriptor instead. +func (*AttachMsg) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{22} +} + +func (x *AttachMsg) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *AttachMsg) GetThumb() string { + if x != nil { + return x.Thumb + } + return "" +} + +func (x *AttachMsg) GetExtra() string { + if x != nil { + return x.Extra + } + return "" +} + +type AudioMsg struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 语音消息 id + Dir string `protobuf:"bytes,2,opt,name=dir,proto3" json:"dir,omitempty"` // 存放目录 +} + +func (x *AudioMsg) Reset() { + *x = AudioMsg{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AudioMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AudioMsg) ProtoMessage() {} + +func (x *AudioMsg) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AudioMsg.ProtoReflect.Descriptor instead. +func (*AudioMsg) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{23} +} + +func (x *AudioMsg) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *AudioMsg) GetDir() string { + if x != nil { + return x.Dir + } + return "" +} + +type RichText struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // 显示名字 + Account string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` // 公众号 id + Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` // 标题 + Digest string `protobuf:"bytes,4,opt,name=digest,proto3" json:"digest,omitempty"` // 摘要 + Url string `protobuf:"bytes,5,opt,name=url,proto3" json:"url,omitempty"` // 链接 + Thumburl string `protobuf:"bytes,6,opt,name=thumburl,proto3" json:"thumburl,omitempty"` // 缩略图 + Receiver string `protobuf:"bytes,7,opt,name=receiver,proto3" json:"receiver,omitempty"` // 接收人 +} + +func (x *RichText) Reset() { + *x = RichText{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RichText) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RichText) ProtoMessage() {} + +func (x *RichText) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RichText.ProtoReflect.Descriptor instead. +func (*RichText) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{24} +} + +func (x *RichText) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RichText) GetAccount() string { + if x != nil { + return x.Account + } + return "" +} + +func (x *RichText) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *RichText) GetDigest() string { + if x != nil { + return x.Digest + } + return "" +} + +func (x *RichText) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *RichText) GetThumburl() string { + if x != nil { + return x.Thumburl + } + return "" +} + +func (x *RichText) GetReceiver() string { + if x != nil { + return x.Receiver + } + return "" +} + +type PatMsg struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Roomid string `protobuf:"bytes,1,opt,name=roomid,proto3" json:"roomid,omitempty"` // 群 id + Wxid string `protobuf:"bytes,2,opt,name=wxid,proto3" json:"wxid,omitempty"` // wxid +} + +func (x *PatMsg) Reset() { + *x = PatMsg{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatMsg) ProtoMessage() {} + +func (x *PatMsg) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatMsg.ProtoReflect.Descriptor instead. +func (*PatMsg) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{25} +} + +func (x *PatMsg) GetRoomid() string { + if x != nil { + return x.Roomid + } + return "" +} + +func (x *PatMsg) GetWxid() string { + if x != nil { + return x.Wxid + } + return "" +} + +type OcrMsg struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` // 状态 + Result string `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` // 结果 +} + +func (x *OcrMsg) Reset() { + *x = OcrMsg{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OcrMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OcrMsg) ProtoMessage() {} + +func (x *OcrMsg) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OcrMsg.ProtoReflect.Descriptor instead. +func (*OcrMsg) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{26} +} + +func (x *OcrMsg) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *OcrMsg) GetResult() string { + if x != nil { + return x.Result + } + return "" +} + +type ForwardMsg struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 待转发消息 ID + Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` // 转发接收目标,群为 roomId,个人为 wxid +} + +func (x *ForwardMsg) Reset() { + *x = ForwardMsg{} + if protoimpl.UnsafeEnabled { + mi := &file_wcf_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ForwardMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ForwardMsg) ProtoMessage() {} + +func (x *ForwardMsg) ProtoReflect() protoreflect.Message { + mi := &file_wcf_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ForwardMsg.ProtoReflect.Descriptor instead. +func (*ForwardMsg) Descriptor() ([]byte, []int) { + return file_wcf_proto_rawDescGZIP(), []int{27} +} + +func (x *ForwardMsg) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *ForwardMsg) GetReceiver() string { + if x != nil { + return x.Receiver + } + return "" +} + +var File_wcf_proto protoreflect.FileDescriptor + +var file_wcf_proto_rawDesc = []byte{ + 0x0a, 0x09, 0x77, 0x63, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x77, 0x63, 0x66, + 0x22, 0xd4, 0x04, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x04, + 0x66, 0x75, 0x6e, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x77, 0x63, 0x66, + 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x04, 0x66, 0x75, 0x6e, 0x63, + 0x12, 0x22, 0x0a, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0a, 0x2e, 0x77, 0x63, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x05, 0x65, + 0x6d, 0x70, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x03, 0x73, 0x74, 0x72, 0x12, 0x20, 0x0a, 0x03, 0x74, 0x78, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x77, 0x63, 0x66, 0x2e, 0x54, 0x65, 0x78, 0x74, + 0x4d, 0x73, 0x67, 0x48, 0x00, 0x52, 0x03, 0x74, 0x78, 0x74, 0x12, 0x22, 0x0a, 0x04, 0x66, 0x69, + 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x77, 0x63, 0x66, 0x2e, 0x50, + 0x61, 0x74, 0x68, 0x4d, 0x73, 0x67, 0x48, 0x00, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x24, + 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, + 0x77, 0x63, 0x66, 0x2e, 0x44, 0x62, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x00, 0x52, 0x05, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x12, 0x21, 0x0a, 0x01, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x11, 0x2e, 0x77, 0x63, 0x66, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x01, 0x76, 0x12, 0x1f, 0x0a, 0x01, 0x6d, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x77, 0x63, 0x66, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4d, + 0x67, 0x6d, 0x74, 0x48, 0x00, 0x52, 0x01, 0x6d, 0x12, 0x1f, 0x0a, 0x03, 0x78, 0x6d, 0x6c, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x77, 0x63, 0x66, 0x2e, 0x58, 0x6d, 0x6c, 0x4d, + 0x73, 0x67, 0x48, 0x00, 0x52, 0x03, 0x78, 0x6d, 0x6c, 0x12, 0x20, 0x0a, 0x03, 0x64, 0x65, 0x63, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x77, 0x63, 0x66, 0x2e, 0x44, 0x65, 0x63, + 0x50, 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, 0x03, 0x64, 0x65, 0x63, 0x12, 0x1f, 0x0a, 0x02, 0x74, + 0x66, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x77, 0x63, 0x66, 0x2e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x02, 0x74, 0x66, 0x12, 0x14, 0x0a, 0x04, + 0x75, 0x69, 0x36, 0x34, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x04, 0x75, 0x69, + 0x36, 0x34, 0x12, 0x14, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x00, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x12, 0x22, 0x0a, 0x03, 0x61, 0x74, 0x74, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x77, 0x63, 0x66, 0x2e, 0x41, 0x74, 0x74, 0x61, + 0x63, 0x68, 0x4d, 0x73, 0x67, 0x48, 0x00, 0x52, 0x03, 0x61, 0x74, 0x74, 0x12, 0x1f, 0x0a, 0x02, + 0x61, 0x6d, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x77, 0x63, 0x66, 0x2e, 0x41, + 0x75, 0x64, 0x69, 0x6f, 0x4d, 0x73, 0x67, 0x48, 0x00, 0x52, 0x02, 0x61, 0x6d, 0x12, 0x1f, 0x0a, + 0x02, 0x72, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x77, 0x63, 0x66, 0x2e, + 0x52, 0x69, 0x63, 0x68, 0x54, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x02, 0x72, 0x74, 0x12, 0x1d, + 0x0a, 0x02, 0x70, 0x6d, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x77, 0x63, 0x66, + 0x2e, 0x50, 0x61, 0x74, 0x4d, 0x73, 0x67, 0x48, 0x00, 0x52, 0x02, 0x70, 0x6d, 0x12, 0x21, 0x0a, + 0x02, 0x66, 0x6d, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x77, 0x63, 0x66, 0x2e, + 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x4d, 0x73, 0x67, 0x48, 0x00, 0x52, 0x02, 0x66, 0x6d, + 0x42, 0x05, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x8e, 0x03, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x66, 0x75, 0x6e, 0x63, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x77, 0x63, 0x66, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x04, 0x66, 0x75, 0x6e, 0x63, 0x12, 0x18, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x12, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x03, 0x73, 0x74, 0x72, 0x12, 0x22, 0x0a, 0x05, 0x77, 0x78, 0x6d, 0x73, 0x67, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x77, 0x63, 0x66, 0x2e, 0x57, 0x78, 0x4d, 0x73, + 0x67, 0x48, 0x00, 0x52, 0x05, 0x77, 0x78, 0x6d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x05, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x77, 0x63, 0x66, 0x2e, + 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x12, 0x2e, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x77, 0x63, 0x66, 0x2e, 0x52, 0x70, 0x63, 0x43, 0x6f, 0x6e, + 0x74, 0x61, 0x63, 0x74, 0x73, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, + 0x73, 0x12, 0x20, 0x0a, 0x03, 0x64, 0x62, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, + 0x2e, 0x77, 0x63, 0x66, 0x2e, 0x44, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x48, 0x00, 0x52, 0x03, + 0x64, 0x62, 0x73, 0x12, 0x27, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x77, 0x63, 0x66, 0x2e, 0x44, 0x62, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x04, + 0x72, 0x6f, 0x77, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x77, 0x63, 0x66, + 0x2e, 0x44, 0x62, 0x52, 0x6f, 0x77, 0x73, 0x48, 0x00, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x12, + 0x1f, 0x0a, 0x02, 0x75, 0x69, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x77, 0x63, + 0x66, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x48, 0x00, 0x52, 0x02, 0x75, 0x69, + 0x12, 0x1f, 0x0a, 0x03, 0x6f, 0x63, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, + 0x77, 0x63, 0x66, 0x2e, 0x4f, 0x63, 0x72, 0x4d, 0x73, 0x67, 0x48, 0x00, 0x52, 0x03, 0x6f, 0x63, + 0x72, 0x42, 0x05, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x8b, 0x02, 0x0a, 0x05, 0x57, 0x78, 0x4d, 0x73, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x69, + 0x73, 0x5f, 0x73, 0x65, 0x6c, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, + 0x53, 0x65, 0x6c, 0x66, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x02, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, + 0x04, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x67, + 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x12, 0x10, 0x0a, + 0x03, 0x78, 0x6d, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x78, 0x6d, 0x6c, 0x22, + 0x4d, 0x0a, 0x07, 0x54, 0x65, 0x78, 0x74, 0x4d, 0x73, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, + 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x1a, 0x0a, 0x08, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x74, 0x65, 0x72, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x74, 0x65, 0x72, 0x73, 0x22, 0x39, + 0x0a, 0x07, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1a, 0x0a, + 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x22, 0x66, 0x0a, 0x06, 0x58, 0x6d, 0x6c, + 0x4d, 0x73, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, + 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x22, 0x74, 0x0a, 0x08, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x2e, 0x0a, + 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x77, + 0x63, 0x66, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x1a, 0x38, 0x0a, + 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc2, 0x01, 0x0a, 0x0a, 0x52, 0x70, 0x63, 0x43, + 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x78, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x77, 0x78, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, + 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x63, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x3a, 0x0a, 0x0b, + 0x52, 0x70, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x08, 0x63, + 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x77, 0x63, 0x66, 0x2e, 0x52, 0x70, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x08, + 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x73, 0x22, 0x1f, 0x0a, 0x07, 0x44, 0x62, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x2f, 0x0a, 0x07, 0x44, 0x62, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x71, 0x6c, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x71, 0x6c, 0x22, 0x30, 0x0a, 0x08, 0x44, 0x62, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x77, 0x63, 0x66, 0x2e, 0x44, 0x62, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0x2b, 0x0a, 0x07, + 0x44, 0x62, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x62, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x64, 0x62, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x71, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x71, 0x6c, 0x22, 0x4f, 0x0a, 0x07, 0x44, 0x62, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x2d, 0x0a, 0x05, 0x44, 0x62, + 0x52, 0x6f, 0x77, 0x12, 0x24, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x77, 0x63, 0x66, 0x2e, 0x44, 0x62, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x22, 0x28, 0x0a, 0x06, 0x44, 0x62, 0x52, + 0x6f, 0x77, 0x73, 0x12, 0x1e, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0a, 0x2e, 0x77, 0x63, 0x66, 0x2e, 0x44, 0x62, 0x52, 0x6f, 0x77, 0x52, 0x04, 0x72, + 0x6f, 0x77, 0x73, 0x22, 0x44, 0x0a, 0x0c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x76, 0x33, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x76, 0x33, 0x12, 0x0e, 0x0a, 0x02, 0x76, 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x76, 0x34, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x65, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x05, 0x73, 0x63, 0x65, 0x6e, 0x65, 0x22, 0x3a, 0x0a, 0x0a, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x4d, 0x67, 0x6d, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x12, + 0x14, 0x0a, 0x05, 0x77, 0x78, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x77, 0x78, 0x69, 0x64, 0x73, 0x22, 0x5e, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x77, 0x78, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x62, + 0x69, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x68, 0x6f, 0x6d, 0x65, 0x22, 0x2d, 0x0a, 0x07, 0x44, 0x65, 0x63, 0x50, 0x61, 0x74, 0x68, + 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, + 0x72, 0x63, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x64, 0x73, 0x74, 0x22, 0x46, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x12, 0x12, 0x0a, 0x04, 0x77, 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x77, 0x78, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x66, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x74, 0x66, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x69, 0x64, 0x22, 0x47, 0x0a, 0x09, + 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x4d, 0x73, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x68, 0x75, + 0x6d, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x12, + 0x14, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x2c, 0x0a, 0x08, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x4d, 0x73, + 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x64, 0x69, 0x72, 0x22, 0xb0, 0x01, 0x0a, 0x08, 0x52, 0x69, 0x63, 0x68, 0x54, 0x65, 0x78, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1a, + 0x0a, 0x08, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x75, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x22, 0x34, 0x0a, 0x06, 0x50, 0x61, 0x74, 0x4d, 0x73, 0x67, + 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x78, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x77, 0x78, 0x69, 0x64, 0x22, 0x38, 0x0a, 0x06, + 0x4f, 0x63, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, + 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x38, 0x0a, 0x0a, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, + 0x64, 0x4d, 0x73, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, + 0x2a, 0xd9, 0x05, 0x0a, 0x09, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x11, + 0x0a, 0x0d, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x52, 0x45, 0x53, 0x45, 0x52, 0x56, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x49, 0x53, 0x5f, 0x4c, 0x4f, 0x47, + 0x49, 0x4e, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x47, 0x45, 0x54, + 0x5f, 0x53, 0x45, 0x4c, 0x46, 0x5f, 0x57, 0x58, 0x49, 0x44, 0x10, 0x10, 0x12, 0x16, 0x0a, 0x12, + 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4d, 0x53, 0x47, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x53, 0x10, 0x11, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x47, 0x45, 0x54, + 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54, 0x53, 0x10, 0x12, 0x12, 0x15, 0x0a, 0x11, 0x46, + 0x55, 0x4e, 0x43, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x44, 0x42, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, + 0x10, 0x13, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x44, + 0x42, 0x5f, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x53, 0x10, 0x14, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x55, + 0x4e, 0x43, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x46, 0x4f, + 0x10, 0x15, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x41, + 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x4d, 0x53, 0x47, 0x10, 0x16, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x55, + 0x4e, 0x43, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x54, 0x58, 0x54, 0x10, 0x20, 0x12, 0x11, 0x0a, + 0x0d, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x49, 0x4d, 0x47, 0x10, 0x21, + 0x12, 0x12, 0x0a, 0x0e, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x46, 0x49, + 0x4c, 0x45, 0x10, 0x22, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x53, 0x45, 0x4e, + 0x44, 0x5f, 0x58, 0x4d, 0x4c, 0x10, 0x23, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x55, 0x4e, 0x43, 0x5f, + 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x45, 0x4d, 0x4f, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x24, 0x12, 0x16, + 0x0a, 0x12, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x52, 0x49, 0x43, 0x48, + 0x5f, 0x54, 0x58, 0x54, 0x10, 0x25, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x53, + 0x45, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x54, 0x5f, 0x4d, 0x53, 0x47, 0x10, 0x26, 0x12, 0x14, 0x0a, + 0x10, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x4d, 0x53, + 0x47, 0x10, 0x27, 0x12, 0x18, 0x0a, 0x14, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x45, 0x4e, 0x41, 0x42, + 0x4c, 0x45, 0x5f, 0x52, 0x45, 0x43, 0x56, 0x5f, 0x54, 0x58, 0x54, 0x10, 0x30, 0x12, 0x19, 0x0a, + 0x15, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x52, 0x45, + 0x43, 0x56, 0x5f, 0x54, 0x58, 0x54, 0x10, 0x40, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x55, 0x4e, 0x43, + 0x5f, 0x45, 0x58, 0x45, 0x43, 0x5f, 0x44, 0x42, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x50, + 0x12, 0x16, 0x0a, 0x12, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x5f, + 0x46, 0x52, 0x49, 0x45, 0x4e, 0x44, 0x10, 0x51, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x55, 0x4e, 0x43, + 0x5f, 0x52, 0x45, 0x43, 0x56, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x10, 0x52, + 0x12, 0x14, 0x0a, 0x10, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x52, 0x45, 0x46, 0x52, 0x45, 0x53, 0x48, + 0x5f, 0x50, 0x59, 0x51, 0x10, 0x53, 0x12, 0x18, 0x0a, 0x14, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x44, + 0x4f, 0x57, 0x4e, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x41, 0x54, 0x54, 0x41, 0x43, 0x48, 0x10, 0x54, + 0x12, 0x19, 0x0a, 0x15, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x43, 0x4f, 0x4e, + 0x54, 0x41, 0x43, 0x54, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x55, 0x12, 0x13, 0x0a, 0x0f, 0x46, + 0x55, 0x4e, 0x43, 0x5f, 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x5f, 0x4d, 0x53, 0x47, 0x10, 0x56, + 0x12, 0x16, 0x0a, 0x12, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x44, 0x45, 0x43, 0x52, 0x59, 0x50, 0x54, + 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x60, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x55, 0x4e, 0x43, + 0x5f, 0x45, 0x58, 0x45, 0x43, 0x5f, 0x4f, 0x43, 0x52, 0x10, 0x61, 0x12, 0x19, 0x0a, 0x15, 0x46, + 0x55, 0x4e, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x5f, 0x52, 0x4f, 0x4f, 0x4d, 0x5f, 0x4d, 0x45, 0x4d, + 0x42, 0x45, 0x52, 0x53, 0x10, 0x70, 0x12, 0x19, 0x0a, 0x15, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x44, + 0x45, 0x4c, 0x5f, 0x52, 0x4f, 0x4f, 0x4d, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x53, 0x10, + 0x71, 0x12, 0x19, 0x0a, 0x15, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x49, 0x4e, 0x56, 0x5f, 0x52, 0x4f, + 0x4f, 0x4d, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x53, 0x10, 0x72, 0x42, 0x15, 0x0a, 0x0b, + 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x61, 0x6d, 0x74, 0x65, 0x65, 0x72, 0x5a, 0x06, 0x2e, 0x2e, 0x2f, + 0x77, 0x63, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_wcf_proto_rawDescOnce sync.Once + file_wcf_proto_rawDescData = file_wcf_proto_rawDesc +) + +func file_wcf_proto_rawDescGZIP() []byte { + file_wcf_proto_rawDescOnce.Do(func() { + file_wcf_proto_rawDescData = protoimpl.X.CompressGZIP(file_wcf_proto_rawDescData) + }) + return file_wcf_proto_rawDescData +} + +var file_wcf_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_wcf_proto_msgTypes = make([]protoimpl.MessageInfo, 29) +var file_wcf_proto_goTypes = []interface{}{ + (Functions)(0), // 0: wcf.Functions + (*Request)(nil), // 1: wcf.Request + (*Response)(nil), // 2: wcf.Response + (*Empty)(nil), // 3: wcf.Empty + (*WxMsg)(nil), // 4: wcf.WxMsg + (*TextMsg)(nil), // 5: wcf.TextMsg + (*PathMsg)(nil), // 6: wcf.PathMsg + (*XmlMsg)(nil), // 7: wcf.XmlMsg + (*MsgTypes)(nil), // 8: wcf.MsgTypes + (*RpcContact)(nil), // 9: wcf.RpcContact + (*RpcContacts)(nil), // 10: wcf.RpcContacts + (*DbNames)(nil), // 11: wcf.DbNames + (*DbTable)(nil), // 12: wcf.DbTable + (*DbTables)(nil), // 13: wcf.DbTables + (*DbQuery)(nil), // 14: wcf.DbQuery + (*DbField)(nil), // 15: wcf.DbField + (*DbRow)(nil), // 16: wcf.DbRow + (*DbRows)(nil), // 17: wcf.DbRows + (*Verification)(nil), // 18: wcf.Verification + (*MemberMgmt)(nil), // 19: wcf.MemberMgmt + (*UserInfo)(nil), // 20: wcf.UserInfo + (*DecPath)(nil), // 21: wcf.DecPath + (*Transfer)(nil), // 22: wcf.Transfer + (*AttachMsg)(nil), // 23: wcf.AttachMsg + (*AudioMsg)(nil), // 24: wcf.AudioMsg + (*RichText)(nil), // 25: wcf.RichText + (*PatMsg)(nil), // 26: wcf.PatMsg + (*OcrMsg)(nil), // 27: wcf.OcrMsg + (*ForwardMsg)(nil), // 28: wcf.ForwardMsg + nil, // 29: wcf.MsgTypes.TypesEntry +} +var file_wcf_proto_depIdxs = []int32{ + 0, // 0: wcf.Request.func:type_name -> wcf.Functions + 3, // 1: wcf.Request.empty:type_name -> wcf.Empty + 5, // 2: wcf.Request.txt:type_name -> wcf.TextMsg + 6, // 3: wcf.Request.file:type_name -> wcf.PathMsg + 14, // 4: wcf.Request.query:type_name -> wcf.DbQuery + 18, // 5: wcf.Request.v:type_name -> wcf.Verification + 19, // 6: wcf.Request.m:type_name -> wcf.MemberMgmt + 7, // 7: wcf.Request.xml:type_name -> wcf.XmlMsg + 21, // 8: wcf.Request.dec:type_name -> wcf.DecPath + 22, // 9: wcf.Request.tf:type_name -> wcf.Transfer + 23, // 10: wcf.Request.att:type_name -> wcf.AttachMsg + 24, // 11: wcf.Request.am:type_name -> wcf.AudioMsg + 25, // 12: wcf.Request.rt:type_name -> wcf.RichText + 26, // 13: wcf.Request.pm:type_name -> wcf.PatMsg + 28, // 14: wcf.Request.fm:type_name -> wcf.ForwardMsg + 0, // 15: wcf.Response.func:type_name -> wcf.Functions + 4, // 16: wcf.Response.wxmsg:type_name -> wcf.WxMsg + 8, // 17: wcf.Response.types:type_name -> wcf.MsgTypes + 10, // 18: wcf.Response.contacts:type_name -> wcf.RpcContacts + 11, // 19: wcf.Response.dbs:type_name -> wcf.DbNames + 13, // 20: wcf.Response.tables:type_name -> wcf.DbTables + 17, // 21: wcf.Response.rows:type_name -> wcf.DbRows + 20, // 22: wcf.Response.ui:type_name -> wcf.UserInfo + 27, // 23: wcf.Response.ocr:type_name -> wcf.OcrMsg + 29, // 24: wcf.MsgTypes.types:type_name -> wcf.MsgTypes.TypesEntry + 9, // 25: wcf.RpcContacts.contacts:type_name -> wcf.RpcContact + 12, // 26: wcf.DbTables.tables:type_name -> wcf.DbTable + 15, // 27: wcf.DbRow.fields:type_name -> wcf.DbField + 16, // 28: wcf.DbRows.rows:type_name -> wcf.DbRow + 29, // [29:29] is the sub-list for method output_type + 29, // [29:29] is the sub-list for method input_type + 29, // [29:29] is the sub-list for extension type_name + 29, // [29:29] is the sub-list for extension extendee + 0, // [0:29] is the sub-list for field type_name +} + +func init() { file_wcf_proto_init() } +func file_wcf_proto_init() { + if File_wcf_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_wcf_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Request); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Response); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Empty); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WxMsg); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextMsg); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PathMsg); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*XmlMsg); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgTypes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RpcContact); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RpcContacts); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DbNames); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DbTable); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DbTables); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DbQuery); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DbField); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DbRow); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DbRows); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Verification); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MemberMgmt); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DecPath); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Transfer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AttachMsg); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AudioMsg); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RichText); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatMsg); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OcrMsg); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wcf_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ForwardMsg); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_wcf_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Request_Empty)(nil), + (*Request_Str)(nil), + (*Request_Txt)(nil), + (*Request_File)(nil), + (*Request_Query)(nil), + (*Request_V)(nil), + (*Request_M)(nil), + (*Request_Xml)(nil), + (*Request_Dec)(nil), + (*Request_Tf)(nil), + (*Request_Ui64)(nil), + (*Request_Flag)(nil), + (*Request_Att)(nil), + (*Request_Am)(nil), + (*Request_Rt)(nil), + (*Request_Pm)(nil), + (*Request_Fm)(nil), + } + file_wcf_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*Response_Status)(nil), + (*Response_Str)(nil), + (*Response_Wxmsg)(nil), + (*Response_Types)(nil), + (*Response_Contacts)(nil), + (*Response_Dbs)(nil), + (*Response_Tables)(nil), + (*Response_Rows)(nil), + (*Response_Ui)(nil), + (*Response_Ocr)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_wcf_proto_rawDesc, + NumEnums: 1, + NumMessages: 29, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_wcf_proto_goTypes, + DependencyIndexes: file_wcf_proto_depIdxs, + EnumInfos: file_wcf_proto_enumTypes, + MessageInfos: file_wcf_proto_msgTypes, + }.Build() + File_wcf_proto = out.File + file_wcf_proto_rawDesc = nil + file_wcf_proto_goTypes = nil + file_wcf_proto_depIdxs = nil +} From 7a4f406220197cd16e454a0c5c9c68db9d81cb47 Mon Sep 17 00:00:00 2001 From: Changhua Date: Tue, 2 Jul 2024 00:40:04 +0800 Subject: [PATCH 25/55] Fix #51 --- WeChatFerry/spy/receive_msg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WeChatFerry/spy/receive_msg.cpp b/WeChatFerry/spy/receive_msg.cpp index f244f29..16c8c81 100644 --- a/WeChatFerry/spy/receive_msg.cpp +++ b/WeChatFerry/spy/receive_msg.cpp @@ -88,9 +88,9 @@ static QWORD DispatchMsg(QWORD arg1, QWORD arg2) wxMsg.xml = GetStringByWstrAddr(arg2 + g_WxCalls.recvMsg.msgXml); string roomid = GetStringByWstrAddr(arg2 + g_WxCalls.recvMsg.roomId); + wxMsg.roomid = roomid; if (roomid.find("@chatroom") != string::npos) { // 群 ID 的格式为 xxxxxxxxxxx@chatroom wxMsg.is_group = true; - wxMsg.roomid = roomid; if (wxMsg.is_self) { wxMsg.sender = GetSelfWxid(); } else { From db08382e56fbdffc5b75b2f7e97419aaaac3a04f Mon Sep 17 00:00:00 2001 From: Changhua Date: Tue, 2 Jul 2024 00:50:20 +0800 Subject: [PATCH 26/55] Refactoring --- WeChatFerry/spy/chatroom_mgmt.cpp | 19 +++++----- WeChatFerry/spy/contact_mgmt.cpp | 8 ++--- WeChatFerry/spy/funcs.cpp | 16 ++++----- WeChatFerry/spy/receive_msg.cpp | 26 +++++++------- WeChatFerry/spy/send_msg.cpp | 58 +++++++++++++++---------------- 5 files changed, 63 insertions(+), 64 deletions(-) diff --git a/WeChatFerry/spy/chatroom_mgmt.cpp b/WeChatFerry/spy/chatroom_mgmt.cpp index 18a8bda..23d5d8b 100644 --- a/WeChatFerry/spy/chatroom_mgmt.cpp +++ b/WeChatFerry/spy/chatroom_mgmt.cpp @@ -12,10 +12,10 @@ using namespace std; extern WxCalls_t g_WxCalls; extern QWORD g_WeChatWinDllAddr; -typedef QWORD (*funcGetChatRoomMgr_t)(); -typedef QWORD (*funcAddMemberToChatRoom_t)(QWORD, QWORD, QWORD, QWORD); -typedef QWORD (*funcDelMemberFromChatRoom_t)(QWORD, QWORD, QWORD); -typedef QWORD (*funcInviteMemberToChatRoom_t)(QWORD, QWORD, QWORD, QWORD); +typedef QWORD (*GetChatRoomMgr_t)(); +typedef QWORD (*AddMemberToChatRoom_t)(QWORD, QWORD, QWORD, QWORD); +typedef QWORD (*DelMemberFromChatRoom_t)(QWORD, QWORD, QWORD); +typedef QWORD (*InviteMemberToChatRoom_t)(QWORD, QWORD, QWORD, QWORD); int AddChatroomMember(string roomid, string wxids) { @@ -26,8 +26,8 @@ int AddChatroomMember(string roomid, string wxids) return status; } - funcGetChatRoomMgr_t GetChatRoomMgr = (funcGetChatRoomMgr_t)(g_WeChatWinDllAddr + g_WxCalls.arm.call1); - funcAddMemberToChatRoom_t AddMembers = (funcAddMemberToChatRoom_t)(g_WeChatWinDllAddr + g_WxCalls.arm.call2); + GetChatRoomMgr_t GetChatRoomMgr = (GetChatRoomMgr_t)(g_WeChatWinDllAddr + g_WxCalls.arm.call1); + AddMemberToChatRoom_t AddMembers = (AddMemberToChatRoom_t)(g_WeChatWinDllAddr + g_WxCalls.arm.call2); vector vMembers; vector vWxMembers; @@ -58,8 +58,8 @@ int DelChatroomMember(string roomid, string wxids) return status; } - funcGetChatRoomMgr_t GetChatRoomMgr = (funcGetChatRoomMgr_t)(g_WeChatWinDllAddr + g_WxCalls.drm.call1); - funcDelMemberFromChatRoom_t DelMembers = (funcDelMemberFromChatRoom_t)(g_WeChatWinDllAddr + g_WxCalls.drm.call2); + GetChatRoomMgr_t GetChatRoomMgr = (GetChatRoomMgr_t)(g_WeChatWinDllAddr + g_WxCalls.drm.call1); + DelMemberFromChatRoom_t DelMembers = (DelMemberFromChatRoom_t)(g_WeChatWinDllAddr + g_WxCalls.drm.call2); vector vMembers; vector vWxMembers; @@ -89,8 +89,7 @@ int InviteChatroomMember(string roomid, string wxids) return status; } - funcInviteMemberToChatRoom_t InviteMembers - = (funcInviteMemberToChatRoom_t)(g_WeChatWinDllAddr + g_WxCalls.irm.call1); + InviteMemberToChatRoom_t InviteMembers = (InviteMemberToChatRoom_t)(g_WeChatWinDllAddr + g_WxCalls.irm.call1); vector vMembers; vector vWxMembers; diff --git a/WeChatFerry/spy/contact_mgmt.cpp b/WeChatFerry/spy/contact_mgmt.cpp index d6d55f4..7873507 100644 --- a/WeChatFerry/spy/contact_mgmt.cpp +++ b/WeChatFerry/spy/contact_mgmt.cpp @@ -9,8 +9,8 @@ using namespace std; extern WxCalls_t g_WxCalls; extern QWORD g_WeChatWinDllAddr; -typedef QWORD (*funcGetContactMgr_t)(); -typedef QWORD (*funcGetContactList_t)(QWORD, QWORD); +typedef QWORD (*GetContactMgr_t)(); +typedef QWORD (*GetContactList_t)(QWORD, QWORD); #define FEAT_LEN 5 static const uint8_t FEAT_COUNTRY[FEAT_LEN] = { 0xA4, 0xD9, 0x02, 0x4A, 0x18 }; @@ -48,8 +48,8 @@ static string GetCntString(QWORD start, QWORD end, const uint8_t *feat, size_t l vector GetContacts() { vector contacts; - funcGetContactMgr_t funcGetContactMgr = (funcGetContactMgr_t)(g_WeChatWinDllAddr + 0x1C0BDE0); - funcGetContactList_t funcGetContactList = (funcGetContactList_t)(g_WeChatWinDllAddr + 0x2265540); + GetContactMgr_t funcGetContactMgr = (GetContactMgr_t)(g_WeChatWinDllAddr + 0x1C0BDE0); + GetContactList_t funcGetContactList = (GetContactList_t)(g_WeChatWinDllAddr + 0x2265540); QWORD mgr = funcGetContactMgr(); QWORD addr[3] = { 0 }; diff --git a/WeChatFerry/spy/funcs.cpp b/WeChatFerry/spy/funcs.cpp index 2b8792e..0c0f4cf 100644 --- a/WeChatFerry/spy/funcs.cpp +++ b/WeChatFerry/spy/funcs.cpp @@ -25,10 +25,10 @@ extern bool gIsListeningPyq; extern WxCalls_t g_WxCalls; extern QWORD g_WeChatWinDllAddr; -typedef QWORD (*funcGetSNSDataMgr_t)(); -typedef QWORD (*funcGetSnsTimeLineMgr_t)(); -typedef QWORD (*funcGetSNSFirstPage_t)(QWORD, QWORD, QWORD); -typedef QWORD (*funcGetSNSNextPageScene_t)(QWORD, QWORD); +typedef QWORD (*GetSNSDataMgr_t)(); +typedef QWORD (*GetSnsTimeLineMgr_t)(); +typedef QWORD (*GetSNSFirstPage_t)(QWORD, QWORD, QWORD); +typedef QWORD (*GetSNSNextPageScene_t)(QWORD, QWORD); typedef QWORD (*GetChatMgr_t)(); typedef QWORD (*NewChatMsg_t)(QWORD); typedef QWORD (*FreeChatMsg_t)(QWORD); @@ -131,8 +131,8 @@ static int GetFirstPage() { int status = -1; - funcGetSNSDataMgr_t GetSNSDataMgr = (funcGetSNSDataMgr_t)(g_WeChatWinDllAddr + 0x22A91C0); - funcGetSNSFirstPage_t GetSNSFirstPage = (funcGetSNSFirstPage_t)(g_WeChatWinDllAddr + 0x2ED9080); + GetSNSDataMgr_t GetSNSDataMgr = (GetSNSDataMgr_t)(g_WeChatWinDllAddr + 0x22A91C0); + GetSNSFirstPage_t GetSNSFirstPage = (GetSNSFirstPage_t)(g_WeChatWinDllAddr + 0x2ED9080); QWORD buff[16] = { 0 }; QWORD mgr = GetSNSDataMgr(); @@ -145,8 +145,8 @@ static int GetNextPage(QWORD id) { int status = -1; - funcGetSnsTimeLineMgr_t GetSnsTimeLineMgr = (funcGetSnsTimeLineMgr_t)(g_WeChatWinDllAddr + 0x2E6B110); - funcGetSNSNextPageScene_t GetSNSNextPageScene = (funcGetSNSNextPageScene_t)(g_WeChatWinDllAddr + 0x2EFEC00); + GetSnsTimeLineMgr_t GetSnsTimeLineMgr = (GetSnsTimeLineMgr_t)(g_WeChatWinDllAddr + 0x2E6B110); + GetSNSNextPageScene_t GetSNSNextPageScene = (GetSNSNextPageScene_t)(g_WeChatWinDllAddr + 0x2EFEC00); QWORD mgr = GetSnsTimeLineMgr(); status = (int)GetSNSNextPageScene(mgr, id); diff --git a/WeChatFerry/spy/receive_msg.cpp b/WeChatFerry/spy/receive_msg.cpp index 16c8c81..3963303 100644 --- a/WeChatFerry/spy/receive_msg.cpp +++ b/WeChatFerry/spy/receive_msg.cpp @@ -22,17 +22,17 @@ extern queue gMsgQueue; extern WxCalls_t g_WxCalls; extern QWORD g_WeChatWinDllAddr; -typedef QWORD (*funcRecvMsg_t)(QWORD, QWORD); -typedef QWORD (*funcWxLog_t)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD); -typedef QWORD (*funcRecvPyq_t)(QWORD, QWORD, QWORD); +typedef QWORD (*RecvMsg_t)(QWORD, QWORD); +typedef QWORD (*WxLog_t)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD); +typedef QWORD (*RecvPyq_t)(QWORD, QWORD, QWORD); -static funcRecvMsg_t funcRecvMsg = nullptr; -static funcRecvMsg_t realRecvMsg = nullptr; -static funcWxLog_t funcWxLog = nullptr; -static funcWxLog_t realWxLog = nullptr; -static funcRecvPyq_t funcRecvPyq = nullptr; -static funcRecvPyq_t realRecvPyq = nullptr; -static bool isMH_Initialized = false; +static RecvMsg_t funcRecvMsg = nullptr; +static RecvMsg_t realRecvMsg = nullptr; +static WxLog_t funcWxLog = nullptr; +static WxLog_t realWxLog = nullptr; +static RecvPyq_t funcRecvPyq = nullptr; +static RecvPyq_t realRecvPyq = nullptr; +static bool isMH_Initialized = false; MsgTypes_t GetMsgTypes() { @@ -183,7 +183,7 @@ void EnableLog() LOG_WARN("g_WeChatWinDllAddr == 0"); return; } - funcWxLog_t funcWxLog = (funcWxLog_t)(g_WeChatWinDllAddr + 0x26DA2D0); + WxLog_t funcWxLog = (WxLog_t)(g_WeChatWinDllAddr + 0x26DA2D0); if (!isMH_Initialized) { status = MH_Initialize(); @@ -238,7 +238,7 @@ void ListenMessage() LOG_WARN("gIsListening || (g_WeChatWinDllAddr == 0)"); return; } - funcRecvMsg = (funcRecvMsg_t)(g_WeChatWinDllAddr + g_WxCalls.recvMsg.call); + funcRecvMsg = (RecvMsg_t)(g_WeChatWinDllAddr + g_WxCalls.recvMsg.call); if (!isMH_Initialized) { status = MH_Initialize(); @@ -300,7 +300,7 @@ void ListenPyq() LOG_WARN("gIsListeningPyq || (g_WeChatWinDllAddr == 0)"); return; } - funcRecvPyq = (funcRecvPyq_t)(g_WeChatWinDllAddr + 0x2EFAA10); + funcRecvPyq = (RecvPyq_t)(g_WeChatWinDllAddr + 0x2EFAA10); if (!isMH_Initialized) { status = MH_Initialize(); diff --git a/WeChatFerry/spy/send_msg.cpp b/WeChatFerry/spy/send_msg.cpp index 4d325f2..7511c1b 100644 --- a/WeChatFerry/spy/send_msg.cpp +++ b/WeChatFerry/spy/send_msg.cpp @@ -13,18 +13,18 @@ extern WxCalls_t g_WxCalls; extern QWORD g_WeChatWinDllAddr; extern string GetSelfWxid(); // Defined in spy.cpp -typedef QWORD (*funcNew_t)(QWORD); -typedef QWORD (*funcFree_t)(QWORD); -typedef QWORD (*funcSendMsgMgr_t)(); -typedef QWORD (*funcGetAppMsgMgr_t)(); +typedef QWORD (*New_t)(QWORD); +typedef QWORD (*Free_t)(QWORD); +typedef QWORD (*SendMsgMgr_t)(); +typedef QWORD (*GetAppMsgMgr_t)(); -typedef QWORD (*funcSendTextMsg_t)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD); -typedef QWORD (*funcSendImageMsg_t)(QWORD, QWORD, QWORD, QWORD, QWORD); -typedef QWORD (*funcSendFileMsg_t)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD *, QWORD, QWORD *, QWORD, QWORD *, QWORD, - QWORD); -typedef QWORD (*funcSendRichTextMsg_t)(QWORD, QWORD, QWORD); -typedef QWORD (*funcSendPatMsg_t)(QWORD, QWORD); -typedef QWORD (*funcForwardMsg_t)(QWORD, QWORD, QWORD, QWORD); +typedef QWORD (*SendTextMsg_t)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD); +typedef QWORD (*SendImageMsg_t)(QWORD, QWORD, QWORD, QWORD, QWORD); +typedef QWORD (*SendFileMsg_t)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD *, QWORD, QWORD *, QWORD, QWORD *, QWORD, + QWORD); +typedef QWORD (*SendRichTextMsg_t)(QWORD, QWORD, QWORD); +typedef QWORD (*SendPatMsg_t)(QWORD, QWORD); +typedef QWORD (*ForwardMsg_t)(QWORD, QWORD, QWORD, QWORD); void SendTextMessage(string wxid, string msg, string atWxids) { @@ -52,10 +52,10 @@ void SendTextMessage(string wxid, string msg, string atWxids) QWORD wxAters = (QWORD) & ((RawVector_t *)&vWxAtWxids)->start; - char buffer[0x460] = { 0 }; - funcSendMsgMgr_t funcSendMsgMgr = (funcSendMsgMgr_t)(g_WeChatWinDllAddr + g_WxCalls.sendText.call1); - funcSendTextMsg_t funcSendTextMsg = (funcSendTextMsg_t)(g_WeChatWinDllAddr + g_WxCalls.sendText.call2); - funcFree_t funcFree = (funcFree_t)(g_WeChatWinDllAddr + g_WxCalls.sendText.call3); + char buffer[0x460] = { 0 }; + SendMsgMgr_t funcSendMsgMgr = (SendMsgMgr_t)(g_WeChatWinDllAddr + g_WxCalls.sendText.call1); + SendTextMsg_t funcSendTextMsg = (SendTextMsg_t)(g_WeChatWinDllAddr + g_WxCalls.sendText.call2); + Free_t funcFree = (Free_t)(g_WeChatWinDllAddr + g_WxCalls.sendText.call3); funcSendMsgMgr(); success = funcSendTextMsg((QWORD)(&buffer), (QWORD)(&wxWxid), (QWORD)(&wxMsg), wxAters, 1, 1, 0, 0); funcFree((QWORD)(&buffer)); @@ -69,10 +69,10 @@ void SendImageMessage(string wxid, string path) WxString wxWxid(wsWxid); WxString wxPath(wsPath); - funcNew_t funcNew = (funcNew_t)(g_WeChatWinDllAddr + g_WxCalls.sendImg.call1); - funcFree_t funcFree = (funcFree_t)(g_WeChatWinDllAddr + g_WxCalls.sendImg.call2); - funcSendMsgMgr_t funcSendMsgMgr = (funcSendMsgMgr_t)(g_WeChatWinDllAddr + g_WxCalls.sendImg.call3); - funcSendImageMsg_t funcSendImage = (funcSendImageMsg_t)(g_WeChatWinDllAddr + g_WxCalls.sendImg.call4); + New_t funcNew = (New_t)(g_WeChatWinDllAddr + g_WxCalls.sendImg.call1); + Free_t funcFree = (Free_t)(g_WeChatWinDllAddr + g_WxCalls.sendImg.call2); + SendMsgMgr_t funcSendMsgMgr = (SendMsgMgr_t)(g_WeChatWinDllAddr + g_WxCalls.sendImg.call3); + SendImageMsg_t funcSendImage = (SendImageMsg_t)(g_WeChatWinDllAddr + g_WxCalls.sendImg.call4); char msg[0x460] = { 0 }; char msgTmp[0x460] = { 0 }; @@ -99,10 +99,10 @@ void SendFileMessage(string wxid, string path) WxString wxWxid(wsWxid); WxString wxPath(wsPath); - funcNew_t funcNew = (funcNew_t)(g_WeChatWinDllAddr + g_WxCalls.sendFile.call1); - funcFree_t funcFree = (funcFree_t)(g_WeChatWinDllAddr + g_WxCalls.sendFile.call2); - funcGetAppMsgMgr_t funcGetAppMsgMgr = (funcGetAppMsgMgr_t)(g_WeChatWinDllAddr + g_WxCalls.sendFile.call3); - funcSendFileMsg_t funcSendFile = (funcSendFileMsg_t)(g_WeChatWinDllAddr + g_WxCalls.sendFile.call4); + New_t funcNew = (New_t)(g_WeChatWinDllAddr + g_WxCalls.sendFile.call1); + Free_t funcFree = (Free_t)(g_WeChatWinDllAddr + g_WxCalls.sendFile.call2); + GetAppMsgMgr_t funcGetAppMsgMgr = (GetAppMsgMgr_t)(g_WeChatWinDllAddr + g_WxCalls.sendFile.call3); + SendFileMsg_t funcSendFile = (SendFileMsg_t)(g_WeChatWinDllAddr + g_WxCalls.sendFile.call4); char msg[0x460] = { 0 }; QWORD tmp1[4] = { 0 }; @@ -120,10 +120,10 @@ int SendRichTextMessage(RichText_t &rt) #define SRTM_SIZE 0x3F0 QWORD status = -1; - funcNew_t funcNew = (funcNew_t)(g_WeChatWinDllAddr + g_WxCalls.rt.call1); - funcFree_t funcFree = (funcFree_t)(g_WeChatWinDllAddr + g_WxCalls.rt.call2); - funcGetAppMsgMgr_t funcGetAppMsgMgr = (funcGetAppMsgMgr_t)(g_WeChatWinDllAddr + g_WxCalls.rt.call3); - funcSendRichTextMsg_t funcForwordPublicMsg = (funcSendRichTextMsg_t)(g_WeChatWinDllAddr + g_WxCalls.rt.call4); + New_t funcNew = (New_t)(g_WeChatWinDllAddr + g_WxCalls.rt.call1); + Free_t funcFree = (Free_t)(g_WeChatWinDllAddr + g_WxCalls.rt.call2); + GetAppMsgMgr_t funcGetAppMsgMgr = (GetAppMsgMgr_t)(g_WeChatWinDllAddr + g_WxCalls.rt.call3); + SendRichTextMsg_t funcForwordPublicMsg = (SendRichTextMsg_t)(g_WeChatWinDllAddr + g_WxCalls.rt.call4); char *buff = (char *)HeapAlloc(GetProcessHeap(), 0, SRTM_SIZE); if (buff == NULL) { @@ -164,7 +164,7 @@ int SendPatMessage(string roomid, string wxid) WxString wxRoomid(wsRoomid); WxString wxWxid(wsWxid); - funcSendPatMsg_t funcSendPatMsg = (funcSendPatMsg_t)(g_WeChatWinDllAddr + g_WxCalls.pm.call1); + SendPatMsg_t funcSendPatMsg = (SendPatMsg_t)(g_WeChatWinDllAddr + g_WxCalls.pm.call1); status = funcSendPatMsg((QWORD)(&wxRoomid), (QWORD)(&wxWxid)); return (int)status; @@ -176,7 +176,7 @@ int ForwardMessage(QWORD msgid, string receiver) uint32_t dbIdx = 0; QWORD localId = 0; - funcForwardMsg_t funcForwardMsg = (funcForwardMsg_t)(g_WeChatWinDllAddr + g_WxCalls.fm.call1); + ForwardMsg_t funcForwardMsg = (ForwardMsg_t)(g_WeChatWinDllAddr + g_WxCalls.fm.call1); if (GetLocalIdandDbidx(msgid, &localId, &dbIdx) != 0) { LOG_ERROR("Failed to get localId, Please check id: {}", to_string(msgid)); return status; From 81c8a3b1352e52d03e70b9032ce0c177e149984c Mon Sep 17 00:00:00 2001 From: Changhua Date: Tue, 2 Jul 2024 21:12:21 +0800 Subject: [PATCH 27/55] Refatoring --- WeChatFerry/spy/chatroom_mgmt.cpp | 18 ++++---- WeChatFerry/spy/contact_mgmt.cpp | 33 +++++++++----- WeChatFerry/spy/funcs.cpp | 43 +++++++++++------- WeChatFerry/spy/receive_msg.cpp | 75 +++++++++++++++++++------------ WeChatFerry/spy/send_msg.cpp | 52 ++++++++++++--------- 5 files changed, 137 insertions(+), 84 deletions(-) diff --git a/WeChatFerry/spy/chatroom_mgmt.cpp b/WeChatFerry/spy/chatroom_mgmt.cpp index 23d5d8b..f26e351 100644 --- a/WeChatFerry/spy/chatroom_mgmt.cpp +++ b/WeChatFerry/spy/chatroom_mgmt.cpp @@ -3,15 +3,17 @@ #include #include "chatroom_mgmt.h" -#include "load_calls.h" #include "log.h" #include "util.h" using namespace std; - -extern WxCalls_t g_WxCalls; extern QWORD g_WeChatWinDllAddr; +#define OS_GET_CHATROOM_MGR 0x1C4E200 +#define OS_ADD_MEMBERS 0x221B8A0 +#define OS_DELETE_MEMBERS 0x221BEE0 +#define OS_INVITE_MEMBERS 0x221B280 + typedef QWORD (*GetChatRoomMgr_t)(); typedef QWORD (*AddMemberToChatRoom_t)(QWORD, QWORD, QWORD, QWORD); typedef QWORD (*DelMemberFromChatRoom_t)(QWORD, QWORD, QWORD); @@ -26,8 +28,8 @@ int AddChatroomMember(string roomid, string wxids) return status; } - GetChatRoomMgr_t GetChatRoomMgr = (GetChatRoomMgr_t)(g_WeChatWinDllAddr + g_WxCalls.arm.call1); - AddMemberToChatRoom_t AddMembers = (AddMemberToChatRoom_t)(g_WeChatWinDllAddr + g_WxCalls.arm.call2); + GetChatRoomMgr_t GetChatRoomMgr = (GetChatRoomMgr_t)(g_WeChatWinDllAddr + OS_GET_CHATROOM_MGR); + AddMemberToChatRoom_t AddMembers = (AddMemberToChatRoom_t)(g_WeChatWinDllAddr + OS_ADD_MEMBERS); vector vMembers; vector vWxMembers; @@ -58,8 +60,8 @@ int DelChatroomMember(string roomid, string wxids) return status; } - GetChatRoomMgr_t GetChatRoomMgr = (GetChatRoomMgr_t)(g_WeChatWinDllAddr + g_WxCalls.drm.call1); - DelMemberFromChatRoom_t DelMembers = (DelMemberFromChatRoom_t)(g_WeChatWinDllAddr + g_WxCalls.drm.call2); + GetChatRoomMgr_t GetChatRoomMgr = (GetChatRoomMgr_t)(g_WeChatWinDllAddr + OS_GET_CHATROOM_MGR); + DelMemberFromChatRoom_t DelMembers = (DelMemberFromChatRoom_t)(g_WeChatWinDllAddr + OS_DELETE_MEMBERS); vector vMembers; vector vWxMembers; @@ -89,7 +91,7 @@ int InviteChatroomMember(string roomid, string wxids) return status; } - InviteMemberToChatRoom_t InviteMembers = (InviteMemberToChatRoom_t)(g_WeChatWinDllAddr + g_WxCalls.irm.call1); + InviteMemberToChatRoom_t InviteMembers = (InviteMemberToChatRoom_t)(g_WeChatWinDllAddr + OS_INVITE_MEMBERS); vector vMembers; vector vWxMembers; diff --git a/WeChatFerry/spy/contact_mgmt.cpp b/WeChatFerry/spy/contact_mgmt.cpp index 7873507..3b7b559 100644 --- a/WeChatFerry/spy/contact_mgmt.cpp +++ b/WeChatFerry/spy/contact_mgmt.cpp @@ -1,14 +1,23 @@ #pragma execution_character_set("utf-8") #include "contact_mgmt.h" -#include "load_calls.h" #include "log.h" #include "util.h" using namespace std; -extern WxCalls_t g_WxCalls; extern QWORD g_WeChatWinDllAddr; +#define OS_GET_CONTACT_MGR 0x1C0BDE0 +#define OS_GET_CONTACT_LIST 0x2265540 +#define OS_CONTACT_BIN 0x200 +#define OS_CONTACT_BIN_LEN 0x208 +#define OS_CONTACT_WXID 0x10 +#define OS_CONTACT_CODE 0x30 +#define OS_CONTACT_REMARK 0x80 +#define OS_CONTACT_NAME 0xA0 +#define OS_CONTACT_GENDER 0x0E +#define OS_CONTACT_STEP 0x6A8 + typedef QWORD (*GetContactMgr_t)(); typedef QWORD (*GetContactList_t)(QWORD, QWORD); @@ -48,8 +57,8 @@ static string GetCntString(QWORD start, QWORD end, const uint8_t *feat, size_t l vector GetContacts() { vector contacts; - GetContactMgr_t funcGetContactMgr = (GetContactMgr_t)(g_WeChatWinDllAddr + 0x1C0BDE0); - GetContactList_t funcGetContactList = (GetContactList_t)(g_WeChatWinDllAddr + 0x2265540); + GetContactMgr_t funcGetContactMgr = (GetContactMgr_t)(g_WeChatWinDllAddr + OS_GET_CONTACT_MGR); + GetContactList_t funcGetContactList = (GetContactList_t)(g_WeChatWinDllAddr + OS_GET_CONTACT_LIST); QWORD mgr = funcGetContactMgr(); QWORD addr[3] = { 0 }; @@ -62,13 +71,13 @@ vector GetContacts() QWORD pend = (QWORD)addr[2]; while (pstart < pend) { RpcContact_t cnt; - QWORD pbin = GET_QWORD(pstart + 0x200); - QWORD lenbin = GET_DWORD(pstart + 0x208); + QWORD pbin = GET_QWORD(pstart + OS_CONTACT_BIN); + QWORD lenbin = GET_DWORD(pstart + OS_CONTACT_BIN_LEN); - cnt.wxid = GetStringByWstrAddr(pstart + g_WxCalls.contact.wxId); // 0x10 - cnt.code = GetStringByWstrAddr(pstart + g_WxCalls.contact.wxCode); // 0x30 - cnt.remark = GetStringByWstrAddr(pstart + g_WxCalls.contact.wxRemark); // 0x80 - cnt.name = GetStringByWstrAddr(pstart + g_WxCalls.contact.wxName); // 0xA0 + cnt.wxid = GetStringByWstrAddr(pstart + OS_CONTACT_WXID); + cnt.code = GetStringByWstrAddr(pstart + OS_CONTACT_CODE); + cnt.remark = GetStringByWstrAddr(pstart + OS_CONTACT_REMARK); + cnt.name = GetStringByWstrAddr(pstart + OS_CONTACT_NAME); cnt.country = GetCntString(pbin, pbin + lenbin, FEAT_COUNTRY, FEAT_LEN); cnt.province = GetCntString(pbin, pbin + lenbin, FEAT_PROVINCE, FEAT_LEN); @@ -77,11 +86,11 @@ vector GetContacts() if (pbin == 0) { cnt.gender = 0; } else { - cnt.gender = (DWORD) * (uint8_t *)(pbin + g_WxCalls.contact.wxGender); // 0x0E + cnt.gender = (DWORD) * (uint8_t *)(pbin + OS_CONTACT_GENDER); } contacts.push_back(cnt); - pstart += 0x6A8; // 0x6A8 + pstart += OS_CONTACT_STEP; } return contacts; diff --git a/WeChatFerry/spy/funcs.cpp b/WeChatFerry/spy/funcs.cpp index 0c0f4cf..8266b76 100644 --- a/WeChatFerry/spy/funcs.cpp +++ b/WeChatFerry/spy/funcs.cpp @@ -11,6 +11,12 @@ #include "spy_types.h" #include "util.h" +using namespace std; +namespace fs = std::filesystem; + +extern bool gIsListeningPyq; +extern QWORD g_WeChatWinDllAddr; + #define HEADER_PNG1 0x89 #define HEADER_PNG2 0x50 #define HEADER_JPG1 0xFF @@ -18,12 +24,16 @@ #define HEADER_GIF1 0x47 #define HEADER_GIF2 0x49 -using namespace std; -namespace fs = std::filesystem; - -extern bool gIsListeningPyq; -extern WxCalls_t g_WxCalls; -extern QWORD g_WeChatWinDllAddr; +#define OS_GET_SNS_DATA_MGR 0x22A91C0 +#define OS_GET_SNS_FIRST_PAGE 0x2ED9080 +#define OS_GET_SNS_TIMELINE_MGR 0x2E6B110 +#define OS_GET_SNS_NEXT_PAGE 0x2EFEC00 +#define OS_NEW_CHAT_MSG 0x1C28800 +#define OS_FREE_CHAT_MSG 0x1C1FF10 +#define OS_GET_CHAT_MGR 0x1C51CF0 +#define OS_GET_MGR_BY_PREFIX_LOCAL_ID 0x2206280 +#define OS_GET_PRE_DOWNLOAD_MGR 0x1CD87E0 +#define OS_PUSH_ATTACH_TASK 0x1DA69C0 typedef QWORD (*GetSNSDataMgr_t)(); typedef QWORD (*GetSnsTimeLineMgr_t)(); @@ -131,8 +141,8 @@ static int GetFirstPage() { int status = -1; - GetSNSDataMgr_t GetSNSDataMgr = (GetSNSDataMgr_t)(g_WeChatWinDllAddr + 0x22A91C0); - GetSNSFirstPage_t GetSNSFirstPage = (GetSNSFirstPage_t)(g_WeChatWinDllAddr + 0x2ED9080); + GetSNSDataMgr_t GetSNSDataMgr = (GetSNSDataMgr_t)(g_WeChatWinDllAddr + OS_GET_SNS_DATA_MGR); + GetSNSFirstPage_t GetSNSFirstPage = (GetSNSFirstPage_t)(g_WeChatWinDllAddr + OS_GET_SNS_FIRST_PAGE); QWORD buff[16] = { 0 }; QWORD mgr = GetSNSDataMgr(); @@ -145,8 +155,8 @@ static int GetNextPage(QWORD id) { int status = -1; - GetSnsTimeLineMgr_t GetSnsTimeLineMgr = (GetSnsTimeLineMgr_t)(g_WeChatWinDllAddr + 0x2E6B110); - GetSNSNextPageScene_t GetSNSNextPageScene = (GetSNSNextPageScene_t)(g_WeChatWinDllAddr + 0x2EFEC00); + GetSnsTimeLineMgr_t GetSnsTimeLineMgr = (GetSnsTimeLineMgr_t)(g_WeChatWinDllAddr + OS_GET_SNS_TIMELINE_MGR); + GetSNSNextPageScene_t GetSNSNextPageScene = (GetSNSNextPageScene_t)(g_WeChatWinDllAddr + OS_GET_SNS_NEXT_PAGE); QWORD mgr = GetSnsTimeLineMgr(); status = (int)GetSNSNextPageScene(mgr, id); @@ -191,12 +201,13 @@ int DownloadAttach(QWORD id, string thumb, string extra) return status; } - NewChatMsg_t NewChatMsg = (NewChatMsg_t)(g_WeChatWinDllAddr + 0x1C28800); - FreeChatMsg_t FreeChatMsg = (FreeChatMsg_t)(g_WeChatWinDllAddr + 0x1C1FF10); - GetChatMgr_t GetChatMgr = (GetChatMgr_t)(g_WeChatWinDllAddr + 0x1C51CF0); - GetMgrByPrefixLocalId_t GetMgrByPrefixLocalId = (GetMgrByPrefixLocalId_t)(g_WeChatWinDllAddr + 0x2206280); - GetPreDownLoadMgr_t GetPreDownLoadMgr = (GetPreDownLoadMgr_t)(g_WeChatWinDllAddr + 0x1CD87E0); - PushAttachTask_t PushAttachTask = (PushAttachTask_t)(g_WeChatWinDllAddr + 0x1DA69C0); + NewChatMsg_t NewChatMsg = (NewChatMsg_t)(g_WeChatWinDllAddr + OS_NEW_CHAT_MSG); + FreeChatMsg_t FreeChatMsg = (FreeChatMsg_t)(g_WeChatWinDllAddr + OS_FREE_CHAT_MSG); + GetChatMgr_t GetChatMgr = (GetChatMgr_t)(g_WeChatWinDllAddr + OS_GET_CHAT_MGR); + GetPreDownLoadMgr_t GetPreDownLoadMgr = (GetPreDownLoadMgr_t)(g_WeChatWinDllAddr + OS_GET_PRE_DOWNLOAD_MGR); + PushAttachTask_t PushAttachTask = (PushAttachTask_t)(g_WeChatWinDllAddr + OS_PUSH_ATTACH_TASK); + GetMgrByPrefixLocalId_t GetMgrByPrefixLocalId + = (GetMgrByPrefixLocalId_t)(g_WeChatWinDllAddr + OS_GET_MGR_BY_PREFIX_LOCAL_ID); LARGE_INTEGER l; l.HighPart = dbIdx; diff --git a/WeChatFerry/spy/receive_msg.cpp b/WeChatFerry/spy/receive_msg.cpp index 3963303..a1834fb 100644 --- a/WeChatFerry/spy/receive_msg.cpp +++ b/WeChatFerry/spy/receive_msg.cpp @@ -6,7 +6,6 @@ #include #include -#include "load_calls.h" #include "log.h" #include "receive_msg.h" #include "user_info.h" @@ -19,9 +18,29 @@ extern condition_variable gCV; extern queue gMsgQueue; // Defined in spy.cpp -extern WxCalls_t g_WxCalls; extern QWORD g_WeChatWinDllAddr; +#define OS_RECV_MSG_ID 0x30 +#define OS_RECV_MSG_TYPE 0x38 +#define OS_RECV_MSG_SELF 0x3C +#define OS_RECV_MSG_TS 0x44 +#define OS_RECV_MSG_ROOMID 0x48 +#define OS_RECV_MSG_CONTENT 0x88 +#define OS_RECV_MSG_WXID 0x240 +#define OS_RECV_MSG_SIGN 0x260 +#define OS_RECV_MSG_THUMB 0x280 +#define OS_RECV_MSG_EXTRA 0x2A0 +#define OS_RECV_MSG_XML 0x308 +#define OS_RECV_MSG_CALL 0x2205510 +#define OS_PYQ_MSG_START 0x30 +#define OS_PYQ_MSG_END 0x38 +#define OS_PYQ_MSG_TS 0x38 +#define OS_PYQ_MSG_XML 0x9B8 +#define OS_PYQ_MSG_SENDER 0x18 +#define OS_PYQ_MSG_CONTENT 0x48 +#define OS_PYQ_MSG_CALL 0x2EFAA10 +#define OS_WXLOG 0x26DA2D0 + typedef QWORD (*RecvMsg_t)(QWORD, QWORD); typedef QWORD (*WxLog_t)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD); typedef QWORD (*RecvPyq_t)(QWORD, QWORD, QWORD); @@ -79,22 +98,22 @@ static QWORD DispatchMsg(QWORD arg1, QWORD arg2) { WxMsg_t wxMsg = { 0 }; try { - wxMsg.id = GET_QWORD(arg2 + g_WxCalls.recvMsg.msgId); - wxMsg.type = GET_DWORD(arg2 + g_WxCalls.recvMsg.type); - wxMsg.is_self = GET_DWORD(arg2 + g_WxCalls.recvMsg.isSelf); - wxMsg.ts = GET_DWORD(arg2 + g_WxCalls.recvMsg.ts); - wxMsg.content = GetStringByWstrAddr(arg2 + g_WxCalls.recvMsg.content); - wxMsg.sign = GetStringByWstrAddr(arg2 + g_WxCalls.recvMsg.sign); - wxMsg.xml = GetStringByWstrAddr(arg2 + g_WxCalls.recvMsg.msgXml); + wxMsg.id = GET_QWORD(arg2 + OS_RECV_MSG_ID); + wxMsg.type = GET_DWORD(arg2 + OS_RECV_MSG_TYPE); + wxMsg.is_self = GET_DWORD(arg2 + OS_RECV_MSG_SELF); + wxMsg.ts = GET_DWORD(arg2 + OS_RECV_MSG_TS); + wxMsg.content = GetStringByWstrAddr(arg2 + OS_RECV_MSG_CONTENT); + wxMsg.sign = GetStringByWstrAddr(arg2 + OS_RECV_MSG_SIGN); + wxMsg.xml = GetStringByWstrAddr(arg2 + OS_RECV_MSG_XML); - string roomid = GetStringByWstrAddr(arg2 + g_WxCalls.recvMsg.roomId); + string roomid = GetStringByWstrAddr(arg2 + OS_RECV_MSG_ROOMID); wxMsg.roomid = roomid; if (roomid.find("@chatroom") != string::npos) { // 群 ID 的格式为 xxxxxxxxxxx@chatroom wxMsg.is_group = true; if (wxMsg.is_self) { wxMsg.sender = GetSelfWxid(); } else { - wxMsg.sender = GetStringByWstrAddr(arg2 + g_WxCalls.recvMsg.wxid); + wxMsg.sender = GetStringByWstrAddr(arg2 + OS_RECV_MSG_WXID); } } else { wxMsg.is_group = false; @@ -105,13 +124,13 @@ static QWORD DispatchMsg(QWORD arg1, QWORD arg2) } } - wxMsg.thumb = GetStringByWstrAddr(arg2 + g_WxCalls.recvMsg.thumb); + wxMsg.thumb = GetStringByWstrAddr(arg2 + OS_RECV_MSG_THUMB); if (!wxMsg.thumb.empty()) { wxMsg.thumb = GetHomePath() + wxMsg.thumb; replace(wxMsg.thumb.begin(), wxMsg.thumb.end(), '\\', '/'); } - wxMsg.extra = GetStringByWstrAddr(arg2 + g_WxCalls.recvMsg.extra); + wxMsg.extra = GetStringByWstrAddr(arg2 + OS_RECV_MSG_EXTRA); if (!wxMsg.extra.empty()) { wxMsg.extra = GetHomePath() + wxMsg.extra; replace(wxMsg.extra.begin(), wxMsg.extra.end(), '\\', '/'); @@ -146,8 +165,8 @@ static QWORD PrintWxLog(QWORD a1, QWORD a2, QWORD a3, QWORD a4, QWORD a5, QWORD static void DispatchPyq(QWORD arg1, QWORD arg2, QWORD arg3) { - QWORD startAddr = *(QWORD *)(arg2 + 0x30); - QWORD endAddr = *(QWORD *)(arg2 + 0x38); + QWORD startAddr = *(QWORD *)(arg2 + OS_PYQ_MSG_START); + QWORD endAddr = *(QWORD *)(arg2 + OS_PYQ_MSG_END); if (startAddr == 0) { return; @@ -160,10 +179,10 @@ static void DispatchPyq(QWORD arg1, QWORD arg2, QWORD arg3) wxMsg.is_self = false; wxMsg.is_group = false; wxMsg.id = GET_QWORD(startAddr); - wxMsg.ts = GET_DWORD(startAddr + 0x38); - wxMsg.xml = GetStringByWstrAddr(startAddr + 0x9B8); - wxMsg.sender = GetStringByWstrAddr(startAddr + 0x18); - wxMsg.content = GetStringByWstrAddr(startAddr + 0x48); + wxMsg.ts = GET_DWORD(startAddr + OS_PYQ_MSG_TS); + wxMsg.xml = GetStringByWstrAddr(startAddr + OS_PYQ_MSG_XML); + wxMsg.sender = GetStringByWstrAddr(startAddr + OS_PYQ_MSG_SENDER); + wxMsg.content = GetStringByWstrAddr(startAddr + OS_PYQ_MSG_CONTENT); { unique_lock lock(gMutex); @@ -179,11 +198,11 @@ static void DispatchPyq(QWORD arg1, QWORD arg2, QWORD arg3) void EnableLog() { MH_STATUS status = MH_UNKNOWN; - if (g_WeChatWinDllAddr == 0) { - LOG_WARN("g_WeChatWinDllAddr == 0"); + if (gIsLogging) { + LOG_WARN("gIsLogging"); return; } - WxLog_t funcWxLog = (WxLog_t)(g_WeChatWinDllAddr + 0x26DA2D0); + WxLog_t funcWxLog = (WxLog_t)(g_WeChatWinDllAddr + OS_WXLOG); if (!isMH_Initialized) { status = MH_Initialize(); @@ -234,11 +253,11 @@ void DisableLog() void ListenMessage() { MH_STATUS status = MH_UNKNOWN; - if (gIsListening || (g_WeChatWinDllAddr == 0)) { - LOG_WARN("gIsListening || (g_WeChatWinDllAddr == 0)"); + if (gIsListening) { + LOG_WARN("gIsListening"); return; } - funcRecvMsg = (RecvMsg_t)(g_WeChatWinDllAddr + g_WxCalls.recvMsg.call); + funcRecvMsg = (RecvMsg_t)(g_WeChatWinDllAddr + OS_RECV_MSG_CALL); if (!isMH_Initialized) { status = MH_Initialize(); @@ -296,11 +315,11 @@ void UnListenMessage() void ListenPyq() { MH_STATUS status = MH_UNKNOWN; - if (gIsListeningPyq || (g_WeChatWinDllAddr == 0)) { - LOG_WARN("gIsListeningPyq || (g_WeChatWinDllAddr == 0)"); + if (gIsListeningPyq) { + LOG_WARN("gIsListeningPyq"); return; } - funcRecvPyq = (RecvPyq_t)(g_WeChatWinDllAddr + 0x2EFAA10); + funcRecvPyq = (RecvPyq_t)(g_WeChatWinDllAddr + OS_PYQ_MSG_CALL); if (!isMH_Initialized) { status = MH_Initialize(); diff --git a/WeChatFerry/spy/send_msg.cpp b/WeChatFerry/spy/send_msg.cpp index 7511c1b..af8a56e 100644 --- a/WeChatFerry/spy/send_msg.cpp +++ b/WeChatFerry/spy/send_msg.cpp @@ -9,15 +9,28 @@ #include "util.h" extern HANDLE g_hEvent; -extern WxCalls_t g_WxCalls; extern QWORD g_WeChatWinDllAddr; extern string GetSelfWxid(); // Defined in spy.cpp +#define SRTM_SIZE 0x3F0 + +#define OS_NEW 0x1C28800 +#define OS_FREE 0x1C1FF10 +#define OS_SEND_MSG_MGR 0x1C1E690 +#define OS_SEND_TEXT 0x238DDD0 +#define OS_SEND_IMAGE 0x2383560 +#define OS_GET_APP_MSG_MGR 0x1C23630 +#define OS_SEND_FILE 0x21969E0 +#define OS_RTM_NEW 0x1C27D50 +#define OS_RTM_FREE 0x1C27120 +#define OS_SEND_RICH_TEXT 0x21A09C0 +#define OS_SEND_PAT_MSG 0x2D669B0 +#define OS_FORWARD_MSG 0x238D350 + typedef QWORD (*New_t)(QWORD); typedef QWORD (*Free_t)(QWORD); typedef QWORD (*SendMsgMgr_t)(); typedef QWORD (*GetAppMsgMgr_t)(); - typedef QWORD (*SendTextMsg_t)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD); typedef QWORD (*SendImageMsg_t)(QWORD, QWORD, QWORD, QWORD, QWORD); typedef QWORD (*SendFileMsg_t)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD *, QWORD, QWORD *, QWORD, QWORD *, QWORD, @@ -53,9 +66,9 @@ void SendTextMessage(string wxid, string msg, string atWxids) QWORD wxAters = (QWORD) & ((RawVector_t *)&vWxAtWxids)->start; char buffer[0x460] = { 0 }; - SendMsgMgr_t funcSendMsgMgr = (SendMsgMgr_t)(g_WeChatWinDllAddr + g_WxCalls.sendText.call1); - SendTextMsg_t funcSendTextMsg = (SendTextMsg_t)(g_WeChatWinDllAddr + g_WxCalls.sendText.call2); - Free_t funcFree = (Free_t)(g_WeChatWinDllAddr + g_WxCalls.sendText.call3); + SendMsgMgr_t funcSendMsgMgr = (SendMsgMgr_t)(g_WeChatWinDllAddr + OS_SEND_MSG_MGR); + SendTextMsg_t funcSendTextMsg = (SendTextMsg_t)(g_WeChatWinDllAddr + OS_SEND_TEXT); + Free_t funcFree = (Free_t)(g_WeChatWinDllAddr + OS_FREE); funcSendMsgMgr(); success = funcSendTextMsg((QWORD)(&buffer), (QWORD)(&wxWxid), (QWORD)(&wxMsg), wxAters, 1, 1, 0, 0); funcFree((QWORD)(&buffer)); @@ -69,10 +82,10 @@ void SendImageMessage(string wxid, string path) WxString wxWxid(wsWxid); WxString wxPath(wsPath); - New_t funcNew = (New_t)(g_WeChatWinDllAddr + g_WxCalls.sendImg.call1); - Free_t funcFree = (Free_t)(g_WeChatWinDllAddr + g_WxCalls.sendImg.call2); - SendMsgMgr_t funcSendMsgMgr = (SendMsgMgr_t)(g_WeChatWinDllAddr + g_WxCalls.sendImg.call3); - SendImageMsg_t funcSendImage = (SendImageMsg_t)(g_WeChatWinDllAddr + g_WxCalls.sendImg.call4); + New_t funcNew = (New_t)(g_WeChatWinDllAddr + OS_NEW); + Free_t funcFree = (Free_t)(g_WeChatWinDllAddr + OS_FREE); + SendMsgMgr_t funcSendMsgMgr = (SendMsgMgr_t)(g_WeChatWinDllAddr + OS_SEND_MSG_MGR); + SendImageMsg_t funcSendImage = (SendImageMsg_t)(g_WeChatWinDllAddr + OS_SEND_IMAGE); char msg[0x460] = { 0 }; char msgTmp[0x460] = { 0 }; @@ -99,10 +112,10 @@ void SendFileMessage(string wxid, string path) WxString wxWxid(wsWxid); WxString wxPath(wsPath); - New_t funcNew = (New_t)(g_WeChatWinDllAddr + g_WxCalls.sendFile.call1); - Free_t funcFree = (Free_t)(g_WeChatWinDllAddr + g_WxCalls.sendFile.call2); - GetAppMsgMgr_t funcGetAppMsgMgr = (GetAppMsgMgr_t)(g_WeChatWinDllAddr + g_WxCalls.sendFile.call3); - SendFileMsg_t funcSendFile = (SendFileMsg_t)(g_WeChatWinDllAddr + g_WxCalls.sendFile.call4); + New_t funcNew = (New_t)(g_WeChatWinDllAddr + OS_NEW); + Free_t funcFree = (Free_t)(g_WeChatWinDllAddr + OS_FREE); + GetAppMsgMgr_t funcGetAppMsgMgr = (GetAppMsgMgr_t)(g_WeChatWinDllAddr + OS_GET_APP_MSG_MGR); + SendFileMsg_t funcSendFile = (SendFileMsg_t)(g_WeChatWinDllAddr + OS_SEND_FILE); char msg[0x460] = { 0 }; QWORD tmp1[4] = { 0 }; @@ -117,13 +130,12 @@ void SendFileMessage(string wxid, string path) int SendRichTextMessage(RichText_t &rt) { // TODO: Fix memory leak -#define SRTM_SIZE 0x3F0 QWORD status = -1; - New_t funcNew = (New_t)(g_WeChatWinDllAddr + g_WxCalls.rt.call1); - Free_t funcFree = (Free_t)(g_WeChatWinDllAddr + g_WxCalls.rt.call2); - GetAppMsgMgr_t funcGetAppMsgMgr = (GetAppMsgMgr_t)(g_WeChatWinDllAddr + g_WxCalls.rt.call3); - SendRichTextMsg_t funcForwordPublicMsg = (SendRichTextMsg_t)(g_WeChatWinDllAddr + g_WxCalls.rt.call4); + New_t funcNew = (New_t)(g_WeChatWinDllAddr + OS_RTM_NEW); + Free_t funcFree = (Free_t)(g_WeChatWinDllAddr + OS_RTM_FREE); + GetAppMsgMgr_t funcGetAppMsgMgr = (GetAppMsgMgr_t)(g_WeChatWinDllAddr + OS_GET_APP_MSG_MGR); + SendRichTextMsg_t funcForwordPublicMsg = (SendRichTextMsg_t)(g_WeChatWinDllAddr + OS_SEND_RICH_TEXT); char *buff = (char *)HeapAlloc(GetProcessHeap(), 0, SRTM_SIZE); if (buff == NULL) { @@ -164,7 +176,7 @@ int SendPatMessage(string roomid, string wxid) WxString wxRoomid(wsRoomid); WxString wxWxid(wsWxid); - SendPatMsg_t funcSendPatMsg = (SendPatMsg_t)(g_WeChatWinDllAddr + g_WxCalls.pm.call1); + SendPatMsg_t funcSendPatMsg = (SendPatMsg_t)(g_WeChatWinDllAddr + OS_SEND_PAT_MSG); status = funcSendPatMsg((QWORD)(&wxRoomid), (QWORD)(&wxWxid)); return (int)status; @@ -176,7 +188,7 @@ int ForwardMessage(QWORD msgid, string receiver) uint32_t dbIdx = 0; QWORD localId = 0; - ForwardMsg_t funcForwardMsg = (ForwardMsg_t)(g_WeChatWinDllAddr + g_WxCalls.fm.call1); + ForwardMsg_t funcForwardMsg = (ForwardMsg_t)(g_WeChatWinDllAddr + OS_FORWARD_MSG); if (GetLocalIdandDbidx(msgid, &localId, &dbIdx) != 0) { LOG_ERROR("Failed to get localId, Please check id: {}", to_string(msgid)); return status; From e66b61aa6750e709212c0bffafd3b55f5e19c57c Mon Sep 17 00:00:00 2001 From: Changhua Date: Tue, 2 Jul 2024 22:03:59 +0800 Subject: [PATCH 28/55] Refactoring --- WeChatFerry/spy/Spy.vcxproj | 2 - WeChatFerry/spy/Spy.vcxproj.filters | 6 - WeChatFerry/spy/exec_sql.cpp | 1 - WeChatFerry/spy/funcs.cpp | 3 +- WeChatFerry/spy/load_calls.cpp | 55 --------- WeChatFerry/spy/load_calls.h | 5 - WeChatFerry/spy/spy.cpp | 14 ++- WeChatFerry/spy/spy.h | 2 + WeChatFerry/spy/spy_types.h | 180 ---------------------------- WeChatFerry/spy/sqlite3.h | 4 +- WeChatFerry/spy/user_info.cpp | 25 ++-- 11 files changed, 31 insertions(+), 266 deletions(-) delete mode 100644 WeChatFerry/spy/load_calls.cpp delete mode 100644 WeChatFerry/spy/load_calls.h diff --git a/WeChatFerry/spy/Spy.vcxproj b/WeChatFerry/spy/Spy.vcxproj index b587e00..0c44f9a 100644 --- a/WeChatFerry/spy/Spy.vcxproj +++ b/WeChatFerry/spy/Spy.vcxproj @@ -237,7 +237,6 @@ xcopy /y $(OutDir)$(TargetFileName) $(SolutionDir)..\clients\python\wcferry - @@ -260,7 +259,6 @@ xcopy /y $(OutDir)$(TargetFileName) $(SolutionDir)..\clients\python\wcferry - diff --git a/WeChatFerry/spy/Spy.vcxproj.filters b/WeChatFerry/spy/Spy.vcxproj.filters index 9cb084c..f2b9096 100644 --- a/WeChatFerry/spy/Spy.vcxproj.filters +++ b/WeChatFerry/spy/Spy.vcxproj.filters @@ -30,9 +30,6 @@ 头文件 - - 头文件 - 头文件 @@ -104,9 +101,6 @@ 源文件 - - 源文件 - 源文件 diff --git a/WeChatFerry/spy/exec_sql.cpp b/WeChatFerry/spy/exec_sql.cpp index 51e5f81..5de9628 100644 --- a/WeChatFerry/spy/exec_sql.cpp +++ b/WeChatFerry/spy/exec_sql.cpp @@ -1,7 +1,6 @@ #include #include "exec_sql.h" -#include "load_calls.h" #include "log.h" #include "sqlite3.h" #include "util.h" diff --git a/WeChatFerry/spy/funcs.cpp b/WeChatFerry/spy/funcs.cpp index 8266b76..9ff3edc 100644 --- a/WeChatFerry/spy/funcs.cpp +++ b/WeChatFerry/spy/funcs.cpp @@ -24,6 +24,7 @@ extern QWORD g_WeChatWinDllAddr; #define HEADER_GIF1 0x47 #define HEADER_GIF2 0x49 +#define OS_LOGIN_STATUS 0x5AB86A8 #define OS_GET_SNS_DATA_MGR 0x22A91C0 #define OS_GET_SNS_FIRST_PAGE 0x2ED9080 #define OS_GET_SNS_TIMELINE_MGR 0x2E6B110 @@ -48,7 +49,7 @@ typedef QWORD (*PushAttachTask_t)(QWORD, QWORD, QWORD, QWORD); typedef QWORD (*GetOCRManager_t)(); typedef QWORD (*DoOCRTask_t)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD); -int IsLogin(void) { return (int)GET_QWORD(g_WeChatWinDllAddr + g_WxCalls.login); } +int IsLogin(void) { return (int)GET_QWORD(g_WeChatWinDllAddr + OS_LOGIN_STATUS); } static string get_key(uint8_t header1, uint8_t header2, uint8_t *key) { diff --git a/WeChatFerry/spy/load_calls.cpp b/WeChatFerry/spy/load_calls.cpp deleted file mode 100644 index 01f9545..0000000 --- a/WeChatFerry/spy/load_calls.cpp +++ /dev/null @@ -1,55 +0,0 @@ -#include -#include - -#include "load_calls.h" - -#define SUPPORT_VERSION L"3.9.10.27" - -WxCalls_t wxCalls = { - 0x5AB86A8, // Login Status - { 0x5AB7FB8, 0x5AB8098, 0x5AB7FD8, 0x5A7E190 }, // User Info: wxid, nickname, mobile, home - { 0x1C1E690, 0x238DDD0, 0x1C1FF10 }, // Send Text Message - /* Receive Message: - Hook, call, msgId, type, isSelf, ts, roomId, content, wxid, sign, thumb, extra, msgXml */ - { 0x00, 0x2205510, 0x30, 0x38, 0x3C, 0x44, 0x48, 0x88, 0x240, 0x260, 0x280, 0x2A0, 0x308 }, - { 0x1C28800, 0x1C1FF10, 0x1C1E690, 0x2383560 }, // Send Image Message - { 0x1C28800, 0x1C1FF10, 0x1C23630, 0x21969E0 }, // Send File Message - { 0xB8A70, 0x3ED5E0, 0x107F00, 0x3ED7B0, 0x2386FE4 }, // Send xml Message - { 0x771980, 0x4777E0, 0x239E888 }, // Send Emotion Message - /* Get Contacts: - call1, call2, wxId, Code, Remark,Name,Gender,Country,Province,City*/ - { 0x00, 0x00, 0x10, 0x30, 0x80, 0xA0, 0x0E, 0x00, 0x00, 0x00 }, - /* Exec Sql: - Exec, base, start, end, slot, name*/ - { 0x141BDF0, 0x2366934, 0x1428, 0x142C, 0x3C, 0x50 }, - { 0xA17D50, 0xF59E40, 0xA18BD0, 0xA17E70 }, // Accept New Friend application - { 0x1C4E200, 0x221B8A0, 0x00 }, // Add chatroom members - { 0x1C4E200, 0x221BEE0, 0x00 }, // Delete chatroom members - { 0x7B2E60, 0x15E2C20, 0x79C250 }, // Receive transfer - /* Receive PYQ - hook, call, call1, call2, call3, start, end, ts, wxid, content, xml, step*/ - { 0x14F9E15, 0x14FA0A0, 0xC39680, 0x14E2140, 0x14E21E0, 0x20, 0x24, 0x2C, 0x18, 0x3C, 0x384, 0xB48 }, - /* call1, call2, call3, call4, call5, call6*/ - { 0x76F010, 0x792700, 0xBC0370, 0x80F110, 0x82BB40, 0x756E30}, - /* call1, call2, call3, call4, call5*/ - {0x76F010, 0x792700, 0xBC0370, 0xBB5F70, 0x756E30}, - {0x1C27D50, 0x1C27120, 0x1C23630, 0x21A09C0}, // Send Rich Text Message - {0x2D669B0}, // Send Pat Message - {0x221B280, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // Invite chatroom members - /* call1, call2, call3 */ - {0x80A800, 0x80F270, 0x13DA3E0}, - {0x238D350}, // Forward message - /* call1, call2, url */ - {0xAE9DB0, 0xCDA6F0, 0x3040DE8} -}; - -int LoadCalls(const wchar_t *version, WxCalls_t *calls) -{ - if (wcscmp(version, SUPPORT_VERSION) != 0) { - return -1; - } - - memcpy_s(calls, sizeof(WxCalls_t), &wxCalls, sizeof(WxCalls_t)); - - return 0; -} diff --git a/WeChatFerry/spy/load_calls.h b/WeChatFerry/spy/load_calls.h deleted file mode 100644 index 2f8410e..0000000 --- a/WeChatFerry/spy/load_calls.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#include "spy_types.h" - -int LoadCalls(const wchar_t *version, WxCalls_t *calls); diff --git a/WeChatFerry/spy/spy.cpp b/WeChatFerry/spy/spy.cpp index ef711fe..576276c 100644 --- a/WeChatFerry/spy/spy.cpp +++ b/WeChatFerry/spy/spy.cpp @@ -1,14 +1,20 @@ #include -#include "load_calls.h" #include "log.h" #include "rpc_server.h" #include "spy.h" #include "util.h" -WxCalls_t g_WxCalls = { 0 }; UINT64 g_WeChatWinDllAddr = 0; +static bool IsWxVersionMatched(const wchar_t *version) +{ + if (wcscmp(version, SUPPORT_VERSION) != 0) { + return false; + } + return true; +} + void InitSpy(LPVOID args) { @@ -19,7 +25,7 @@ void InitSpy(LPVOID args) g_WeChatWinDllAddr = (UINT64)GetModuleHandle(L"WeChatWin.dll"); // 获取wechatWin模块地址 if (g_WeChatWinDllAddr == 0) { LOG_ERROR("获取 wechatWin.dll 模块地址失败"); - return; + return; // TODO: 退出进程,避免后面操作失败 } if (!GetWeChatVersion(version)) { // 获取微信版本 @@ -27,7 +33,7 @@ void InitSpy(LPVOID args) return; } LOG_INFO("WeChat version: {}", Wstring2String(version).c_str()); - if (LoadCalls(version, &g_WxCalls) != 0) { // 加载微信版本对应的Call地址 + if (!IsWxVersionMatched(version)) { LOG_ERROR("不支持当前版本"); MessageBox(NULL, L"不支持当前版本", L"错误", 0); return; diff --git a/WeChatFerry/spy/spy.h b/WeChatFerry/spy/spy.h index 3aa41dd..f985134 100644 --- a/WeChatFerry/spy/spy.h +++ b/WeChatFerry/spy/spy.h @@ -2,5 +2,7 @@ #include "framework.h" +#define SUPPORT_VERSION L"3.9.10.27" + void InitSpy(int port); void CleanupSpy(); diff --git a/WeChatFerry/spy/spy_types.h b/WeChatFerry/spy/spy_types.h index ded8abc..7fd1008 100644 --- a/WeChatFerry/spy/spy_types.h +++ b/WeChatFerry/spy/spy_types.h @@ -4,186 +4,6 @@ #include typedef uint64_t QWORD; -typedef struct UserInfoCall { - DWORD wxid; - DWORD nickName; - DWORD mobile; - DWORD home; -} UserInfoCall_t; - -typedef struct RecvMsg { - DWORD hook; // Hook地址 - DWORD call; // Call地址 - DWORD msgId; // 消息ID地址 - DWORD type; // 消息类型地址 - DWORD isSelf; // 是否自己发送标志地址 - DWORD ts; // TimeStamp - DWORD roomId; // 群聊时,为群ID;私聊时,为微信ID - DWORD content; // 消息内容地址 - DWORD wxid; // 私聊时,为空;群聊时,为发送者微信ID - DWORD sign; // Sign - DWORD thumb; // 缩略图 - DWORD extra; // 附加数据 - DWORD msgXml; // 消息xml内容地址 -} RecvMsg_t; - -typedef struct SendText { - DWORD call1; - DWORD call2; - DWORD call3; -} SendText_t; - -typedef struct Sendfile { - DWORD call1; - DWORD call2; - DWORD call3; - DWORD call4; -} Sendfile_t; - -typedef struct Contact { - DWORD base; - DWORD head; - DWORD wxId; - DWORD wxCode; - DWORD wxRemark; - DWORD wxName; - DWORD wxGender; - DWORD wxCountry; - DWORD wxProvince; - DWORD wxCity; -} Contact_t; - -typedef struct Sql { - DWORD exec; - DWORD base; - DWORD start; - DWORD end; - DWORD slot; - DWORD name; -} Sql_t; - -typedef struct NewFriend { - DWORD call1; - DWORD call2; - DWORD call3; - DWORD call4; -} NewFriend_t; - -typedef struct RoomMember { - DWORD call1; - DWORD call2; - DWORD call3; -} RoomMember_t; - -typedef struct Xml { - DWORD call1; - DWORD call2; - DWORD call3; - DWORD call4; - DWORD param; -} Xml_t; - -typedef struct TF { - DWORD call1; - DWORD call2; - DWORD call3; -} TF_t; - -typedef struct Pyq { - DWORD hook; - DWORD call; - DWORD call1; - DWORD call2; - DWORD call3; - DWORD start; - DWORD end; - DWORD ts; - DWORD wxid; - DWORD content; - DWORD xml; - DWORD step; -} Pyq_t; - -typedef struct DlAttach { - DWORD call1; - DWORD call2; - DWORD call3; - DWORD call4; - DWORD call5; - DWORD call6; -} DlAttach_t; - -typedef struct RevokeMsg { - DWORD call1; - DWORD call2; - DWORD call3; - DWORD call4; - DWORD call5; -} RevokeMsg_t; - -typedef struct CallRichText { - DWORD call1; - DWORD call2; - DWORD call3; - DWORD call4; -} CallRichText_t; - -typedef struct CallPatMsg { - DWORD call1; -} CallPatMsg_t; - -typedef struct CallInviteCM { - DWORD call1; - DWORD call2; - DWORD call3; - DWORD call4; - DWORD call5; - DWORD call6; - DWORD call7; - DWORD call8; -} CallInviteCM_t; - -typedef struct CallOcr { - DWORD call1; - DWORD call2; - DWORD call3; -} CallOcr_t; - -typedef struct CallFm { - DWORD call1; -} CallFm_t; - -typedef struct CallRfLoginQr { - DWORD call1; - DWORD call2; - DWORD url; -} CallRfLoginQr_t; - -typedef struct WxCalls { - DWORD login; // 登录状态 - UserInfoCall_t ui; // 用户信息 - SendText_t sendText; // 发送消息 - RecvMsg_t recvMsg; // 接收消息 - Sendfile_t sendImg; // 发送图片 - Sendfile_t sendFile; // 发送文件 - Xml_t sendXml; // 发送XML - Sendfile_t sendEmo; // 发送表情 - Contact_t contact; // 获取联系人 - Sql_t sql; // 执行 SQL - NewFriend_t anf; // 通过好友申请 - RoomMember_t arm; // 添加群成员 - RoomMember_t drm; // 删除群成员 - TF_t tf; // 接收转账 - Pyq_t pyq; // 接收朋友圈消息 - DlAttach_t da; // 下载资源(图片、文件、视频) - RevokeMsg_t rm; // 撤回消息 - CallRichText_t rt; // 发送消息卡片 - CallPatMsg_t pm; // 发送拍一拍消息 - CallInviteCM_t irm; // 邀请群成员 - CallOcr_t ocr; // OCR - CallFm_t fm; // 转发消息 - CallRfLoginQr_t rlq; // 刷新登录二维码 -} WxCalls_t; struct WxString { const wchar_t *wptr; diff --git a/WeChatFerry/spy/sqlite3.h b/WeChatFerry/spy/sqlite3.h index fe34ab7..09bc15d 100644 --- a/WeChatFerry/spy/sqlite3.h +++ b/WeChatFerry/spy/sqlite3.h @@ -1,7 +1,9 @@ -#pragma once +#pragma once #include "Windows.h" +#include "spy_types.h" + #define SQLITE_OK 0 /* Successful result */ /* beginning-of-error-codes */ diff --git a/WeChatFerry/spy/user_info.cpp b/WeChatFerry/spy/user_info.cpp index f2e370d..28f8543 100644 --- a/WeChatFerry/spy/user_info.cpp +++ b/WeChatFerry/spy/user_info.cpp @@ -1,17 +1,20 @@ #include "user_info.h" -#include "load_calls.h" #include "log.h" #include "util.h" -extern WxCalls_t g_WxCalls; extern UINT64 g_WeChatWinDllAddr; +#define OS_USER_HOME 0x5A7E190 +#define OS_USER_WXID 0x5AB7FB8 +#define OS_USER_NAME 0x5AB8098 +#define OS_USER_MOBILE 0x5AB7FD8 + static char home[MAX_PATH] = { 0 }; string GetHomePath() { if (home[0] == 0) { - string path = Wstring2String(GET_WSTRING(g_WeChatWinDllAddr + g_WxCalls.ui.home)) + "\\WeChat Files\\"; + string path = Wstring2String(GET_WSTRING(g_WeChatWinDllAddr + OS_USER_HOME)) + "\\WeChat Files\\"; strncpy_s(home, path.c_str(), path.size()); } @@ -22,15 +25,15 @@ string GetSelfWxid() { UINT64 wxidType = 0; try { - wxidType = GET_UINT64(g_WeChatWinDllAddr + g_WxCalls.ui.wxid + 0x18); + wxidType = GET_UINT64(g_WeChatWinDllAddr + OS_USER_WXID + 0x18); if (wxidType == 0xF) { - return GET_STRING_FROM_P(g_WeChatWinDllAddr + g_WxCalls.ui.wxid); + return GET_STRING_FROM_P(g_WeChatWinDllAddr + OS_USER_WXID); } else { - return GET_STRING(g_WeChatWinDllAddr + g_WxCalls.ui.wxid); + return GET_STRING(g_WeChatWinDllAddr + OS_USER_WXID); } } catch (...) { LOG_ERROR("wxid type: {:#x}", wxidType); - LOG_BUFFER((uint8_t *)(g_WeChatWinDllAddr + g_WxCalls.ui.wxid), 20); + LOG_BUFFER((uint8_t *)(g_WeChatWinDllAddr + OS_USER_WXID), 20); return "empty_wxid"; } } @@ -41,14 +44,14 @@ UserInfo_t GetUserInfo() ui.wxid = GetSelfWxid(); - UINT64 nameType = GET_UINT64(g_WeChatWinDllAddr + g_WxCalls.ui.nickName + 0x18); + UINT64 nameType = GET_UINT64(g_WeChatWinDllAddr + OS_USER_NAME + 0x18); if (nameType == 0xF) { - ui.name = GET_STRING_FROM_P(g_WeChatWinDllAddr + g_WxCalls.ui.nickName); + ui.name = GET_STRING_FROM_P(g_WeChatWinDllAddr + OS_USER_NAME); } else { // 0x1F - ui.name = GET_STRING(g_WeChatWinDllAddr + g_WxCalls.ui.nickName); + ui.name = GET_STRING(g_WeChatWinDllAddr + OS_USER_NAME); } - ui.mobile = GET_STRING_FROM_P(g_WeChatWinDllAddr + g_WxCalls.ui.mobile); + ui.mobile = GET_STRING_FROM_P(g_WeChatWinDllAddr + OS_USER_MOBILE); ui.home = GetHomePath(); return ui; From f805a38ca8a7a1976f9f4e23359ea4903c78c09a Mon Sep 17 00:00:00 2001 From: Changhua Date: Tue, 2 Jul 2024 22:42:10 +0800 Subject: [PATCH 29/55] v39.2.1 --- README.MD | 50 ++++++++++++++++++++++++++++------------ WeChatFerry/spy/spy.aps | Bin 2612 -> 2612 bytes WeChatFerry/spy/spy.rc | 8 +++---- 3 files changed, 39 insertions(+), 19 deletions(-) diff --git a/README.MD b/README.MD index 114bc1a..86c05c5 100644 --- a/README.MD +++ b/README.MD @@ -16,20 +16,35 @@ -|[📖 Python 文档](https://wechatferry.readthedocs.io/)|[📺 Python 视频教程](https://mp.weixin.qq.com/s/APdjGyZ2hllXxyG_sNCfXQ)|[🙋 FAQ](https://mp.weixin.qq.com/s/eMQgP1TiEqAxmpxYljSgeg)| +|[📖 Python 文档](https://wechatferry.readthedocs.io/)|[📺 Python 视频教程](https://mp.weixin.qq.com/s/APdjGyZ2hllXxyG_sNCfXQ)|[🙋 FAQ](https://mp.weixin.qq.com/s/I6n_6fuQa60CrROWSgq0TA)| |:-:|:-:|:-:| 👉 [WeChatRobot🤖](https://github.com/lich0821/WeChatRobot),一个基于 WeChatFerry 的 Python 机器人框架。
点击查看功能清单 -* 检查登录状态 -* 获取登录账号信息(wxid、昵称、手机号、数据目录) +* 查询登录状态 +* 获取登录账号信息 * 获取消息类型 +* 获取联系人 +* 获取可查询数据库 +* 获取数据库所有表 +* 获取语音消息 * 发送文本消息(可 @) -* 发送图片 -* 允许接收消息 -* 停止接收消息 +* 发送图片消息 +* 发送文件消息 +* 发送卡片消息 +* 拍一拍群友 +* 转发消息 +* 开启接收消息 +* 关闭接收消息 +* 查询数据库 +* 获取朋友圈消息 +* 下载图片、视频、文件 +* 解密图片 +* 添加群成员 +* 删除群成员 +* 邀请群成员
@@ -46,6 +61,7 @@ ## 一起开发 > 🚫 非开发用户不需要往下看。 +> **开发用户**:可以根据文档和错误提示,自行解决编译错误的人员。 ### 安装开发环境 @@ -150,16 +166,9 @@ WeChatFerry ## 版本更新 -### v39.2.0 +### v39.2.1 -* 开始适配 `3.9.10.27` -* 实现检查登录状态 -* 实现获取登录账号信息(wxid、昵称、手机号、数据目录) -* 实现获取消息类型 -* 实现开启接收消息 -* 实现停止接收消息 -* 实现发送文本消息(可 @) -* 实现发送图片消息 +* 实现了好多功能(见功能清单)
点击查看更多 @@ -171,6 +180,17 @@ WeChatFerry * `y` 是 `WeChatFerry` 的版本,从 0 开始 * `z` 是各客户端的版本,从 0 开始 +### v39.2.0 + +* 开始适配 `3.9.10.27` +* 实现检查登录状态 +* 实现获取登录账号信息(wxid、昵称、手机号、数据目录) +* 实现获取消息类型 +* 实现开启接收消息 +* 实现停止接收消息 +* 实现发送文本消息(可 @) +* 实现发送图片消息 + ### v39.1.0 (2024.04.19) * 适配 x64 环境 diff --git a/WeChatFerry/spy/spy.aps b/WeChatFerry/spy/spy.aps index d525acb344e2a225385793d71ba024340800da17..22b3690cca562a32ce5a4052158316be0ee5f56d 100644 GIT binary patch delta 44 zcmdlYvPEP88!r=sIs*d(BLgP`GlTSGUbdgCMhtokhMT$B)ft(M7|b`Da{Olm0IYEc A6951J delta 44 xcmdlYvPEP88!sb+Is*uBGB7g;Pv&L&$!f@;$6&CTn_Zoe*^t3 Date: Tue, 2 Jul 2024 22:43:13 +0800 Subject: [PATCH 30/55] v39.2.1.0 --- clients/python/wcferry/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/python/wcferry/client.py b/clients/python/wcferry/client.py index ef1d9b9..8a7127c 100644 --- a/clients/python/wcferry/client.py +++ b/clients/python/wcferry/client.py @@ -1,7 +1,7 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -__version__ = "39.1.0.0" +__version__ = "39.2.1.0" import atexit import base64 From 38464e6450efe0aac4292f9ae2a8204e3854b663 Mon Sep 17 00:00:00 2001 From: Changhua Date: Wed, 3 Jul 2024 18:36:52 +0800 Subject: [PATCH 31/55] Fix Hook/Unhook issue --- WeChatFerry/spy/receive_msg.cpp | 97 +++++++++++++++++---------------- 1 file changed, 50 insertions(+), 47 deletions(-) diff --git a/WeChatFerry/spy/receive_msg.cpp b/WeChatFerry/spy/receive_msg.cpp index a1834fb..8d385db 100644 --- a/WeChatFerry/spy/receive_msg.cpp +++ b/WeChatFerry/spy/receive_msg.cpp @@ -195,6 +195,33 @@ static void DispatchPyq(QWORD arg1, QWORD arg2, QWORD arg3) } } +static MH_STATUS InitializeHook() +{ + if (isMH_Initialized) { + return MH_OK; + } + MH_STATUS status = MH_Initialize(); + if (status == MH_OK) { + isMH_Initialized = true; + } + return status; +} + +static MH_STATUS UninitializeHook() +{ + if (!isMH_Initialized) { + return MH_OK; + } + if (gIsLogging || gIsListening || gIsListeningPyq) { + return MH_OK; + } + MH_STATUS status = MH_Uninitialize(); + if (status == MH_OK) { + isMH_Initialized = false; + } + return status; +} + void EnableLog() { MH_STATUS status = MH_UNKNOWN; @@ -204,13 +231,10 @@ void EnableLog() } WxLog_t funcWxLog = (WxLog_t)(g_WeChatWinDllAddr + OS_WXLOG); - if (!isMH_Initialized) { - status = MH_Initialize(); - if (status != MH_OK) { - LOG_ERROR("MH_Initialize failed: {}", to_string(status)); - return; - } - isMH_Initialized = true; + status = InitializeHook(); + if (status != MH_OK) { + LOG_ERROR("MH_Initialize failed: {}", to_string(status)); + return; } status = MH_CreateHook(funcWxLog, &PrintWxLog, reinterpret_cast(&realWxLog)); @@ -241,12 +265,11 @@ void DisableLog() } gIsLogging = false; - if (isMH_Initialized && !gIsLogging && !gIsListening && !gIsListeningPyq) { - status = MH_Uninitialize(); - if (status != MH_OK) { - LOG_ERROR("MH_Uninitialize failed: {}", to_string(status)); - return; - } + + status = UninitializeHook(); + if (status != MH_OK) { + LOG_ERROR("MH_Uninitialize failed: {}", to_string(status)); + return; } } @@ -259,13 +282,10 @@ void ListenMessage() } funcRecvMsg = (RecvMsg_t)(g_WeChatWinDllAddr + OS_RECV_MSG_CALL); - if (!isMH_Initialized) { - status = MH_Initialize(); - if (status != MH_OK) { - LOG_ERROR("MH_Initialize failed: {}", to_string(status)); - return; - } - isMH_Initialized = true; + status = InitializeHook(); + if (status != MH_OK) { + LOG_ERROR("MH_Initialize failed: {}", to_string(status)); + return; } status = MH_CreateHook(funcRecvMsg, &DispatchMsg, reinterpret_cast(&realRecvMsg)); @@ -296,20 +316,13 @@ void UnListenMessage() return; } - status = MH_Uninitialize(); + gIsListening = false; + + status = UninitializeHook(); if (status != MH_OK) { LOG_ERROR("MH_Uninitialize failed: {}", to_string(status)); return; } - - gIsListening = false; - if (isMH_Initialized && !gIsLogging && !gIsListening && !gIsListeningPyq) { - status = MH_Uninitialize(); - if (status != MH_OK) { - LOG_ERROR("MH_Uninitialize failed: {}", to_string(status)); - return; - } - } } void ListenPyq() @@ -321,13 +334,10 @@ void ListenPyq() } funcRecvPyq = (RecvPyq_t)(g_WeChatWinDllAddr + OS_PYQ_MSG_CALL); - if (!isMH_Initialized) { - status = MH_Initialize(); - if (status != MH_OK) { - LOG_ERROR("MH_Initialize failed: {}", to_string(status)); - return; - } - isMH_Initialized = true; + status = InitializeHook(); + if (status != MH_OK) { + LOG_ERROR("MH_Initialize failed: {}", to_string(status)); + return; } status = MH_CreateHook(funcRecvPyq, &DispatchPyq, reinterpret_cast(&realRecvPyq)); @@ -358,18 +368,11 @@ void UnListenPyq() return; } - status = MH_Uninitialize(); + gIsListeningPyq = false; + + status = UninitializeHook(); if (status != MH_OK) { LOG_ERROR("MH_Uninitialize failed: {}", to_string(status)); return; } - - gIsListeningPyq = false; - if (isMH_Initialized && !gIsLogging && !gIsListening && !gIsListeningPyq) { - status = MH_Uninitialize(); - if (status != MH_OK) { - LOG_ERROR("MH_Uninitialize failed: {}", to_string(status)); - return; - } - } } From c922842b22cde0843728f81cbd0ed17db5ba6df2 Mon Sep 17 00:00:00 2001 From: Changhua Date: Wed, 3 Jul 2024 18:37:08 +0800 Subject: [PATCH 32/55] v39.2.2 --- README.MD | 8 ++++++-- WeChatFerry/spy/spy.aps | Bin 2612 -> 2612 bytes WeChatFerry/spy/spy.rc | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.MD b/README.MD index 86c05c5..8ba33c3 100644 --- a/README.MD +++ b/README.MD @@ -166,9 +166,9 @@ WeChatFerry ## 版本更新 -### v39.2.1 +### v39.2.2 -* 实现了好多功能(见功能清单) +* 修复开启、停止接收消息失败问题
点击查看更多 @@ -180,6 +180,10 @@ WeChatFerry * `y` 是 `WeChatFerry` 的版本,从 0 开始 * `z` 是各客户端的版本,从 0 开始 +### v39.2.1 + +* 实现了好多功能(见功能清单) + ### v39.2.0 * 开始适配 `3.9.10.27` diff --git a/WeChatFerry/spy/spy.aps b/WeChatFerry/spy/spy.aps index 22b3690cca562a32ce5a4052158316be0ee5f56d..f9c8a87aab3e294adf632677dd8606c1ae56b068 100644 GIT binary patch delta 21 ccmdlYvPEPA8yh3jW_C7aMn Date: Wed, 3 Jul 2024 18:51:52 +0800 Subject: [PATCH 33/55] v39.2.2.0 --- clients/python/README.MD | 47 ++++++++++++++------------------ clients/python/wcferry/client.py | 2 +- 2 files changed, 21 insertions(+), 28 deletions(-) diff --git a/clients/python/README.MD b/clients/python/README.MD index 87af4ce..743548c 100644 --- a/clients/python/README.MD +++ b/clients/python/README.MD @@ -1,7 +1,7 @@ # WeChatFerry Python 客户端 [![PyPi](https://img.shields.io/pypi/v/wcferry.svg)](https://pypi.python.org/pypi/wcferry) [![Downloads](https://static.pepy.tech/badge/wcferry)](https://pypi.python.org/pypi/wcferry) [![Documentation Status](https://readthedocs.org/projects/wechatferry/badge/?version=latest)](https://wechatferry.readthedocs.io/zh/latest/?badge=latest) -|[📖 文档](https://wechatferry.readthedocs.io/)|[📺 视频教程](https://mp.weixin.qq.com/s/APdjGyZ2hllXxyG_sNCfXQ)|[🙋 FAQ](https://mp.weixin.qq.com/s/vAGpn1C9stI8Xzt1hUJhLA)| +|[📖 Python 文档](https://wechatferry.readthedocs.io/)|[📺 Python 视频教程](https://mp.weixin.qq.com/s/APdjGyZ2hllXxyG_sNCfXQ)|[🙋 FAQ](https://mp.weixin.qq.com/s/I6n_6fuQa60CrROWSgq0TA)| |:-:|:-:|:-:| 🤖示例机器人框架:[WeChatRobot](https://github.com/lich0821/WeChatRobot)。 @@ -44,9 +44,8 @@ python -m grpc_tools.protoc --python_out=. --proto_path=../../../WeChatFerry/rpc ## 版本更新 -### v39.0.14.0 (2024.02.18) -* 若干优化 -* 若干功能 +### v39.2.2.0 (2024.07.03) +* 修复一个问题
点击查看更多 @@ -60,33 +59,27 @@ python -m grpc_tools.protoc --python_out=. --proto_path=../../../WeChatFerry/rpc 功能: -* 检查登录状态 -* 获取登录账号的 wxid +* 查询登录状态 +* 获取登录账号信息 * 获取消息类型 -* 获取所有联系人 -* 获取所有好友 -* 获取数据库 -* 获取某数据库下的表 -* 获取用户信息 +* 获取联系人 +* 获取可查询数据库 +* 获取数据库所有表 +* 获取语音消息 * 发送文本消息(可 @) -* 发送图片(支持网络路径) -* 发送文件(支持网络路径) -* 允许接收消息 -* 停止接收消息 -* 执行 SQL 查询 -* 接受好友申请 -* 添加群成员 -* 删除群成员 -* 解密图片 -* 获取朋友圈消息 -* 保存图片 -* 保存语音 +* 发送图片消息 +* 发送文件消息 * 发送卡片消息 * 拍一拍群友 -* 邀请群成员 -* 图片 OCR * 转发消息 -* 撤回消息 -* 获取登录二维码 +* 开启接收消息 +* 关闭接收消息 +* 查询数据库 +* 获取朋友圈消息 +* 下载图片、视频、文件 +* 解密图片 +* 添加群成员 +* 删除群成员 +* 邀请群成员
diff --git a/clients/python/wcferry/client.py b/clients/python/wcferry/client.py index 8a7127c..22132e3 100644 --- a/clients/python/wcferry/client.py +++ b/clients/python/wcferry/client.py @@ -1,7 +1,7 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -__version__ = "39.2.1.0" +__version__ = "39.2.2.0" import atexit import base64 From d8f3baeba6b4814d680b430ef38a6c1fcc10fdd4 Mon Sep 17 00:00:00 2001 From: KenGrofork <126143068+KenGrofork@users.noreply.github.com> Date: Thu, 4 Jul 2024 09:49:08 +0800 Subject: [PATCH 34/55] =?UTF-8?q?chore=EF=BC=9A=E8=87=AA=E5=8A=A8=E5=8C=96?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 使用Github Actions编译dll,自动下载匹配的微信发布到Releases; 首次编译可能需要20-30分钟,再次编译仅需5-10分钟 --- .github/workflows/Build-WeChatFerry.yml | 118 ++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 .github/workflows/Build-WeChatFerry.yml diff --git a/.github/workflows/Build-WeChatFerry.yml b/.github/workflows/Build-WeChatFerry.yml new file mode 100644 index 0000000..75041e9 --- /dev/null +++ b/.github/workflows/Build-WeChatFerry.yml @@ -0,0 +1,118 @@ +name: Build-WeChatFerry + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + inputs: + use_cache: + description: '是否使用缓存' + required: true + default: 'yes' + type: choice + options: + - 'yes' + - 'no' + build_configurations: + description: '编译配置(使用逗号分隔多个配置)' + required: true + default: 'Release,Debug' + type: string + + +jobs: + build: + runs-on: windows-latest + + steps: + - name: 检出代码 + uses: actions/checkout@v4 + + - name: 获取版本号和微信版本号 + run: | + $version = (Select-String -Path "WeChatFerry/spy/spy.rc" -Pattern 'VALUE "FileVersion", "(.*)"').Matches.Groups[1].Value.Trim() + $wechat_version = (Select-String -Path "WeChatFerry/spy/spy.rc" -Pattern 'VALUE "ProductVersion", "(.*)"').Matches.Groups[1].Value.Trim() + echo "version=$version" >> $env:GITHUB_ENV + echo "wechat_version=$wechat_version" >> $env:GITHUB_ENV + echo "Program Version: $version" + echo "WeChat Version: $wechat_version" + shell: pwsh + + - name: 设置 Visual Studio 2019 + uses: microsoft/setup-msbuild@v2 + with: + vs-version: '16.0' # 16.x 对应 Visual Studio 2019 + + - name: 设置 Python 3 + uses: actions/setup-python@v5 + with: + python-version: '3.9' + + - name: 安装 Python 依赖项 + run: | + python -m pip install --upgrade pip + pip install grpcio-tools==1.48.2 + + - name: 设置缓存 + id: cache-dependencies + if: github.event.inputs.use_cache == 'yes' + uses: actions/cache@v4 + with: + path: | + C:/Tools/vcpkg + key: ${{ runner.os }}-dependencies-${{ hashFiles('**/WeChatFerry/spy/spy.rc') }} + restore-keys: | + ${{ runner.os }}-dependencies- + + + - name: 安装 vcpkg 和依赖项 + # if: steps.cache-dependencies.outputs.cache-hit != 'true' || github.event.inputs.use_cache == 'no' + run: | + cd C:/Tools + git clone https://github.com/microsoft/vcpkg + .\vcpkg\bootstrap-vcpkg.bat + .\vcpkg\vcpkg install protobuf[zlib]:x64-windows-static + .\vcpkg\vcpkg install spdlog:x64-windows-static + .\vcpkg\vcpkg install nng:x64-windows-static + .\vcpkg\vcpkg install magic-enum:x64-windows-static + .\vcpkg\vcpkg install minhook:x64-windows-static + .\vcpkg\vcpkg integrate install + echo "VCPKG_ROOT=C:/Tools/vcpkg" >> $GITHUB_ENV + + + + - name: 解析并构建配置 + run: | + $configurations = "${{ github.event.inputs.build_configurations }}".Split(',') + foreach ($config in $configurations) { + Write-Host "Building configuration: $config" + msbuild WeChatFerry/WeChatFerry.sln /p:Configuration=$config /p:Platform="x64" /verbosity:detailed + + } + shell: pwsh + + - name: 打包输出文件及下载 WeChat 安装包 + run: | + New-Item -ItemType Directory -Force -Path "WeChatFerry/tmp" + Compress-Archive -Path "WeChatFerry/Out/sdk.dll", "WeChatFerry/Out/spy.dll", "WeChatFerry/Out/spy_debug.dll" -DestinationPath "WeChatFerry/tmp/WeChatFerry-${{ env.version }}.zip" + # Compress-Archive -Path "WeChatFerry/Out/*" -DestinationPath "WeChatFerry/tmp/WeChatFerry-${{ env.version }}.zip" + Invoke-WebRequest -Uri "https://github.com/tom-snow/wechat-windows-versions/releases/download/v${{ env.wechat_version }}/WeChatSetup-${{ env.wechat_version }}.exe" -OutFile "WeChatFerry/tmp/WeChatSetup-${{ env.wechat_version }}.exe" + shell: pwsh + + - name: 列出预发布文件 + run: | + Get-ChildItem -Path "WeChatFerry/tmp" -Recurse + + - name: 发布固件到 Github Releases + uses: ncipollo/release-action@main + with: + name: WeChatFerry_v${{ env.version }} + tag: v${{ env.version }} + token: ${{ secrets.REPO_TOKEN }} + allowUpdates: true + artifacts: "WeChatFerry/tmp/*" + body: | + 程序版本:${{ env.version }} + 配套微信版本:${{ env.wechat_version }} From 899bfe699772dfbcf156ab355e65cbb673e06910 Mon Sep 17 00:00:00 2001 From: KenGrofork <126143068+KenGrofork@users.noreply.github.com> Date: Thu, 4 Jul 2024 13:45:22 +0800 Subject: [PATCH 35/55] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Build-WeChatFerry.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Build-WeChatFerry.yml b/.github/workflows/Build-WeChatFerry.yml index 75041e9..ab00da7 100644 --- a/.github/workflows/Build-WeChatFerry.yml +++ b/.github/workflows/Build-WeChatFerry.yml @@ -2,9 +2,9 @@ name: Build-WeChatFerry on: push: - branches: [main] + branches: [master] pull_request: - branches: [main] + branches: [master] workflow_dispatch: inputs: use_cache: From 86f4fc8bd5c458852a52975c81173ee7d92ed6af Mon Sep 17 00:00:00 2001 From: Forget Date: Thu, 4 Jul 2024 14:36:06 +0800 Subject: [PATCH 36/55] feat: Add wcferry-node nodejs sdk --- .gitmodules | 3 +++ clients/wcferry-node | 1 + 2 files changed, 4 insertions(+) create mode 160000 clients/wcferry-node diff --git a/.gitmodules b/.gitmodules index 12e3b16..4156d12 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,3 +2,6 @@ path = clients/node url = https://github.com/stkevintan/node-wcferry branch = main +[submodule "clients/wcferry-node"] + path = clients/wcferry-node + url = https://github.com/dr-forget/wcferry-node.git diff --git a/clients/wcferry-node b/clients/wcferry-node new file mode 160000 index 0000000..2f0ff15 --- /dev/null +++ b/clients/wcferry-node @@ -0,0 +1 @@ +Subproject commit 2f0ff1584ff74efef6eeb6a20fb159837ed1bf7b From 0deeb4aaf7b3c21e8620f5bc6c58730edd2ce802 Mon Sep 17 00:00:00 2001 From: KenGrofork <126143068+KenGrofork@users.noreply.github.com> Date: Thu, 4 Jul 2024 16:02:36 +0800 Subject: [PATCH 37/55] fix:Optimize triggering workflow methods and default parameters Avoid frequent triggering and add default values to the workflow --- .github/workflows/Build-WeChatFerry.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Build-WeChatFerry.yml b/.github/workflows/Build-WeChatFerry.yml index ab00da7..9945171 100644 --- a/.github/workflows/Build-WeChatFerry.yml +++ b/.github/workflows/Build-WeChatFerry.yml @@ -2,9 +2,15 @@ name: Build-WeChatFerry on: push: - branches: [master] + branches: + - master + paths: + - 'WeChatFerry/**' # 仅当这个目录中的文件有变化时触发 pull_request: - branches: [master] + branches: + - master + paths: + - 'WeChatFerry/**' workflow_dispatch: inputs: use_cache: @@ -29,7 +35,12 @@ jobs: steps: - name: 检出代码 uses: actions/checkout@v4 - + + - name: 设置默认值 + run: | + echo "USE_CACHE=${{ github.event.inputs.use_cache || 'yes' }}" >> $GITHUB_ENV + echo "BUILD_CONFIGS=${{ github.event.inputs.build_configurations || 'Release,Debug' }}" >> $GITHUB_ENV + - name: 获取版本号和微信版本号 run: | $version = (Select-String -Path "WeChatFerry/spy/spy.rc" -Pattern 'VALUE "FileVersion", "(.*)"').Matches.Groups[1].Value.Trim() From c66480dab4ca5a8198e52f96ed26b851ac15994b Mon Sep 17 00:00:00 2001 From: KenGrofork <126143068+KenGrofork@users.noreply.github.com> Date: Thu, 4 Jul 2024 16:38:31 +0800 Subject: [PATCH 38/55] Optimize trigger process When you push tags that match the regular expression v[0-9]+.[0-9]+.[0-9]+, the trigger will occur. --- .github/workflows/Build-WeChatFerry.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/Build-WeChatFerry.yml b/.github/workflows/Build-WeChatFerry.yml index 9945171..f032095 100644 --- a/.github/workflows/Build-WeChatFerry.yml +++ b/.github/workflows/Build-WeChatFerry.yml @@ -2,15 +2,8 @@ name: Build-WeChatFerry on: push: - branches: - - master - paths: - - 'WeChatFerry/**' # 仅当这个目录中的文件有变化时触发 - pull_request: - branches: - - master - paths: - - 'WeChatFerry/**' + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' workflow_dispatch: inputs: use_cache: From f76aed268e96dd6936cead08ad59424a01942285 Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 4 Jul 2024 18:40:58 +0800 Subject: [PATCH 39/55] Impl send gif --- WeChatFerry/spy/rpc_server.cpp | 56 +++++++++++------------ WeChatFerry/spy/send_msg.cpp | 81 ++++++++++------------------------ 2 files changed, 51 insertions(+), 86 deletions(-) diff --git a/WeChatFerry/spy/rpc_server.cpp b/WeChatFerry/spy/rpc_server.cpp index 37b096a..679d38f 100644 --- a/WeChatFerry/spy/rpc_server.cpp +++ b/WeChatFerry/spy/rpc_server.cpp @@ -297,6 +297,30 @@ bool func_send_file(char *path, char *receiver, uint8_t *out, size_t *len) return true; } +bool func_send_emotion(char *path, char *receiver, uint8_t *out, size_t *len) +{ + Response rsp = Response_init_default; + rsp.func = Functions_FUNC_SEND_EMOTION; + rsp.which_msg = Response_status_tag; + + if ((path == NULL) || (receiver == NULL)) { + LOG_ERROR("Empty path or receiver."); + rsp.msg.status = -1; + } else { + SendEmotionMessage(receiver, path); + rsp.msg.status = 0; + } + + pb_ostream_t stream = pb_ostream_from_buffer(out, *len); + if (!pb_encode(&stream, Response_fields, &rsp)) { + LOG_ERROR("Encoding failed: {}", PB_GET_ERROR(&stream)); + return false; + } + *len = stream.bytes_written; + + return true; +} + #if 0 bool func_send_xml(XmlMsg xml, uint8_t *out, size_t *len) { @@ -325,30 +349,6 @@ bool func_send_xml(XmlMsg xml, uint8_t *out, size_t *len) return true; } - -bool func_send_emotion(char *path, char *receiver, uint8_t *out, size_t *len) -{ - Response rsp = Response_init_default; - rsp.func = Functions_FUNC_SEND_EMOTION; - rsp.which_msg = Response_status_tag; - - if ((path == NULL) || (receiver == NULL)) { - LOG_ERROR("Empty path or receiver."); - rsp.msg.status = -1; - } else { - SendEmotionMessage(receiver, path); - rsp.msg.status = 0; - } - - pb_ostream_t stream = pb_ostream_from_buffer(out, *len); - if (!pb_encode(&stream, Response_fields, &rsp)) { - LOG_ERROR("Encoding failed: {}", PB_GET_ERROR(&stream)); - return false; - } - *len = stream.bytes_written; - - return true; -} #endif bool func_send_rich_txt(RichText rt, uint8_t *out, size_t *len) @@ -910,15 +910,15 @@ static bool dispatcher(uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len ret = func_forward_msg(req.msg.fm.id, req.msg.fm.receiver, out, out_len); break; } + case Functions_FUNC_SEND_EMOTION: { + ret = func_send_emotion(req.msg.file.path, req.msg.file.receiver, out, out_len); + break; + } #if 0 case Functions_FUNC_SEND_XML: { ret = func_send_xml(req.msg.xml, out, out_len); break; } - case Functions_FUNC_SEND_EMOTION: { - ret = func_send_emotion(req.msg.file.path, req.msg.file.receiver, out, out_len); - break; - } #endif case Functions_FUNC_ENABLE_RECV_TXT: { ret = func_enable_recv_txt(req.msg.flag, out, out_len); diff --git a/WeChatFerry/spy/send_msg.cpp b/WeChatFerry/spy/send_msg.cpp index af8a56e..70b0900 100644 --- a/WeChatFerry/spy/send_msg.cpp +++ b/WeChatFerry/spy/send_msg.cpp @@ -26,6 +26,8 @@ extern string GetSelfWxid(); // Defined in spy.cpp #define OS_SEND_RICH_TEXT 0x21A09C0 #define OS_SEND_PAT_MSG 0x2D669B0 #define OS_FORWARD_MSG 0x238D350 +#define OS_GET_EMOTION_MGR 0x1C988D0 +#define OS_SEND_EMOTION 0x227B9E0 typedef QWORD (*New_t)(QWORD); typedef QWORD (*Free_t)(QWORD); @@ -38,6 +40,8 @@ typedef QWORD (*SendFileMsg_t)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD *, QWORD typedef QWORD (*SendRichTextMsg_t)(QWORD, QWORD, QWORD); typedef QWORD (*SendPatMsg_t)(QWORD, QWORD); typedef QWORD (*ForwardMsg_t)(QWORD, QWORD, QWORD, QWORD); +typedef QWORD (*GetEmotionMgr_t)(); +typedef QWORD (*SendEmotion_t)(QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD, QWORD); void SendTextMessage(string wxid, string msg, string atWxids) { @@ -205,6 +209,25 @@ int ForwardMessage(QWORD msgid, string receiver) return status; } +void SendEmotionMessage(string wxid, string path) +{ + GetEmotionMgr_t GetEmotionMgr = (GetEmotionMgr_t)(g_WeChatWinDllAddr + OS_GET_EMOTION_MGR); + SendEmotion_t SendEmotion = (SendEmotion_t)(g_WeChatWinDllAddr + OS_SEND_EMOTION); + + WxString *pWxPath = NewWxStringFromStr(path); + WxString *pWxWxid = NewWxStringFromStr(wxid); + + QWORD *buff = (QWORD *)HeapAlloc(GetProcessHeap(), 0, 0x20); + if (buff == NULL) { + LOG_ERROR("Out of Memory..."); + return; + } + + memset(buff, 0, 0x20); + QWORD mgr = GetEmotionMgr(); + SendEmotion(mgr, (QWORD)pWxPath, (QWORD)buff, (QWORD)pWxWxid, 2, (QWORD)buff, 0, (QWORD)buff); +} + #if 0 void SendXmlMessage(string receiver, string xml, string path, int type) { @@ -271,62 +294,4 @@ void SendXmlMessage(string receiver, string xml, string path, int type) popad; } } - -void SendEmotionMessage(string wxid, string path) -{ - if (g_WeChatWinDllAddr == 0) { - return; - } - - char buffer[0x1C] = { 0 }; - wstring wsWxid = String2Wstring(wxid); - wstring wsPath = String2Wstring(path); - - WxString wxWxid(wsWxid); - WxString wxPath(wsPath); - WxString nullbuffer; - - // 发送文件Call地址 = 微信基址 + 偏移 - DWORD sendCall1 = g_WeChatWinDllAddr + g_WxCalls.sendEmo.call1; - DWORD sendCall2 = g_WeChatWinDllAddr + g_WxCalls.sendEmo.call2; - DWORD sendCall3 = g_WeChatWinDllAddr + g_WxCalls.sendEmo.call3; - - __asm { - pushad; - pushfd; - mov ebx, dword ptr[sendCall3]; - lea eax, buffer; - push eax; - push 0x0; - sub esp, 0x14; - mov esi, esp; - mov dword ptr [esi], 0x0; - mov dword ptr [esi+0x4], 0x0; - mov dword ptr [esi+0x8], 0x0; - mov dword ptr [esi+0xC], 0x0; - mov dword ptr [esi+0x10], 0x0; - push 0x2; - lea eax, wxWxid; - sub esp, 0x14; - mov ecx, esp; - push eax; - call sendCall1; - sub esp, 0x14; - mov esi, esp; - mov dword ptr [esi], 0x0; - mov dword ptr [esi+0x4], 0x0; - mov dword ptr [esi+0x8], 0x0; - mov dword ptr [esi+0xC], 0x0; - mov dword ptr [esi+0x10], 0x0; - sub esp, 0x14; - mov ecx, esp; - lea eax, wxPath; - push eax; - call sendCall1; - mov ecx, ebx; - call sendCall2; - popfd; - popad; - } -} #endif From 43f9f76d83fe20aba331d75373253e2689a7f41a Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 4 Jul 2024 19:09:47 +0800 Subject: [PATCH 40/55] v39.2.3 --- README.MD | 34 +++++++++++++++++++++++++++++----- WeChatFerry/spy/spy.rc | 8 ++++---- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/README.MD b/README.MD index 8ba33c3..40f0409 100644 --- a/README.MD +++ b/README.MD @@ -21,6 +21,10 @@ 👉 [WeChatRobot🤖](https://github.com/lich0821/WeChatRobot),一个基于 WeChatFerry 的 Python 机器人框架。 +|![碲矿](assets/TEQuant.jpg)|![赞赏](assets/QR.jpeg)| +|:-:|:-:| +|后台回复 `WCF` 加群交流|如果你觉得有用| +
点击查看功能清单 * 查询登录状态 @@ -34,6 +38,7 @@ * 发送图片消息 * 发送文件消息 * 发送卡片消息 +* 发送 GIF 消息 * 拍一拍群友 * 转发消息 * 开启接收消息 @@ -51,12 +56,27 @@
点击查看支持的客户端 * Python +* HTTP +* NodeJS
-|![碲矿](assets/TEQuant.jpg)|![赞赏](assets/QR.jpeg)| -|:-:|:-:| -|后台回复 `WCF` 加群交流|如果你觉得有用| +## 快速开始 +### Python +[![PyPi](https://img.shields.io/pypi/v/wcferry.svg)](https://pypi.python.org/pypi/wcferry) [![Downloads](https://static.pepy.tech/badge/wcferry)](https://pypi.python.org/pypi/wcferry) [![Documentation Status](https://readthedocs.org/projects/wechatferry/badge/?version=latest)](https://wechatferry.readthedocs.io/zh/latest/?badge=latest) + +* 安装 +```sh +pip install --upgrade wcferry +``` + +* 参考框架:[🤖WeChatRobot](https://github.com/lich0821/WeChatRobot) + +### HTTP +#### [wcfrust](https://github.com/lich0821/wcf-client-rust)(基于 Rust) +#### [go_wcf_http](clients/go_wcf_http/README.MD)(基于 Go) + +### [NodeJS](clients/wcferry-node) ## 一起开发 @@ -166,9 +186,9 @@ WeChatFerry ## 版本更新 -### v39.2.2 +### v39.2.3 -* 修复开启、停止接收消息失败问题 +* 实现发送 GIF
点击查看更多 @@ -180,6 +200,10 @@ WeChatFerry * `y` 是 `WeChatFerry` 的版本,从 0 开始 * `z` 是各客户端的版本,从 0 开始 +### v39.2.2 + +* 修复开启、停止接收消息失败问题 + ### v39.2.1 * 实现了好多功能(见功能清单) diff --git a/WeChatFerry/spy/spy.rc b/WeChatFerry/spy/spy.rc index 86ba01d..1197df8 100644 --- a/WeChatFerry/spy/spy.rc +++ b/WeChatFerry/spy/spy.rc @@ -13,7 +13,7 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// (壬й) resources +// ����(���壬�й�) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS) LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED @@ -51,7 +51,7 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 39,2,2,0 + FILEVERSION 39,2,3,0 PRODUCTVERSION 3,9,10,27 FILEFLAGSMASK 0x3fL #ifdef _DEBUG @@ -69,7 +69,7 @@ BEGIN BEGIN VALUE "CompanyName", "WeChatFerry" VALUE "FileDescription", "WeChatFerry" - VALUE "FileVersion", "39.2.2.0" + VALUE "FileVersion", "39.2.3.0" VALUE "InternalName", "spy.dll" VALUE "LegalCopyright", "Copyright (C) 2023" VALUE "OriginalFilename", "spy.dll" @@ -83,7 +83,7 @@ BEGIN END END -#endif // (壬й) resources +#endif // ����(���壬�й�) resources ///////////////////////////////////////////////////////////////////////////// From dc2ee2cd141ee4a9fbfb667b4022df6e7ec8818f Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 4 Jul 2024 19:52:53 +0800 Subject: [PATCH 41/55] Fix #170 --- clients/python/wcferry/wxmsg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/python/wcferry/wxmsg.py b/clients/python/wcferry/wxmsg.py index 37d521d..390f0bf 100644 --- a/clients/python/wcferry/wxmsg.py +++ b/clients/python/wcferry/wxmsg.py @@ -56,7 +56,7 @@ class WxMsg(): if not self.from_group(): return False # 只有群消息才能 @ - if not re.findall(f".*({wxid}).*", self.xml): + if not re.findall(f"[\s|\S]*({wxid})[\s|\S]*", self.xml): return False # 不在 @ 清单里 if re.findall(r"@(?:所有人|all|All)", self.content): From 4be317588f0022844ecc6e121bba27f02e2abcda Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 4 Jul 2024 19:55:07 +0800 Subject: [PATCH 42/55] v39.2.3.0 --- clients/python/wcferry/client.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/clients/python/wcferry/client.py b/clients/python/wcferry/client.py index 22132e3..1bbe2be 100644 --- a/clients/python/wcferry/client.py +++ b/clients/python/wcferry/client.py @@ -1,7 +1,7 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -__version__ = "39.2.2.0" +__version__ = "39.2.3.0" import atexit import base64 @@ -418,7 +418,6 @@ class Wcf(): Returns: int: 0 为成功,其他失败 """ - raise Exception("Not implemented, yet") req = wcf_pb2.Request() req.func = wcf_pb2.FUNC_SEND_EMOTION # FUNC_SEND_EMOTION req.file.path = path From f7b4b2c7b287243e74191129d4d508579e275239 Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 4 Jul 2024 20:02:41 +0800 Subject: [PATCH 43/55] v39.2.3.0 --- clients/python/README.MD | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/clients/python/README.MD b/clients/python/README.MD index 743548c..e7474e2 100644 --- a/clients/python/README.MD +++ b/clients/python/README.MD @@ -6,6 +6,10 @@ 🤖示例机器人框架:[WeChatRobot](https://github.com/lich0821/WeChatRobot)。 +|![碲矿](https://raw.githubusercontent.com/lich0821/WeChatFerry/master/assets/TEQuant.jpg)|![赞赏](https://raw.githubusercontent.com/lich0821/WeChatFerry/master/assets/QR.jpeg)| +|:-:|:-:| +|后台回复 `WCF` 加群交流|如果你觉得有用| + ## 快速开始 ```sh pip install --upgrade wcferry @@ -14,10 +18,6 @@ pip install --upgrade wcferry ### Demo: 参考 [WeChatRobot](https://github.com/lich0821/WeChatRobot) 和上面的文档。 -|![碲矿](https://raw.githubusercontent.com/lich0821/WeChatFerry/master/assets/TEQuant.jpg)|![赞赏](https://raw.githubusercontent.com/lich0821/WeChatFerry/master/assets/QR.jpeg)| -|:-:|:-:| -|后台回复 `WCF` 加群交流|如果你觉得有用| - ## 一起开发 ### 配置环境 ```sh @@ -44,8 +44,8 @@ python -m grpc_tools.protoc --python_out=. --proto_path=../../../WeChatFerry/rpc ## 版本更新 -### v39.2.2.0 (2024.07.03) -* 修复一个问题 +### v39.2.3.0 (2024.07.04) +* 实现发送 GIF
点击查看更多 @@ -70,6 +70,7 @@ python -m grpc_tools.protoc --python_out=. --proto_path=../../../WeChatFerry/rpc * 发送图片消息 * 发送文件消息 * 发送卡片消息 +* 发送 GIF * 拍一拍群友 * 转发消息 * 开启接收消息 From 024d794979a741b9d21409d3bdc0ddbad9935b83 Mon Sep 17 00:00:00 2001 From: KenGrofork <126143068+KenGrofork@users.noreply.github.com> Date: Thu, 4 Jul 2024 20:43:42 +0800 Subject: [PATCH 44/55] FIX: Modify to run using default configuration --- .github/workflows/Build-WeChatFerry.yml | 41 +++++++++++++------------ 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/.github/workflows/Build-WeChatFerry.yml b/.github/workflows/Build-WeChatFerry.yml index f032095..1bd3857 100644 --- a/.github/workflows/Build-WeChatFerry.yml +++ b/.github/workflows/Build-WeChatFerry.yml @@ -5,20 +5,20 @@ on: tags: - 'v[0-9]+.[0-9]+.[0-9]+' workflow_dispatch: - inputs: - use_cache: - description: '是否使用缓存' - required: true - default: 'yes' - type: choice - options: - - 'yes' - - 'no' - build_configurations: - description: '编译配置(使用逗号分隔多个配置)' - required: true - default: 'Release,Debug' - type: string + # inputs: + # use_cache: + # description: '是否使用缓存' + # required: true + # default: 'yes' + # type: choice + # options: + # - 'yes' + # - 'no' + # build_configurations: + # description: '编译配置(使用逗号分隔多个配置)' + # required: true + # default: 'Release,Debug' + # type: string jobs: @@ -29,10 +29,10 @@ jobs: - name: 检出代码 uses: actions/checkout@v4 - - name: 设置默认值 - run: | - echo "USE_CACHE=${{ github.event.inputs.use_cache || 'yes' }}" >> $GITHUB_ENV - echo "BUILD_CONFIGS=${{ github.event.inputs.build_configurations || 'Release,Debug' }}" >> $GITHUB_ENV + # - name: 设置默认值 + # run: | + # echo "USE_CACHE=${{ github.event.inputs.use_cache || 'yes' }}" >> $GITHUB_ENV + # echo "BUILD_CONFIGS=${{ github.event.inputs.build_configurations || 'Release,Debug' }}" >> $GITHUB_ENV - name: 获取版本号和微信版本号 run: | @@ -61,7 +61,7 @@ jobs: - name: 设置缓存 id: cache-dependencies - if: github.event.inputs.use_cache == 'yes' + # if: github.event.inputs.use_cache == 'yes' uses: actions/cache@v4 with: path: | @@ -89,7 +89,8 @@ jobs: - name: 解析并构建配置 run: | - $configurations = "${{ github.event.inputs.build_configurations }}".Split(',') + # $configurations = "${{ github.event.inputs.build_configurations }}".Split(',') + $configurations = "Release,Debug".Split(',') foreach ($config in $configurations) { Write-Host "Building configuration: $config" msbuild WeChatFerry/WeChatFerry.sln /p:Configuration=$config /p:Platform="x64" /verbosity:detailed From 94e1fef8200f30efbede155202c115c88291f0cb Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 4 Jul 2024 21:26:26 +0800 Subject: [PATCH 45/55] Fix building error --- .github/workflows/Build-WeChatFerry.yml | 42 +++++++------------------ 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/.github/workflows/Build-WeChatFerry.yml b/.github/workflows/Build-WeChatFerry.yml index 1bd3857..61ef611 100644 --- a/.github/workflows/Build-WeChatFerry.yml +++ b/.github/workflows/Build-WeChatFerry.yml @@ -3,23 +3,7 @@ name: Build-WeChatFerry on: push: tags: - - 'v[0-9]+.[0-9]+.[0-9]+' - workflow_dispatch: - # inputs: - # use_cache: - # description: '是否使用缓存' - # required: true - # default: 'yes' - # type: choice - # options: - # - 'yes' - # - 'no' - # build_configurations: - # description: '编译配置(使用逗号分隔多个配置)' - # required: true - # default: 'Release,Debug' - # type: string - + - "v[0-9]+.[0-9]+.[0-9]+" jobs: build: @@ -28,12 +12,12 @@ jobs: steps: - name: 检出代码 uses: actions/checkout@v4 - - # - name: 设置默认值 - # run: | - # echo "USE_CACHE=${{ github.event.inputs.use_cache || 'yes' }}" >> $GITHUB_ENV - # echo "BUILD_CONFIGS=${{ github.event.inputs.build_configurations || 'Release,Debug' }}" >> $GITHUB_ENV - + + - name: 设置默认值 + run: | + echo "USE_CACHE=yes" >> $GITHUB_ENV + echo "BUILD_CONFIGS=Release,Debug" >> $GITHUB_ENV + - name: 获取版本号和微信版本号 run: | $version = (Select-String -Path "WeChatFerry/spy/spy.rc" -Pattern 'VALUE "FileVersion", "(.*)"').Matches.Groups[1].Value.Trim() @@ -47,18 +31,18 @@ jobs: - name: 设置 Visual Studio 2019 uses: microsoft/setup-msbuild@v2 with: - vs-version: '16.0' # 16.x 对应 Visual Studio 2019 + vs-version: "16.0" # 16.x 对应 Visual Studio 2019 - name: 设置 Python 3 uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: "3.9" - name: 安装 Python 依赖项 run: | python -m pip install --upgrade pip pip install grpcio-tools==1.48.2 - + - name: 设置缓存 id: cache-dependencies # if: github.event.inputs.use_cache == 'yes' @@ -70,9 +54,7 @@ jobs: restore-keys: | ${{ runner.os }}-dependencies- - - name: 安装 vcpkg 和依赖项 - # if: steps.cache-dependencies.outputs.cache-hit != 'true' || github.event.inputs.use_cache == 'no' run: | cd C:/Tools git clone https://github.com/microsoft/vcpkg @@ -85,8 +67,6 @@ jobs: .\vcpkg\vcpkg integrate install echo "VCPKG_ROOT=C:/Tools/vcpkg" >> $GITHUB_ENV - - - name: 解析并构建配置 run: | # $configurations = "${{ github.event.inputs.build_configurations }}".Split(',') @@ -109,7 +89,7 @@ jobs: - name: 列出预发布文件 run: | Get-ChildItem -Path "WeChatFerry/tmp" -Recurse - + - name: 发布固件到 Github Releases uses: ncipollo/release-action@main with: From 88c39ebe00102aff5d1a02ce965e1383ce9f8610 Mon Sep 17 00:00:00 2001 From: KenGrofork <126143068+KenGrofork@users.noreply.github.com> Date: Thu, 4 Jul 2024 22:31:54 +0800 Subject: [PATCH 46/55] Fix error --- .github/workflows/Build-WeChatFerry.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/Build-WeChatFerry.yml b/.github/workflows/Build-WeChatFerry.yml index 61ef611..5dfc94d 100644 --- a/.github/workflows/Build-WeChatFerry.yml +++ b/.github/workflows/Build-WeChatFerry.yml @@ -13,11 +13,6 @@ jobs: - name: 检出代码 uses: actions/checkout@v4 - - name: 设置默认值 - run: | - echo "USE_CACHE=yes" >> $GITHUB_ENV - echo "BUILD_CONFIGS=Release,Debug" >> $GITHUB_ENV - - name: 获取版本号和微信版本号 run: | $version = (Select-String -Path "WeChatFerry/spy/spy.rc" -Pattern 'VALUE "FileVersion", "(.*)"').Matches.Groups[1].Value.Trim() @@ -45,7 +40,6 @@ jobs: - name: 设置缓存 id: cache-dependencies - # if: github.event.inputs.use_cache == 'yes' uses: actions/cache@v4 with: path: | @@ -69,12 +63,10 @@ jobs: - name: 解析并构建配置 run: | - # $configurations = "${{ github.event.inputs.build_configurations }}".Split(',') $configurations = "Release,Debug".Split(',') foreach ($config in $configurations) { Write-Host "Building configuration: $config" msbuild WeChatFerry/WeChatFerry.sln /p:Configuration=$config /p:Platform="x64" /verbosity:detailed - } shell: pwsh From 0279b1136ea05d51b0d2362b1970d7aa481e5c09 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sat, 6 Jul 2024 08:49:24 +0800 Subject: [PATCH 47/55] Fix version number --- .github/workflows/Build-WeChatFerry.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Build-WeChatFerry.yml b/.github/workflows/Build-WeChatFerry.yml index 5dfc94d..3db14c7 100644 --- a/.github/workflows/Build-WeChatFerry.yml +++ b/.github/workflows/Build-WeChatFerry.yml @@ -15,8 +15,9 @@ jobs: - name: 获取版本号和微信版本号 run: | - $version = (Select-String -Path "WeChatFerry/spy/spy.rc" -Pattern 'VALUE "FileVersion", "(.*)"').Matches.Groups[1].Value.Trim() + $version_full = (Select-String -Path "WeChatFerry/spy/spy.rc" -Pattern 'VALUE "FileVersion", "(.*)"').Matches.Groups[1].Value.Trim() $wechat_version = (Select-String -Path "WeChatFerry/spy/spy.rc" -Pattern 'VALUE "ProductVersion", "(.*)"').Matches.Groups[1].Value.Trim() + $version = $version_full -replace '(\d+\.\d+\.\d+)\.\d+', '$1' echo "version=$version" >> $env:GITHUB_ENV echo "wechat_version=$wechat_version" >> $env:GITHUB_ENV echo "Program Version: $version" From 478bbdfdab126ea194bce40dd5fff17ffb0f7556 Mon Sep 17 00:00:00 2001 From: Changhua Date: Mon, 8 Jul 2024 00:51:26 +0800 Subject: [PATCH 48/55] Impl x32/x64 check --- WeChatFerry/com/util.cpp | 28 ++++++++++++++++++++++++++++ WeChatFerry/com/util.h | 1 + WeChatFerry/sdk/sdk.cpp | 5 +++++ 3 files changed, 34 insertions(+) diff --git a/WeChatFerry/com/util.cpp b/WeChatFerry/com/util.cpp index 273a1bd..5e906e6 100644 --- a/WeChatFerry/com/util.cpp +++ b/WeChatFerry/com/util.cpp @@ -180,6 +180,34 @@ DWORD GetWeChatPid() return pid; } +enum class WindowsArchiture { x32, x64 }; +static WindowsArchiture GetWindowsArchitecture() +{ +#ifdef _WIN64 + return WindowsArchiture::x64; +#else + return WindowsArchiture::x32; +#endif +} + +BOOL IsProcessX64(DWORD pid) +{ + BOOL isWow64 = false; + HANDLE hProcess = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, false, pid); + if (!hProcess) + return false; + BOOL result = IsWow64Process(hProcess, &isWow64); + CloseHandle(hProcess); + if (!result) + return false; + if (isWow64) + return false; + else if (GetWindowsArchitecture() == WindowsArchiture::x32) + return false; + else + return true; +} + int OpenWeChat(DWORD *pid) { *pid = GetWeChatPid(); diff --git a/WeChatFerry/com/util.h b/WeChatFerry/com/util.h index 00e50bb..8f252df 100644 --- a/WeChatFerry/com/util.h +++ b/WeChatFerry/com/util.h @@ -24,6 +24,7 @@ typedef struct PortPath { } PortPath_t; DWORD GetWeChatPid(); +BOOL IsProcessX64(DWORD pid); int OpenWeChat(DWORD *pid); int GetWeChatVersion(wchar_t *version); size_t GetWstringByAddress(UINT64 address, wchar_t *buffer, UINT64 buffer_size); diff --git a/WeChatFerry/sdk/sdk.cpp b/WeChatFerry/sdk/sdk.cpp index ff754d5..5a14180 100644 --- a/WeChatFerry/sdk/sdk.cpp +++ b/WeChatFerry/sdk/sdk.cpp @@ -47,6 +47,11 @@ int WxInitSDK(bool debug, int port) return status; } + if (!IsProcessX64(wcPid)) { + MessageBox(NULL, L"只支持 64 位微信", L"WxInitSDK", 0); + return -1; + } + Sleep(2000); // 等待微信打开 wcProcess = InjectDll(wcPid, spyDllPath, &spyBase); if (wcProcess == NULL) { From 1c376c0357d13b55938f67fcd91e1ca16df2ae84 Mon Sep 17 00:00:00 2001 From: Changhua Date: Mon, 8 Jul 2024 01:20:13 +0800 Subject: [PATCH 49/55] Update version number --- .github/workflows/Build-WeChatFerry.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Build-WeChatFerry.yml b/.github/workflows/Build-WeChatFerry.yml index 3db14c7..e238613 100644 --- a/.github/workflows/Build-WeChatFerry.yml +++ b/.github/workflows/Build-WeChatFerry.yml @@ -74,8 +74,8 @@ jobs: - name: 打包输出文件及下载 WeChat 安装包 run: | New-Item -ItemType Directory -Force -Path "WeChatFerry/tmp" - Compress-Archive -Path "WeChatFerry/Out/sdk.dll", "WeChatFerry/Out/spy.dll", "WeChatFerry/Out/spy_debug.dll" -DestinationPath "WeChatFerry/tmp/WeChatFerry-${{ env.version }}.zip" - # Compress-Archive -Path "WeChatFerry/Out/*" -DestinationPath "WeChatFerry/tmp/WeChatFerry-${{ env.version }}.zip" + Compress-Archive -Path "WeChatFerry/Out/sdk.dll", "WeChatFerry/Out/spy.dll", "WeChatFerry/Out/spy_debug.dll" -DestinationPath "WeChatFerry/tmp/v${{ env.version }}.zip" + # Compress-Archive -Path "WeChatFerry/Out/*" -DestinationPath "WeChatFerry/tmp/v${{ env.version }}-debug.zip" Invoke-WebRequest -Uri "https://github.com/tom-snow/wechat-windows-versions/releases/download/v${{ env.wechat_version }}/WeChatSetup-${{ env.wechat_version }}.exe" -OutFile "WeChatFerry/tmp/WeChatSetup-${{ env.wechat_version }}.exe" shell: pwsh @@ -86,11 +86,12 @@ jobs: - name: 发布固件到 Github Releases uses: ncipollo/release-action@main with: - name: WeChatFerry_v${{ env.version }} + name: v${{ env.version }} tag: v${{ env.version }} token: ${{ secrets.REPO_TOKEN }} allowUpdates: true artifacts: "WeChatFerry/tmp/*" body: | - 程序版本:${{ env.version }} - 配套微信版本:${{ env.wechat_version }} + 程序版本:`v${{ env.version }}` + 配套微信版本:`${{ env.wechat_version }}` + [📖 Python 文档](https://wechatferry.readthedocs.io/) From 62a8be83fcc6582ec825d8fd81d2aaa0d32efa23 Mon Sep 17 00:00:00 2001 From: Changhua Date: Mon, 8 Jul 2024 01:38:45 +0800 Subject: [PATCH 50/55] v39.2.3.1 --- clients/python/README.MD | 4 ++-- clients/python/wcferry/client.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clients/python/README.MD b/clients/python/README.MD index e7474e2..d199cfe 100644 --- a/clients/python/README.MD +++ b/clients/python/README.MD @@ -44,8 +44,8 @@ python -m grpc_tools.protoc --python_out=. --proto_path=../../../WeChatFerry/rpc ## 版本更新 -### v39.2.3.0 (2024.07.04) -* 实现发送 GIF +### v39.2.3.1 (2024.07.08) +* 添加 x32/x64 检测防止崩溃
点击查看更多 diff --git a/clients/python/wcferry/client.py b/clients/python/wcferry/client.py index 1bbe2be..a9db71a 100644 --- a/clients/python/wcferry/client.py +++ b/clients/python/wcferry/client.py @@ -1,7 +1,7 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -__version__ = "39.2.3.0" +__version__ = "39.2.3.1" import atexit import base64 From 3b7bd72e00b9d522b457dcb5db22888445fe5428 Mon Sep 17 00:00:00 2001 From: Changhua Date: Mon, 8 Jul 2024 21:20:54 +0800 Subject: [PATCH 51/55] Fix wxid --- WeChatFerry/spy/user_info.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WeChatFerry/spy/user_info.cpp b/WeChatFerry/spy/user_info.cpp index 28f8543..3c7152c 100644 --- a/WeChatFerry/spy/user_info.cpp +++ b/WeChatFerry/spy/user_info.cpp @@ -5,7 +5,7 @@ extern UINT64 g_WeChatWinDllAddr; #define OS_USER_HOME 0x5A7E190 -#define OS_USER_WXID 0x5AB7FB8 +#define OS_USER_WXID 0x5AB7F30 #define OS_USER_NAME 0x5AB8098 #define OS_USER_MOBILE 0x5AB7FD8 From bbbaeb570a051bc5f01b85988154f7057c2ba081 Mon Sep 17 00:00:00 2001 From: Changhua Date: Mon, 8 Jul 2024 21:26:50 +0800 Subject: [PATCH 52/55] v39.2.4 --- README.MD | 8 ++++++-- WeChatFerry/spy/spy.aps | Bin 2612 -> 2612 bytes WeChatFerry/spy/spy.rc | 8 ++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.MD b/README.MD index 40f0409..7bbcf29 100644 --- a/README.MD +++ b/README.MD @@ -186,9 +186,9 @@ WeChatFerry ## 版本更新 -### v39.2.3 +### v39.2.4 -* 实现发送 GIF +* 修复 wxid 问题
点击查看更多 @@ -200,6 +200,10 @@ WeChatFerry * `y` 是 `WeChatFerry` 的版本,从 0 开始 * `z` 是各客户端的版本,从 0 开始 +### v39.2.3 + +* 实现发送 GIF + ### v39.2.2 * 修复开启、停止接收消息失败问题 diff --git a/WeChatFerry/spy/spy.aps b/WeChatFerry/spy/spy.aps index f9c8a87aab3e294adf632677dd8606c1ae56b068..1c00a30d35eec932acc8280af45bc1cd0d94584b 100644 GIT binary patch delta 36 scmdlYvPEQr3^S(@g8_pvg9(GhW>w~gOpGj>+1Z#G8BI2GvuiQ~0G3e)7XSbN delta 36 scmdlYvPEQr3^S)8gC&Cjg9(G-W>w~gOpHvM+1Z#G8I3k`vuiQ~0G1^O5dZ)H diff --git a/WeChatFerry/spy/spy.rc b/WeChatFerry/spy/spy.rc index 1197df8..381b4eb 100644 --- a/WeChatFerry/spy/spy.rc +++ b/WeChatFerry/spy/spy.rc @@ -13,7 +13,7 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// ����(���壬�й�) resources +// (壬й) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS) LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED @@ -51,7 +51,7 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 39,2,3,0 + FILEVERSION 39,2,4,0 PRODUCTVERSION 3,9,10,27 FILEFLAGSMASK 0x3fL #ifdef _DEBUG @@ -69,7 +69,7 @@ BEGIN BEGIN VALUE "CompanyName", "WeChatFerry" VALUE "FileDescription", "WeChatFerry" - VALUE "FileVersion", "39.2.3.0" + VALUE "FileVersion", "39.2.4.0" VALUE "InternalName", "spy.dll" VALUE "LegalCopyright", "Copyright (C) 2023" VALUE "OriginalFilename", "spy.dll" @@ -83,7 +83,7 @@ BEGIN END END -#endif // ����(���壬�й�) resources +#endif // (壬й) resources ///////////////////////////////////////////////////////////////////////////// From 1c1625ad7eff2ae264b301d16eca5fd8fac4737e Mon Sep 17 00:00:00 2001 From: Changhua Date: Mon, 8 Jul 2024 22:10:03 +0800 Subject: [PATCH 53/55] v39.2.4.0 --- clients/python/README.MD | 4 ++-- clients/python/wcferry/client.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clients/python/README.MD b/clients/python/README.MD index d199cfe..06e92c0 100644 --- a/clients/python/README.MD +++ b/clients/python/README.MD @@ -44,8 +44,8 @@ python -m grpc_tools.protoc --python_out=. --proto_path=../../../WeChatFerry/rpc ## 版本更新 -### v39.2.3.1 (2024.07.08) -* 添加 x32/x64 检测防止崩溃 +### v39.2.4.0 (2024.07.08) +* 修复 wxid 问题
点击查看更多 diff --git a/clients/python/wcferry/client.py b/clients/python/wcferry/client.py index a9db71a..c37d79b 100644 --- a/clients/python/wcferry/client.py +++ b/clients/python/wcferry/client.py @@ -1,7 +1,7 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -__version__ = "39.2.3.1" +__version__ = "39.2.4.0" import atexit import base64 From 0744cf225dd948bcdf0ac5a2dde602e7c4d31c70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=9C=E7=81=AB=E8=BD=A6?= Date: Wed, 10 Jul 2024 15:21:19 +0800 Subject: [PATCH 54/55] =?UTF-8?q?v30.2.4=E9=80=82=E9=85=8Djava=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clients/java/README.MD | 6 +- .../src/main/java/com/iamteer/Client.java | 951 +- .../src/main/java/com/iamteer/Main.java | 3 +- .../src/main/java/com/iamteer/SDK.java | 30 + .../src/main/java/com/iamteer/Wcf.java | 10032 +++++++++++----- 5 files changed, 7663 insertions(+), 3359 deletions(-) create mode 100644 clients/java/wcferry/src/main/java/com/iamteer/SDK.java diff --git a/clients/java/README.MD b/clients/java/README.MD index fad662d..0c11e9f 100644 --- a/clients/java/README.MD +++ b/clients/java/README.MD @@ -4,7 +4,7 @@ ## 快速开始 -* 下载 [最新发布的文件](https://github.com/lich0821/WeChatFerry/releases/latest),解压到 `WeChatFerry\clients\java\wcferry\src\main\resources\win32-x86-64`。 +* 下载 [最新发布的文件](https://github.com/lich0821/WeChatFerry/releases/latest),解压到 `WeChatFerry\clients\java\wcferry\dll`目录下。 * 使用惯用 IDE,打开工程,编译,运行。 @@ -68,9 +68,9 @@ cd C:/Projs/WeChatFerry/java/wcferry/src/main/java protoc.exe --java_out=. --proto_path=C:\Projs\WeChatFerry\WeChatFerry\rpc\proto wcf.proto ``` -### 添加 `wcferry` 依赖 +### 添加 `dll` 依赖 -将 `wcf.exe` 、 `spy.dll` 、 `spy_debug.dll` 添加到 `WeChatFerry\clients\java\wcferry\src\main\resources\win32-x86-64`。 +将 `spy.dll` 、 `spy_debug.dll`、 `spy.dll` 添加到 `WeChatFerry\clients\java\wcferry\dll`。 ### 其他问题 diff --git a/clients/java/wcferry/src/main/java/com/iamteer/Client.java b/clients/java/wcferry/src/main/java/com/iamteer/Client.java index cba60f9..05378c7 100644 --- a/clients/java/wcferry/src/main/java/com/iamteer/Client.java +++ b/clients/java/wcferry/src/main/java/com/iamteer/Client.java @@ -5,8 +5,6 @@ import io.sisu.nng.Socket; import io.sisu.nng.pair.Pair1Socket; import org.slf4j.Logger; import org.slf4j.LoggerFactory; - -import java.net.URL; import java.nio.ByteBuffer; import java.util.Arrays; import java.util.HashMap; @@ -16,531 +14,510 @@ import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; public class Client { - private static final Logger logger = LoggerFactory.getLogger(Client.class); - private final int BUFFER_SIZE = 16 * 1024 * 1024; // 16M - private Socket cmdSocket = null; - private Socket msgSocket = null; - private String host = "127.0.0.1"; - private int port = 10086; - private boolean isReceivingMsg = false; - private boolean isLocalHostPort = false; - private BlockingQueue msgQ; - private String wcfPath; - public Client(String host, int port) { - this.host = host; - this.port = port; - String cmdUrl = "tcp://" + host + ":" + port; - connectRPC(cmdUrl); + private static final Logger logger = LoggerFactory.getLogger(Client.class); + private static final int BUFFER_SIZE = 16 * 1024 * 1024; // 16M + private Socket cmdSocket = null; + private Socket msgSocket = null; + private static String DEFAULT_HOST = "127.0.0.1"; + private static int PORT = 10086; + private static String CMDURL = "tcp://%s:%s"; + private boolean isReceivingMsg = false; + private boolean isLocalHostPort = false; + private BlockingQueue msgQ; + + private String host; + private int port; + + public Client() { + this(DEFAULT_HOST, PORT, false); + } + + public Client(String host, int port, boolean debug) { + this.host = host; + this.port = port; + int status = SDK.INSTANCE.WxInitSDK(debug, 10086); + if (status != 0) { + logger.error("启动 RPC 失败: {}", status); + System.exit(-1); + } + connectRPC(String.format(CMDURL, host, port)); + if (DEFAULT_HOST.equals(host) || "localhost".equalsIgnoreCase(host)) { + isLocalHostPort = true; + } + } + + + public void connectRPC(String url) { + try { + cmdSocket = new Pair1Socket(); + cmdSocket.dial(url); + logger.info("请点击登录微信"); + while (!isLogin()) { // 直到登录成功 + waitMs(1000); + } + } catch (Exception e) { + logger.error("连接 RPC 失败: ", e); + System.exit(-1); + } + Runtime.getRuntime().addShutdownHook(new Thread(() -> { + logger.info("关闭..."); + diableRecvMsg(); + if (isLocalHostPort) { + SDK.INSTANCE.WxDestroySDK(); + } + })); + } + + private Response sendCmd(Request req) { + try { + ByteBuffer bb = ByteBuffer.wrap(req.toByteArray()); + cmdSocket.send(bb); + ByteBuffer ret = ByteBuffer.allocate(BUFFER_SIZE); + long size = cmdSocket.receive(ret, true); + return Response.parseFrom(Arrays.copyOfRange(ret.array(), 0, (int) size)); + } catch (Exception e) { + logger.error("命令调用失败: ", e); + return null; + } + } + + /** + * 当前微信客户端是否登录微信号 + * + * @return + */ + public boolean isLogin() { + Request req = Request.newBuilder().setFuncValue(Functions.FUNC_IS_LOGIN_VALUE).build(); + Response rsp = sendCmd(req); + if (rsp != null) { + return rsp.getStatus() == 1; + } + return false; + } + + /** + * 获得微信客户端登录的微信ID + * + * @return + */ + public String getSelfWxid() { + Request req = Request.newBuilder().setFuncValue(Functions.FUNC_GET_SELF_WXID_VALUE).build(); + Response rsp = sendCmd(req); + if (rsp != null) { + return rsp.getStr(); } - public Client(int port, boolean debug) { - initClient(this.host, port, debug); + return ""; + } + + /** + * 获取所有消息类型 + * + * @return + */ + public Map getMsgTypes() { + Request req = Request.newBuilder().setFuncValue(Functions.FUNC_GET_MSG_TYPES_VALUE).build(); + Response rsp = sendCmd(req); + if (rsp != null) { + return rsp.getTypes().getTypesMap(); } - public Client(boolean debug) { - initClient(this.host, this.port, debug); + return Wcf.MsgTypes.newBuilder().build().getTypesMap(); + } + + /** + * 获取所有联系人 + * "fmessage": "朋友推荐消息", + * "medianote": "语音记事本", + * "floatbottle": "漂流瓶", + * "filehelper": "文件传输助手", + * "newsapp": "新闻", + * + * @return + */ + public List getContacts() { + Request req = Request.newBuilder().setFuncValue(Functions.FUNC_GET_CONTACTS_VALUE).build(); + Response rsp = sendCmd(req); + if (rsp != null) { + return rsp.getContacts().getContactsList(); } - private void initClient(String host, int port, boolean debug) { - try { - URL url = this.getClass().getResource("/win32-x86-64/wcf.exe"); - wcfPath = url.getFile(); - String[] cmd = new String[4]; - cmd[0] = wcfPath; - cmd[1] = "start"; - cmd[2] = Integer.toString(port); - if (debug) { - cmd[3] = "debug"; - } else { - cmd[3] = ""; - } - int status = Runtime.getRuntime().exec(cmd).waitFor(); - if (status != 0) { - logger.error("启动 RPC 失败: {}", status); - System.exit(-1); - } - isLocalHostPort = true; - String cmdUrl = "tcp://" + host + ":" + port; - connectRPC(cmdUrl); - } catch (Exception e) { - logger.error("初始化失败: {}", e); - System.exit(-1); - } + return Wcf.RpcContacts.newBuilder().build().getContactsList(); + } + + /** + * 获取sql执行结果 + * + * @param db 数据库名 + * @param sql 执行的sql语句 + * @return + */ + public List querySql(String db, String sql) { + DbQuery dbQuery = DbQuery.newBuilder().setSql(sql).setDb(db).build(); + Request req = Request.newBuilder().setFuncValue(Functions.FUNC_EXEC_DB_QUERY_VALUE) + .setQuery(dbQuery).build(); + Response rsp = sendCmd(req); + if (rsp != null) { + return rsp.getRows().getRowsList(); + } + return null; + } + + /** + * 获取所有数据库名 + * + * @return + */ + public List getDbNames() { + Request req = Request.newBuilder().setFuncValue(Functions.FUNC_GET_DB_NAMES_VALUE).build(); + Response rsp = sendCmd(req); + if (rsp != null) { + return rsp.getDbs().getNamesList(); } - private void connectRPC(String url) { - try { - cmdSocket = new Pair1Socket(); - cmdSocket.dial(url); - logger.info("请点击登录微信"); - while (!isLogin()) { // 直到登录成功 - waitMs(1000); - } - } catch (Exception e) { - logger.error("连接 RPC 失败: ", e); - System.exit(-1); - } - Runtime.getRuntime().addShutdownHook(new Thread() { - public void run() { - logger.info("关闭..."); - diableRecvMsg(); - if (isLocalHostPort) { - try { - String[] cmd = new String[2]; - cmd[0] = wcfPath; - cmd[1] = "stop"; - Process process = Runtime.getRuntime().exec(cmd); - int status = process.waitFor(); - if (status != 0) { - System.err.println("停止机器人失败: " + status); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - } - }); + return Wcf.DbNames.newBuilder().build().getNamesList(); + } + + /** + * 获取指定数据库中的所有表 + * + * @param db + * @return + */ + public Map getDbTables(String db) { + Request req = Request.newBuilder().setFuncValue(Functions.FUNC_GET_DB_TABLES_VALUE).setStr(db) + .build(); + Response rsp = sendCmd(req); + Map tables = new HashMap<>(); + if (rsp != null) { + for (DbTable tbl : rsp.getTables().getTablesList()) { + tables.put(tbl.getName(), tbl.getSql()); + } } - private Response sendCmd(Request req) { - try { - ByteBuffer bb = ByteBuffer.wrap(req.toByteArray()); - cmdSocket.send(bb); - ByteBuffer ret = ByteBuffer.allocate(BUFFER_SIZE); - long size = cmdSocket.receive(ret, true); - return Response.parseFrom(Arrays.copyOfRange(ret.array(), 0, (int) size)); - } catch (Exception e) { - logger.error("命令调用失败: ", e); - return null; - } + return tables; + } + + /** + * @param msg: 消息内容(如果是 @ 消息则需要有跟 @ 的人数量相同的 @) + * @param receiver: 消息接收人,私聊为 wxid(wxid_xxxxxxxxxxxxxx),群聊为 + * roomid(xxxxxxxxxx@chatroom) + * @param aters: 群聊时要 @ 的人(私聊时为空字符串),多个用逗号分隔。@所有人 用 + * notify@all(必须是群主或者管理员才有权限) + * @return int + * @Description 发送文本消息 + * @author Changhua + * @example sendText(" Hello @ 某人1 @ 某人2 ", " xxxxxxxx @ chatroom ", + * "wxid_xxxxxxxxxxxxx1,wxid_xxxxxxxxxxxxx2"); + **/ + public int sendText(String msg, String receiver, String aters) { + Wcf.TextMsg textMsg = Wcf.TextMsg.newBuilder().setMsg(msg).setReceiver(receiver).setAters(aters) + .build(); + Request req = Request.newBuilder().setFuncValue(Functions.FUNC_SEND_TXT_VALUE).setTxt(textMsg) + .build(); + logger.debug("sendText: {}", bytesToHex(req.toByteArray())); + Response rsp = sendCmd(req); + int ret = -1; + if (rsp != null) { + ret = rsp.getStatus(); } - /** - * 当前微信客户端是否登录微信号 - * - * @return - */ - public boolean isLogin() { - Request req = Request.newBuilder().setFuncValue(Functions.FUNC_IS_LOGIN_VALUE).build(); - Response rsp = sendCmd(req); - if (rsp != null) { - return rsp.getStatus() == 1; - } - return false; + return ret; + } + + /** + * 发送图片消息 + * + * @param path 图片地址 + * @param receiver 接收者微信id + * @return 发送结果状态码 + */ + public int sendImage(String path, String receiver) { + Wcf.PathMsg pathMsg = Wcf.PathMsg.newBuilder().setPath(path).setReceiver(receiver).build(); + Request req = Request.newBuilder().setFuncValue(Functions.FUNC_SEND_IMG_VALUE).setFile(pathMsg) + .build(); + logger.debug("sendImage: {}", bytesToHex(req.toByteArray())); + Response rsp = sendCmd(req); + int ret = -1; + if (rsp != null) { + ret = rsp.getStatus(); } - /** - * 获得微信客户端登录的微信ID - * - * @return - */ - public String getSelfWxid() { - Request req = Request.newBuilder().setFuncValue(Functions.FUNC_GET_SELF_WXID_VALUE).build(); - Response rsp = sendCmd(req); - if (rsp != null) { - return rsp.getStr(); - } + return ret; + } - return ""; + /** + * 发送文件消息 + * + * @param path 文件地址 + * @param receiver 接收者微信id + * @return 发送结果状态码 + */ + public int sendFile(String path, String receiver) { + Wcf.PathMsg pathMsg = Wcf.PathMsg.newBuilder().setPath(path).setReceiver(receiver).build(); + Request req = Request.newBuilder().setFuncValue(Functions.FUNC_SEND_FILE_VALUE).setFile(pathMsg) + .build(); + logger.debug("sendFile: {}", bytesToHex(req.toByteArray())); + Response rsp = sendCmd(req); + int ret = -1; + if (rsp != null) { + ret = rsp.getStatus(); } - /** - * 获取所有消息类型 - * - * @return - */ - public Map getMsgTypes() { - Request req = Request.newBuilder().setFuncValue(Functions.FUNC_GET_MSG_TYPES_VALUE).build(); - Response rsp = sendCmd(req); - if (rsp != null) { - return rsp.getTypes().getTypesMap(); - } + return ret; + } - return Wcf.MsgTypes.newBuilder().build().getTypesMap(); + /** + * 发送Xml消息 + * + * @param receiver 接收者微信id + * @param xml xml内容 + * @param path + * @param type + * @return 发送结果状态码 + */ + public int sendXml(String receiver, String xml, String path, int type) { + Wcf.XmlMsg xmlMsg = Wcf.XmlMsg.newBuilder().setContent(xml).setReceiver(receiver).setPath(path) + .setType(type).build(); + Request req = Request.newBuilder().setFuncValue(Functions.FUNC_SEND_XML_VALUE).setXml(xmlMsg) + .build(); + logger.debug("sendXml: {}", bytesToHex(req.toByteArray())); + Response rsp = sendCmd(req); + int ret = -1; + if (rsp != null) { + ret = rsp.getStatus(); } - /** - * 获取所有联系人 - * "fmessage": "朋友推荐消息", - * "medianote": "语音记事本", - * "floatbottle": "漂流瓶", - * "filehelper": "文件传输助手", - * "newsapp": "新闻", - * - * @return - */ - public List getContacts() { - Request req = Request.newBuilder().setFuncValue(Functions.FUNC_GET_CONTACTS_VALUE).build(); - Response rsp = sendCmd(req); - if (rsp != null) { - return rsp.getContacts().getContactsList(); - } + return ret; + } - return Wcf.RpcContacts.newBuilder().build().getContactsList(); + /** + * 发送表情消息 + * + * @param path 表情路径 + * @param receiver 消息接收者 + * @return 发送结果状态码 + */ + public int sendEmotion(String path, String receiver) { + Wcf.PathMsg pathMsg = Wcf.PathMsg.newBuilder().setPath(path).setReceiver(receiver).build(); + Request req = Request.newBuilder().setFuncValue(Functions.FUNC_SEND_EMOTION_VALUE) + .setFile(pathMsg).build(); + logger.debug("sendEmotion: {}", bytesToHex(req.toByteArray())); + Response rsp = sendCmd(req); + int ret = -1; + if (rsp != null) { + ret = rsp.getStatus(); } - /** - * 获取sql执行结果 - * - * @param db 数据库名 - * @param sql 执行的sql语句 - * @return - */ - public List querySql(String db, String sql) { - DbQuery dbQuery = DbQuery.newBuilder().setSql(sql).setDb(db).build(); - Request req = Request.newBuilder().setFuncValue(Functions.FUNC_EXEC_DB_QUERY_VALUE).setQuery(dbQuery).build(); - Response rsp = sendCmd(req); - if (rsp != null) { - return rsp.getRows().getRowsList(); - } - return null; + return ret; + } + + /** + * 接收好友请求 + * + * @param v3 xml.attrib["encryptusername"] + * @param v4 xml.attrib["ticket"] + * @return 结果状态码 + */ + public int acceptNewFriend(String v3, String v4) { + int ret = -1; + Verification verification = Verification.newBuilder().setV3(v3).setV4(v4).build(); + Request req = Request.newBuilder().setFuncValue(Functions.FUNC_ACCEPT_FRIEND_VALUE) + .setV(verification).build(); + Response rsp = sendCmd(req); + if (rsp != null) { + ret = rsp.getStatus(); + } + return ret; + } + + /** + * 添加群成员为微信好友 + * + * @param roomID 群ID + * @param wxIds 要加群的人列表,逗号分隔 + * @return 1 为成功,其他失败 + */ + public int addChatroomMembers(String roomID, String wxIds) { + int ret = -1; + MemberMgmt memberMgmt = MemberMgmt.newBuilder().setRoomid(roomID).setWxids(wxIds).build(); + Request req = Request.newBuilder().setFuncValue(Functions.FUNC_ADD_ROOM_MEMBERS_VALUE) + .setM(memberMgmt).build(); + Response rsp = sendCmd(req); + if (rsp != null) { + ret = rsp.getStatus(); + } + return ret; + } + + /** + * 解密图片 + * + * @param srcPath 加密的图片路径 + * @param dstPath 解密的图片路径 + * @return 是否成功 + */ + public boolean decryptImage(String srcPath, String dstPath) { + int ret = -1; + DecPath build = DecPath.newBuilder().setSrc(srcPath).setDst(dstPath).build(); + Request req = Request.newBuilder().setFuncValue(Functions.FUNC_DECRYPT_IMAGE_VALUE) + .setDec(build).build(); + Response rsp = sendCmd(req); + if (rsp != null) { + ret = rsp.getStatus(); + } + return ret == 1; + } + + /** + * 获取个人信息 + * + * @return 个人信息 + */ + public UserInfo getUserInfo() { + Request req = Request.newBuilder().setFuncValue(Functions.FUNC_GET_USER_INFO_VALUE).build(); + Response rsp = sendCmd(req); + if (rsp != null) { + return rsp.getUi(); + } + return null; + } + + public boolean getIsReceivingMsg() { + return isReceivingMsg; + } + + public WxMsg getMsg() { + try { + return msgQ.take(); + } catch (Exception e) { + // TODO: handle exception + return null; + } + } + + /** + * 判断是否是艾特自己的消息 + * + * @param wxMsgXml + * @param wxMsgContent + * @return + */ + public boolean isAtMeMsg(String wxMsgXml, String wxMsgContent) { + String format = String.format("", getSelfWxid()); + boolean isAtAll = wxMsgContent.startsWith("@所有人") || wxMsgContent.startsWith("@all"); + if (wxMsgXml.contains(format) && !isAtAll) { + return true; + } + return false; + } + + private void listenMsg(String url) { + try { + msgSocket = new Pair1Socket(); + msgSocket.dial(url); + msgSocket.setReceiveTimeout(2000); // 2 秒超时 + } catch (Exception e) { + logger.error("创建消息 RPC 失败", e); + return; + } + ByteBuffer bb = ByteBuffer.allocate(BUFFER_SIZE); + while (isReceivingMsg) { + try { + long size = msgSocket.receive(bb, true); + WxMsg wxMsg = Response.parseFrom(Arrays.copyOfRange(bb.array(), 0, (int) size)).getWxmsg(); + msgQ.put(wxMsg); + } catch (Exception e) { + // 多半是超时,忽略吧 + } + } + try { + msgSocket.close(); + } catch (Exception e) { + logger.error("关闭连接失败", e); + } + } + + public void enableRecvMsg(int qSize) { + if (isReceivingMsg) { + return; } - /** - * 获取所有数据库名 - * - * @return - */ - public List getDbNames() { - Request req = Request.newBuilder().setFuncValue(Functions.FUNC_GET_DB_NAMES_VALUE).build(); - Response rsp = sendCmd(req); - if (rsp != null) { - return rsp.getDbs().getNamesList(); - } - - return Wcf.DbNames.newBuilder().build().getNamesList(); + Request req = Request.newBuilder().setFuncValue(Functions.FUNC_ENABLE_RECV_TXT_VALUE).build(); + Response rsp = sendCmd(req); + if (rsp == null) { + logger.error("启动消息接收失败"); + isReceivingMsg = false; + return; } - /** - * 获取指定数据库中的所有表 - * - * @param db - * @return - */ - public Map getDbTables(String db) { - Request req = Request.newBuilder().setFuncValue(Functions.FUNC_GET_DB_TABLES_VALUE).setStr(db).build(); - Response rsp = sendCmd(req); - Map tables = new HashMap<>(); - if (rsp != null) { - for (DbTable tbl : rsp.getTables().getTablesList()) { - tables.put(tbl.getName(), tbl.getSql()); - } - } + isReceivingMsg = true; + msgQ = new ArrayBlockingQueue<>(qSize); + String msgUrl = "tcp://" + this.host + ":" + (this.port + 1); + Thread thread = new Thread(() -> listenMsg(msgUrl)); + thread.start(); + } - return tables; + public int diableRecvMsg() { + if (!isReceivingMsg) { + return 1; } + int ret = -1; + Request req = Request.newBuilder().setFuncValue(Functions.FUNC_DISABLE_RECV_TXT_VALUE).build(); + Response rsp = sendCmd(req); + if (rsp != null) { + ret = rsp.getStatus(); + if (ret == 0) { + isReceivingMsg = false; + } - /** - * @param msg: 消息内容(如果是 @ 消息则需要有跟 @ 的人数量相同的 @) - * @param receiver: 消息接收人,私聊为 wxid(wxid_xxxxxxxxxxxxxx),群聊为 - * roomid(xxxxxxxxxx@chatroom) - * @param aters: 群聊时要 @ 的人(私聊时为空字符串),多个用逗号分隔。@所有人 用 - * notify@all(必须是群主或者管理员才有权限) - * @return int - * @Description 发送文本消息 - * @author Changhua - * @example sendText(" Hello @ 某人1 @ 某人2 ", " xxxxxxxx @ chatroom ", - * "wxid_xxxxxxxxxxxxx1,wxid_xxxxxxxxxxxxx2"); - **/ - public int sendText(String msg, String receiver, String aters) { - Wcf.TextMsg textMsg = Wcf.TextMsg.newBuilder().setMsg(msg).setReceiver(receiver).setAters(aters).build(); - Request req = Request.newBuilder().setFuncValue(Functions.FUNC_SEND_TXT_VALUE).setTxt(textMsg).build(); - logger.debug("sendText: {}", bytesToHex(req.toByteArray())); - Response rsp = sendCmd(req); - int ret = -1; - if (rsp != null) { - ret = rsp.getStatus(); - } - - return ret; } + return ret; + } - /** - * 发送图片消息 - * - * @param path 图片地址 - * @param receiver 接收者微信id - * @return 发送结果状态码 - */ - public int sendImage(String path, String receiver) { - Wcf.PathMsg pathMsg = Wcf.PathMsg.newBuilder().setPath(path).setReceiver(receiver).build(); - Request req = Request.newBuilder().setFuncValue(Functions.FUNC_SEND_IMG_VALUE).setFile(pathMsg).build(); - logger.debug("sendImage: {}", bytesToHex(req.toByteArray())); - Response rsp = sendCmd(req); - int ret = -1; - if (rsp != null) { - ret = rsp.getStatus(); - } - - return ret; + public void waitMs(int ms) { + try { + Thread.sleep(ms); + } catch (InterruptedException ex) { + Thread.currentThread().interrupt(); } + } - /** - * 发送文件消息 - * - * @param path 文件地址 - * @param receiver 接收者微信id - * @return 发送结果状态码 - */ - public int sendFile(String path, String receiver) { - Wcf.PathMsg pathMsg = Wcf.PathMsg.newBuilder().setPath(path).setReceiver(receiver).build(); - Request req = Request.newBuilder().setFuncValue(Functions.FUNC_SEND_FILE_VALUE).setFile(pathMsg).build(); - logger.debug("sendFile: {}", bytesToHex(req.toByteArray())); - Response rsp = sendCmd(req); - int ret = -1; - if (rsp != null) { - ret = rsp.getStatus(); - } + public void printContacts(List contacts) { + for (RpcContact c : contacts) { + int value = c.getGender(); + String gender; + if (value == 1) { + gender = "男"; + } else if (value == 2) { + gender = "女"; + } else { + gender = "未知"; + } - return ret; + logger.info("{}, {}, {}, {}, {}, {}, {}", c.getWxid(), c.getName(), c.getCode(), + c.getCountry(), c.getProvince(), c.getCity(), gender); } + } - /** - * 发送Xml消息 - * - * @param receiver 接收者微信id - * @param xml xml内容 - * @param path - * @param type - * @return 发送结果状态码 - */ - public int sendXml(String receiver, String xml, String path, int type) { - Wcf.XmlMsg xmlMsg = Wcf.XmlMsg.newBuilder().setContent(xml).setReceiver(receiver).setPath(path).setType(type).build(); - Request req = Request.newBuilder().setFuncValue(Functions.FUNC_SEND_XML_VALUE).setXml(xmlMsg).build(); - logger.debug("sendXml: {}", bytesToHex(req.toByteArray())); - Response rsp = sendCmd(req); - int ret = -1; - if (rsp != null) { - ret = rsp.getStatus(); - } + public void printWxMsg(WxMsg msg) { + logger.info("{}[{}]:{}:{}:{}\n{}", msg.getSender(), msg.getRoomid(), msg.getId(), msg.getType(), + msg.getXml().replace("\n", "").replace("\t", ""), msg.getContent()); + } - return ret; + private String bytesToHex(byte[] bytes) { + StringBuilder sb = new StringBuilder(); + for (byte b : bytes) { + sb.append(String.format("%02x", b)); } + return sb.toString(); + } - /** - * 发送表情消息 - * - * @param path 表情路径 - * @param receiver 消息接收者 - * @return 发送结果状态码 - */ - public int sendEmotion(String path, String receiver) { - Wcf.PathMsg pathMsg = Wcf.PathMsg.newBuilder().setPath(path).setReceiver(receiver).build(); - Request req = Request.newBuilder().setFuncValue(Functions.FUNC_SEND_EMOTION_VALUE).setFile(pathMsg).build(); - logger.debug("sendEmotion: {}", bytesToHex(req.toByteArray())); - Response rsp = sendCmd(req); - int ret = -1; - if (rsp != null) { - ret = rsp.getStatus(); - } - - return ret; - } - - /** - * 接收好友请求 - * - * @param v3 xml.attrib["encryptusername"] - * @param v4 xml.attrib["ticket"] - * @return 结果状态码 - */ - public int acceptNewFriend(String v3, String v4) { - int ret = -1; - Verification verification = Verification.newBuilder().setV3(v3).setV4(v4).build(); - Request req = Request.newBuilder().setFuncValue(Functions.FUNC_ACCEPT_FRIEND_VALUE).setV(verification).build(); - Response rsp = sendCmd(req); - if (rsp != null) { - ret = rsp.getStatus(); - } - return ret; - } - - /** - * 添加群成员为微信好友 - * - * @param roomID 群ID - * @param wxIds 要加群的人列表,逗号分隔 - * @return 1 为成功,其他失败 - */ - public int addChatroomMembers(String roomID, String wxIds) { - int ret = -1; - MemberMgmt memberMgmt = MemberMgmt.newBuilder().setRoomid(roomID).setWxids(wxIds).build(); - Request req = Request.newBuilder().setFuncValue(Functions.FUNC_ADD_ROOM_MEMBERS_VALUE).setM(memberMgmt).build(); - Response rsp = sendCmd(req); - if (rsp != null) { - ret = rsp.getStatus(); - } - return ret; - } - - /** - * 解密图片 - * - * @param srcPath 加密的图片路径 - * @param dstPath 解密的图片路径 - * @return 是否成功 - */ - public boolean decryptImage(String srcPath, String dstPath) { - int ret = -1; - DecPath build = DecPath.newBuilder().setSrc(srcPath).setDst(dstPath).build(); - Request req = Request.newBuilder().setFuncValue(Functions.FUNC_DECRYPT_IMAGE_VALUE).setDec(build).build(); - Response rsp = sendCmd(req); - if (rsp != null) { - ret = rsp.getStatus(); - } - return ret == 1; - } - - /** - * 获取个人信息 - * - * @return 个人信息 - */ - public UserInfo getUserInfo() { - Request req = Request.newBuilder().setFuncValue(Functions.FUNC_GET_USER_INFO_VALUE).build(); - Response rsp = sendCmd(req); - if (rsp != null) { - return rsp.getUi(); - } - return null; - } - - public boolean getIsReceivingMsg() { - return isReceivingMsg; - } - - public WxMsg getMsg() { - try { - return msgQ.take(); - } catch (Exception e) { - // TODO: handle exception - return null; - } - } - - /** - * 判断是否是艾特自己的消息 - * - * @param wxMsgXml - * @param wxMsgContent - * @return - */ - public boolean isAtMeMsg(String wxMsgXml, String wxMsgContent) { - String format = String.format("", getSelfWxid()); - boolean isAtAll = wxMsgContent.startsWith("@所有人") || wxMsgContent.startsWith("@all"); - if (wxMsgXml.contains(format) && !isAtAll) { - return true; - } - return false; - } - - private void listenMsg(String url) { - try { - msgSocket = new Pair1Socket(); - msgSocket.dial(url); - msgSocket.setReceiveTimeout(2000); // 2 秒超时 - } catch (Exception e) { - logger.error("创建消息 RPC 失败: {}", e); - return; - } - ByteBuffer bb = ByteBuffer.allocate(BUFFER_SIZE); - while (isReceivingMsg) { - try { - long size = msgSocket.receive(bb, true); - WxMsg wxMsg = Response.parseFrom(Arrays.copyOfRange(bb.array(), 0, (int) size)).getWxmsg(); - msgQ.put(wxMsg); - } catch (Exception e) { - // 多半是超时,忽略吧 - } - } - try { - msgSocket.close(); - } catch (Exception e) { - logger.error("关闭连接失败: {}", e); - } - } - - public void enableRecvMsg(int qSize) { - if (isReceivingMsg) { - return; - } - - Request req = Request.newBuilder().setFuncValue(Functions.FUNC_ENABLE_RECV_TXT_VALUE).build(); - Response rsp = sendCmd(req); - if (rsp == null) { - logger.error("启动消息接收失败"); - isReceivingMsg = false; - return; - } - - isReceivingMsg = true; - msgQ = new ArrayBlockingQueue(qSize); - String msgUrl = "tcp://" + this.host + ":" + (this.port + 1); - Thread thread = new Thread(new Runnable() { - public void run() { - listenMsg(msgUrl); - } - }); - thread.start(); - } - - public int diableRecvMsg() { - if (!isReceivingMsg) { - return 1; - } - int ret = -1; - Request req = Request.newBuilder().setFuncValue(Functions.FUNC_DISABLE_RECV_TXT_VALUE).build(); - Response rsp = sendCmd(req); - if (rsp != null) { - ret = rsp.getStatus(); - if (ret == 0) { - isReceivingMsg = false; - } - - } - return ret; - } - - public void waitMs(int ms) { - try { - Thread.sleep(ms); - } catch (InterruptedException ex) { - Thread.currentThread().interrupt(); - } - } - - public void printContacts(List contacts) { - for (RpcContact c : contacts) { - int value = c.getGender(); - String gender; - if (value == 1) { - gender = "男"; - } else if (value == 2) { - gender = "女"; - } else { - gender = "未知"; - } - - logger.info("{}, {}, {}, {}, {}, {}, {}", c.getWxid(), c.getName(), c.getCode(), c.getCountry(), c.getProvince(), c.getCity(), gender); - } - } - - public void printWxMsg(WxMsg msg) { - logger.info("{}[{}]:{}:{}:{}\n{}", msg.getSender(), msg.getRoomid(), msg.getId(), msg.getType(), msg.getXml().replace("\n", "").replace("\t", ""), msg.getContent()); - } - - public String bytesToHex(byte[] bytes) { - StringBuilder sb = new StringBuilder(); - for (byte b : bytes) { - sb.append(String.format("%02x", b)); - } - return sb.toString(); - } - - public void keepRunning() { - while (true) { - waitMs(1000); - } + public void keepRunning() { + while (true) { + waitMs(1000); } + } } + diff --git a/clients/java/wcferry/src/main/java/com/iamteer/Main.java b/clients/java/wcferry/src/main/java/com/iamteer/Main.java index 7c0ce4a..bdd07c7 100644 --- a/clients/java/wcferry/src/main/java/com/iamteer/Main.java +++ b/clients/java/wcferry/src/main/java/com/iamteer/Main.java @@ -11,7 +11,7 @@ public class Main { // Client client = new Client("127.0.0.1", 10086); // 本地启动 RPC - Client client = new Client(true); // 默认 10086 端口 + Client client = new Client(); // 默认 10086 端口 // Client client = new Client(10088,true); // 也可以指定端口 // 是否已登录 @@ -60,3 +60,4 @@ public class Main { client.keepRunning(); } } + diff --git a/clients/java/wcferry/src/main/java/com/iamteer/SDK.java b/clients/java/wcferry/src/main/java/com/iamteer/SDK.java new file mode 100644 index 0000000..1ee95bd --- /dev/null +++ b/clients/java/wcferry/src/main/java/com/iamteer/SDK.java @@ -0,0 +1,30 @@ +package com.iamteer; + +import com.sun.jna.Library; +import com.sun.jna.Native; + +/** + * SDK.dll的接口类 + * @Description + * @Author xinggq + * @Date 2024/7/10 + */ +public interface SDK extends Library { + // 读取项目根目录下dll文件夹,而且只能写绝对路径,放在resource下会有问题,暂时先不解决 + // 打包后,dll文件应该放在jar外,这样dll更新不需要生成jar包,重启下就ok了 + SDK INSTANCE = Native.load(System.getProperty("user.dir")+"\\dll\\sdk.dll", SDK.class); + + /** + * 初始化SDK + * @param debug + * @param port + * @return + */ + int WxInitSDK(boolean debug, int port); + + /** + * 退出SDK + * @return + */ + int WxDestroySDK(); +} \ No newline at end of file diff --git a/clients/java/wcferry/src/main/java/com/iamteer/Wcf.java b/clients/java/wcferry/src/main/java/com/iamteer/Wcf.java index 0307dd5..45e06cc 100644 --- a/clients/java/wcferry/src/main/java/com/iamteer/Wcf.java +++ b/clients/java/wcferry/src/main/java/com/iamteer/Wcf.java @@ -83,6 +83,10 @@ public final class Wcf { * FUNC_SEND_PAT_MSG = 38; */ FUNC_SEND_PAT_MSG(38), + /** + * FUNC_FORWARD_MSG = 39; + */ + FUNC_FORWARD_MSG(39), /** * FUNC_ENABLE_RECV_TXT = 48; */ @@ -119,10 +123,18 @@ public final class Wcf { * FUNC_REVOKE_MSG = 86; */ FUNC_REVOKE_MSG(86), + /** + * FUNC_REFRESH_QRCODE = 87; + */ + FUNC_REFRESH_QRCODE(87), /** * FUNC_DECRYPT_IMAGE = 96; */ FUNC_DECRYPT_IMAGE(96), + /** + * FUNC_EXEC_OCR = 97; + */ + FUNC_EXEC_OCR(97), /** * FUNC_ADD_ROOM_MEMBERS = 112; */ @@ -202,6 +214,10 @@ public final class Wcf { * FUNC_SEND_PAT_MSG = 38; */ public static final int FUNC_SEND_PAT_MSG_VALUE = 38; + /** + * FUNC_FORWARD_MSG = 39; + */ + public static final int FUNC_FORWARD_MSG_VALUE = 39; /** * FUNC_ENABLE_RECV_TXT = 48; */ @@ -238,10 +254,18 @@ public final class Wcf { * FUNC_REVOKE_MSG = 86; */ public static final int FUNC_REVOKE_MSG_VALUE = 86; + /** + * FUNC_REFRESH_QRCODE = 87; + */ + public static final int FUNC_REFRESH_QRCODE_VALUE = 87; /** * FUNC_DECRYPT_IMAGE = 96; */ public static final int FUNC_DECRYPT_IMAGE_VALUE = 96; + /** + * FUNC_EXEC_OCR = 97; + */ + public static final int FUNC_EXEC_OCR_VALUE = 97; /** * FUNC_ADD_ROOM_MEMBERS = 112; */ @@ -296,6 +320,7 @@ public final class Wcf { case 36: return FUNC_SEND_EMOTION; case 37: return FUNC_SEND_RICH_TXT; case 38: return FUNC_SEND_PAT_MSG; + case 39: return FUNC_FORWARD_MSG; case 48: return FUNC_ENABLE_RECV_TXT; case 64: return FUNC_DISABLE_RECV_TXT; case 80: return FUNC_EXEC_DB_QUERY; @@ -305,7 +330,9 @@ public final class Wcf { case 84: return FUNC_DOWNLOAD_ATTACH; case 85: return FUNC_GET_CONTACT_INFO; case 86: return FUNC_REVOKE_MSG; + case 87: return FUNC_REFRESH_QRCODE; case 96: return FUNC_DECRYPT_IMAGE; + case 97: return FUNC_EXEC_OCR; case 112: return FUNC_ADD_ROOM_MEMBERS; case 113: return FUNC_DEL_ROOM_MEMBERS; case 114: return FUNC_INV_ROOM_MEMBERS; @@ -381,31 +408,55 @@ public final class Wcf { com.iamteer.Wcf.Functions getFunc(); /** + *
+     * 无参数
+     * 
+ * * .wcf.Empty empty = 2; * @return Whether the empty field is set. */ boolean hasEmpty(); /** + *
+     * 无参数
+     * 
+ * * .wcf.Empty empty = 2; * @return The empty. */ com.iamteer.Wcf.Empty getEmpty(); /** + *
+     * 无参数
+     * 
+ * * .wcf.Empty empty = 2; */ com.iamteer.Wcf.EmptyOrBuilder getEmptyOrBuilder(); /** + *
+     * 字符串
+     * 
+ * * string str = 3; * @return Whether the str field is set. */ boolean hasStr(); /** + *
+     * 字符串
+     * 
+ * * string str = 3; * @return The str. */ java.lang.String getStr(); /** + *
+     * 字符串
+     * 
+ * * string str = 3; * @return The bytes for str. */ @@ -413,61 +464,109 @@ public final class Wcf { getStrBytes(); /** + *
+     * 发送文本消息结构
+     * 
+ * * .wcf.TextMsg txt = 4; * @return Whether the txt field is set. */ boolean hasTxt(); /** + *
+     * 发送文本消息结构
+     * 
+ * * .wcf.TextMsg txt = 4; * @return The txt. */ com.iamteer.Wcf.TextMsg getTxt(); /** + *
+     * 发送文本消息结构
+     * 
+ * * .wcf.TextMsg txt = 4; */ com.iamteer.Wcf.TextMsgOrBuilder getTxtOrBuilder(); /** + *
+     * 发送图片、文件消息结构
+     * 
+ * * .wcf.PathMsg file = 5; * @return Whether the file field is set. */ boolean hasFile(); /** + *
+     * 发送图片、文件消息结构
+     * 
+ * * .wcf.PathMsg file = 5; * @return The file. */ com.iamteer.Wcf.PathMsg getFile(); /** + *
+     * 发送图片、文件消息结构
+     * 
+ * * .wcf.PathMsg file = 5; */ com.iamteer.Wcf.PathMsgOrBuilder getFileOrBuilder(); /** + *
+     * 数据库查询参数结构
+     * 
+ * * .wcf.DbQuery query = 6; * @return Whether the query field is set. */ boolean hasQuery(); /** + *
+     * 数据库查询参数结构
+     * 
+ * * .wcf.DbQuery query = 6; * @return The query. */ com.iamteer.Wcf.DbQuery getQuery(); /** + *
+     * 数据库查询参数结构
+     * 
+ * * .wcf.DbQuery query = 6; */ com.iamteer.Wcf.DbQueryOrBuilder getQueryOrBuilder(); /** + *
+     * 通过好友验证参数结构
+     * 
+ * * .wcf.Verification v = 7; * @return Whether the v field is set. */ boolean hasV(); /** + *
+     * 通过好友验证参数结构
+     * 
+ * * .wcf.Verification v = 7; * @return The v. */ com.iamteer.Wcf.Verification getV(); /** + *
+     * 通过好友验证参数结构
+     * 
+ * * .wcf.Verification v = 7; */ com.iamteer.Wcf.VerificationOrBuilder getVOrBuilder(); @@ -500,46 +599,82 @@ public final class Wcf { com.iamteer.Wcf.MemberMgmtOrBuilder getMOrBuilder(); /** + *
+     * XML参数结构
+     * 
+ * * .wcf.XmlMsg xml = 9; * @return Whether the xml field is set. */ boolean hasXml(); /** + *
+     * XML参数结构
+     * 
+ * * .wcf.XmlMsg xml = 9; * @return The xml. */ com.iamteer.Wcf.XmlMsg getXml(); /** + *
+     * XML参数结构
+     * 
+ * * .wcf.XmlMsg xml = 9; */ com.iamteer.Wcf.XmlMsgOrBuilder getXmlOrBuilder(); /** + *
+     * 解密图片参数结构
+     * 
+ * * .wcf.DecPath dec = 10; * @return Whether the dec field is set. */ boolean hasDec(); /** + *
+     * 解密图片参数结构
+     * 
+ * * .wcf.DecPath dec = 10; * @return The dec. */ com.iamteer.Wcf.DecPath getDec(); /** + *
+     * 解密图片参数结构
+     * 
+ * * .wcf.DecPath dec = 10; */ com.iamteer.Wcf.DecPathOrBuilder getDecOrBuilder(); /** + *
+     * 接收转账参数结构
+     * 
+ * * .wcf.Transfer tf = 11; * @return Whether the tf field is set. */ boolean hasTf(); /** + *
+     * 接收转账参数结构
+     * 
+ * * .wcf.Transfer tf = 11; * @return The tf. */ com.iamteer.Wcf.Transfer getTf(); /** + *
+     * 接收转账参数结构
+     * 
+ * * .wcf.Transfer tf = 11; */ com.iamteer.Wcf.TransferOrBuilder getTfOrBuilder(); @@ -549,7 +684,7 @@ public final class Wcf { * 64 位整数,通用 * * - * uint64 ui64 = 12; + * uint64 ui64 = 12 [jstype = JS_STRING]; * @return Whether the ui64 field is set. */ boolean hasUi64(); @@ -558,83 +693,166 @@ public final class Wcf { * 64 位整数,通用 * * - * uint64 ui64 = 12; + * uint64 ui64 = 12 [jstype = JS_STRING]; * @return The ui64. */ long getUi64(); /** + *
+     * 布尔值
+     * 
+ * * bool flag = 13; * @return Whether the flag field is set. */ boolean hasFlag(); /** + *
+     * 布尔值
+     * 
+ * * bool flag = 13; * @return The flag. */ boolean getFlag(); /** + *
+     * 下载图片、视频、文件参数结构
+     * 
+ * * .wcf.AttachMsg att = 14; * @return Whether the att field is set. */ boolean hasAtt(); /** + *
+     * 下载图片、视频、文件参数结构
+     * 
+ * * .wcf.AttachMsg att = 14; * @return The att. */ com.iamteer.Wcf.AttachMsg getAtt(); /** + *
+     * 下载图片、视频、文件参数结构
+     * 
+ * * .wcf.AttachMsg att = 14; */ com.iamteer.Wcf.AttachMsgOrBuilder getAttOrBuilder(); /** + *
+     * 保存语音参数结构
+     * 
+ * * .wcf.AudioMsg am = 15; * @return Whether the am field is set. */ boolean hasAm(); /** + *
+     * 保存语音参数结构
+     * 
+ * * .wcf.AudioMsg am = 15; * @return The am. */ com.iamteer.Wcf.AudioMsg getAm(); /** + *
+     * 保存语音参数结构
+     * 
+ * * .wcf.AudioMsg am = 15; */ com.iamteer.Wcf.AudioMsgOrBuilder getAmOrBuilder(); /** + *
+     * 发送卡片消息结构
+     * 
+ * * .wcf.RichText rt = 16; * @return Whether the rt field is set. */ boolean hasRt(); /** + *
+     * 发送卡片消息结构
+     * 
+ * * .wcf.RichText rt = 16; * @return The rt. */ com.iamteer.Wcf.RichText getRt(); /** + *
+     * 发送卡片消息结构
+     * 
+ * * .wcf.RichText rt = 16; */ com.iamteer.Wcf.RichTextOrBuilder getRtOrBuilder(); /** + *
+     * 发送拍一拍参数结构
+     * 
+ * * .wcf.PatMsg pm = 17; * @return Whether the pm field is set. */ boolean hasPm(); /** + *
+     * 发送拍一拍参数结构
+     * 
+ * * .wcf.PatMsg pm = 17; * @return The pm. */ com.iamteer.Wcf.PatMsg getPm(); /** + *
+     * 发送拍一拍参数结构
+     * 
+ * * .wcf.PatMsg pm = 17; */ com.iamteer.Wcf.PatMsgOrBuilder getPmOrBuilder(); - com.iamteer.Wcf.Request.MsgCase getMsgCase(); + /** + *
+     * 转发消息参数结构
+     * 
+ * + * .wcf.ForwardMsg fm = 18; + * @return Whether the fm field is set. + */ + boolean hasFm(); + /** + *
+     * 转发消息参数结构
+     * 
+ * + * .wcf.ForwardMsg fm = 18; + * @return The fm. + */ + com.iamteer.Wcf.ForwardMsg getFm(); + /** + *
+     * 转发消息参数结构
+     * 
+ * + * .wcf.ForwardMsg fm = 18; + */ + com.iamteer.Wcf.ForwardMsgOrBuilder getFmOrBuilder(); + + public com.iamteer.Wcf.Request.MsgCase getMsgCase(); } /** * Protobuf type {@code wcf.Request} @@ -659,6 +877,266 @@ public final class Wcf { return new Request(); } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Request( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + func_ = rawValue; + break; + } + case 18: { + com.iamteer.Wcf.Empty.Builder subBuilder = null; + if (msgCase_ == 2) { + subBuilder = ((com.iamteer.Wcf.Empty) msg_).toBuilder(); + } + msg_ = + input.readMessage(com.iamteer.Wcf.Empty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.iamteer.Wcf.Empty) msg_); + msg_ = subBuilder.buildPartial(); + } + msgCase_ = 2; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + msgCase_ = 3; + msg_ = s; + break; + } + case 34: { + com.iamteer.Wcf.TextMsg.Builder subBuilder = null; + if (msgCase_ == 4) { + subBuilder = ((com.iamteer.Wcf.TextMsg) msg_).toBuilder(); + } + msg_ = + input.readMessage(com.iamteer.Wcf.TextMsg.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.iamteer.Wcf.TextMsg) msg_); + msg_ = subBuilder.buildPartial(); + } + msgCase_ = 4; + break; + } + case 42: { + com.iamteer.Wcf.PathMsg.Builder subBuilder = null; + if (msgCase_ == 5) { + subBuilder = ((com.iamteer.Wcf.PathMsg) msg_).toBuilder(); + } + msg_ = + input.readMessage(com.iamteer.Wcf.PathMsg.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.iamteer.Wcf.PathMsg) msg_); + msg_ = subBuilder.buildPartial(); + } + msgCase_ = 5; + break; + } + case 50: { + com.iamteer.Wcf.DbQuery.Builder subBuilder = null; + if (msgCase_ == 6) { + subBuilder = ((com.iamteer.Wcf.DbQuery) msg_).toBuilder(); + } + msg_ = + input.readMessage(com.iamteer.Wcf.DbQuery.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.iamteer.Wcf.DbQuery) msg_); + msg_ = subBuilder.buildPartial(); + } + msgCase_ = 6; + break; + } + case 58: { + com.iamteer.Wcf.Verification.Builder subBuilder = null; + if (msgCase_ == 7) { + subBuilder = ((com.iamteer.Wcf.Verification) msg_).toBuilder(); + } + msg_ = + input.readMessage(com.iamteer.Wcf.Verification.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.iamteer.Wcf.Verification) msg_); + msg_ = subBuilder.buildPartial(); + } + msgCase_ = 7; + break; + } + case 66: { + com.iamteer.Wcf.MemberMgmt.Builder subBuilder = null; + if (msgCase_ == 8) { + subBuilder = ((com.iamteer.Wcf.MemberMgmt) msg_).toBuilder(); + } + msg_ = + input.readMessage(com.iamteer.Wcf.MemberMgmt.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.iamteer.Wcf.MemberMgmt) msg_); + msg_ = subBuilder.buildPartial(); + } + msgCase_ = 8; + break; + } + case 74: { + com.iamteer.Wcf.XmlMsg.Builder subBuilder = null; + if (msgCase_ == 9) { + subBuilder = ((com.iamteer.Wcf.XmlMsg) msg_).toBuilder(); + } + msg_ = + input.readMessage(com.iamteer.Wcf.XmlMsg.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.iamteer.Wcf.XmlMsg) msg_); + msg_ = subBuilder.buildPartial(); + } + msgCase_ = 9; + break; + } + case 82: { + com.iamteer.Wcf.DecPath.Builder subBuilder = null; + if (msgCase_ == 10) { + subBuilder = ((com.iamteer.Wcf.DecPath) msg_).toBuilder(); + } + msg_ = + input.readMessage(com.iamteer.Wcf.DecPath.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.iamteer.Wcf.DecPath) msg_); + msg_ = subBuilder.buildPartial(); + } + msgCase_ = 10; + break; + } + case 90: { + com.iamteer.Wcf.Transfer.Builder subBuilder = null; + if (msgCase_ == 11) { + subBuilder = ((com.iamteer.Wcf.Transfer) msg_).toBuilder(); + } + msg_ = + input.readMessage(com.iamteer.Wcf.Transfer.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.iamteer.Wcf.Transfer) msg_); + msg_ = subBuilder.buildPartial(); + } + msgCase_ = 11; + break; + } + case 96: { + msg_ = input.readUInt64(); + msgCase_ = 12; + break; + } + case 104: { + msg_ = input.readBool(); + msgCase_ = 13; + break; + } + case 114: { + com.iamteer.Wcf.AttachMsg.Builder subBuilder = null; + if (msgCase_ == 14) { + subBuilder = ((com.iamteer.Wcf.AttachMsg) msg_).toBuilder(); + } + msg_ = + input.readMessage(com.iamteer.Wcf.AttachMsg.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.iamteer.Wcf.AttachMsg) msg_); + msg_ = subBuilder.buildPartial(); + } + msgCase_ = 14; + break; + } + case 122: { + com.iamteer.Wcf.AudioMsg.Builder subBuilder = null; + if (msgCase_ == 15) { + subBuilder = ((com.iamteer.Wcf.AudioMsg) msg_).toBuilder(); + } + msg_ = + input.readMessage(com.iamteer.Wcf.AudioMsg.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.iamteer.Wcf.AudioMsg) msg_); + msg_ = subBuilder.buildPartial(); + } + msgCase_ = 15; + break; + } + case 130: { + com.iamteer.Wcf.RichText.Builder subBuilder = null; + if (msgCase_ == 16) { + subBuilder = ((com.iamteer.Wcf.RichText) msg_).toBuilder(); + } + msg_ = + input.readMessage(com.iamteer.Wcf.RichText.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.iamteer.Wcf.RichText) msg_); + msg_ = subBuilder.buildPartial(); + } + msgCase_ = 16; + break; + } + case 138: { + com.iamteer.Wcf.PatMsg.Builder subBuilder = null; + if (msgCase_ == 17) { + subBuilder = ((com.iamteer.Wcf.PatMsg) msg_).toBuilder(); + } + msg_ = + input.readMessage(com.iamteer.Wcf.PatMsg.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.iamteer.Wcf.PatMsg) msg_); + msg_ = subBuilder.buildPartial(); + } + msgCase_ = 17; + break; + } + case 146: { + com.iamteer.Wcf.ForwardMsg.Builder subBuilder = null; + if (msgCase_ == 18) { + subBuilder = ((com.iamteer.Wcf.ForwardMsg) msg_).toBuilder(); + } + msg_ = + input.readMessage(com.iamteer.Wcf.ForwardMsg.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.iamteer.Wcf.ForwardMsg) msg_); + msg_ = subBuilder.buildPartial(); + } + msgCase_ = 18; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.iamteer.Wcf.internal_static_wcf_Request_descriptor; @@ -673,7 +1151,6 @@ public final class Wcf { } private int msgCase_ = 0; - @SuppressWarnings("serial") private java.lang.Object msg_; public enum MsgCase implements com.google.protobuf.Internal.EnumLite, @@ -694,6 +1171,7 @@ public final class Wcf { AM(15), RT(16), PM(17), + FM(18), MSG_NOT_SET(0); private final int value; private MsgCase(int value) { @@ -727,6 +1205,7 @@ public final class Wcf { case 15: return AM; case 16: return RT; case 17: return PM; + case 18: return FM; case 0: return MSG_NOT_SET; default: return null; } @@ -743,7 +1222,7 @@ public final class Wcf { } public static final int FUNC_FIELD_NUMBER = 1; - private int func_ = 0; + private int func_; /** * .wcf.Functions func = 1; * @return The enum numeric value on the wire for func. @@ -756,12 +1235,17 @@ public final class Wcf { * @return The func. */ @java.lang.Override public com.iamteer.Wcf.Functions getFunc() { - com.iamteer.Wcf.Functions result = com.iamteer.Wcf.Functions.forNumber(func_); + @SuppressWarnings("deprecation") + com.iamteer.Wcf.Functions result = com.iamteer.Wcf.Functions.valueOf(func_); return result == null ? com.iamteer.Wcf.Functions.UNRECOGNIZED : result; } public static final int EMPTY_FIELD_NUMBER = 2; /** + *
+     * 无参数
+     * 
+ * * .wcf.Empty empty = 2; * @return Whether the empty field is set. */ @@ -770,6 +1254,10 @@ public final class Wcf { return msgCase_ == 2; } /** + *
+     * 无参数
+     * 
+ * * .wcf.Empty empty = 2; * @return The empty. */ @@ -781,6 +1269,10 @@ public final class Wcf { return com.iamteer.Wcf.Empty.getDefaultInstance(); } /** + *
+     * 无参数
+     * 
+ * * .wcf.Empty empty = 2; */ @java.lang.Override @@ -793,6 +1285,10 @@ public final class Wcf { public static final int STR_FIELD_NUMBER = 3; /** + *
+     * 字符串
+     * 
+ * * string str = 3; * @return Whether the str field is set. */ @@ -800,6 +1296,10 @@ public final class Wcf { return msgCase_ == 3; } /** + *
+     * 字符串
+     * 
+ * * string str = 3; * @return The str. */ @@ -821,6 +1321,10 @@ public final class Wcf { } } /** + *
+     * 字符串
+     * 
+ * * string str = 3; * @return The bytes for str. */ @@ -845,6 +1349,10 @@ public final class Wcf { public static final int TXT_FIELD_NUMBER = 4; /** + *
+     * 发送文本消息结构
+     * 
+ * * .wcf.TextMsg txt = 4; * @return Whether the txt field is set. */ @@ -853,6 +1361,10 @@ public final class Wcf { return msgCase_ == 4; } /** + *
+     * 发送文本消息结构
+     * 
+ * * .wcf.TextMsg txt = 4; * @return The txt. */ @@ -864,6 +1376,10 @@ public final class Wcf { return com.iamteer.Wcf.TextMsg.getDefaultInstance(); } /** + *
+     * 发送文本消息结构
+     * 
+ * * .wcf.TextMsg txt = 4; */ @java.lang.Override @@ -876,6 +1392,10 @@ public final class Wcf { public static final int FILE_FIELD_NUMBER = 5; /** + *
+     * 发送图片、文件消息结构
+     * 
+ * * .wcf.PathMsg file = 5; * @return Whether the file field is set. */ @@ -884,6 +1404,10 @@ public final class Wcf { return msgCase_ == 5; } /** + *
+     * 发送图片、文件消息结构
+     * 
+ * * .wcf.PathMsg file = 5; * @return The file. */ @@ -895,6 +1419,10 @@ public final class Wcf { return com.iamteer.Wcf.PathMsg.getDefaultInstance(); } /** + *
+     * 发送图片、文件消息结构
+     * 
+ * * .wcf.PathMsg file = 5; */ @java.lang.Override @@ -907,6 +1435,10 @@ public final class Wcf { public static final int QUERY_FIELD_NUMBER = 6; /** + *
+     * 数据库查询参数结构
+     * 
+ * * .wcf.DbQuery query = 6; * @return Whether the query field is set. */ @@ -915,6 +1447,10 @@ public final class Wcf { return msgCase_ == 6; } /** + *
+     * 数据库查询参数结构
+     * 
+ * * .wcf.DbQuery query = 6; * @return The query. */ @@ -926,6 +1462,10 @@ public final class Wcf { return com.iamteer.Wcf.DbQuery.getDefaultInstance(); } /** + *
+     * 数据库查询参数结构
+     * 
+ * * .wcf.DbQuery query = 6; */ @java.lang.Override @@ -938,6 +1478,10 @@ public final class Wcf { public static final int V_FIELD_NUMBER = 7; /** + *
+     * 通过好友验证参数结构
+     * 
+ * * .wcf.Verification v = 7; * @return Whether the v field is set. */ @@ -946,6 +1490,10 @@ public final class Wcf { return msgCase_ == 7; } /** + *
+     * 通过好友验证参数结构
+     * 
+ * * .wcf.Verification v = 7; * @return The v. */ @@ -957,6 +1505,10 @@ public final class Wcf { return com.iamteer.Wcf.Verification.getDefaultInstance(); } /** + *
+     * 通过好友验证参数结构
+     * 
+ * * .wcf.Verification v = 7; */ @java.lang.Override @@ -1012,6 +1564,10 @@ public final class Wcf { public static final int XML_FIELD_NUMBER = 9; /** + *
+     * XML参数结构
+     * 
+ * * .wcf.XmlMsg xml = 9; * @return Whether the xml field is set. */ @@ -1020,6 +1576,10 @@ public final class Wcf { return msgCase_ == 9; } /** + *
+     * XML参数结构
+     * 
+ * * .wcf.XmlMsg xml = 9; * @return The xml. */ @@ -1031,6 +1591,10 @@ public final class Wcf { return com.iamteer.Wcf.XmlMsg.getDefaultInstance(); } /** + *
+     * XML参数结构
+     * 
+ * * .wcf.XmlMsg xml = 9; */ @java.lang.Override @@ -1043,6 +1607,10 @@ public final class Wcf { public static final int DEC_FIELD_NUMBER = 10; /** + *
+     * 解密图片参数结构
+     * 
+ * * .wcf.DecPath dec = 10; * @return Whether the dec field is set. */ @@ -1051,6 +1619,10 @@ public final class Wcf { return msgCase_ == 10; } /** + *
+     * 解密图片参数结构
+     * 
+ * * .wcf.DecPath dec = 10; * @return The dec. */ @@ -1062,6 +1634,10 @@ public final class Wcf { return com.iamteer.Wcf.DecPath.getDefaultInstance(); } /** + *
+     * 解密图片参数结构
+     * 
+ * * .wcf.DecPath dec = 10; */ @java.lang.Override @@ -1074,6 +1650,10 @@ public final class Wcf { public static final int TF_FIELD_NUMBER = 11; /** + *
+     * 接收转账参数结构
+     * 
+ * * .wcf.Transfer tf = 11; * @return Whether the tf field is set. */ @@ -1082,6 +1662,10 @@ public final class Wcf { return msgCase_ == 11; } /** + *
+     * 接收转账参数结构
+     * 
+ * * .wcf.Transfer tf = 11; * @return The tf. */ @@ -1093,6 +1677,10 @@ public final class Wcf { return com.iamteer.Wcf.Transfer.getDefaultInstance(); } /** + *
+     * 接收转账参数结构
+     * 
+ * * .wcf.Transfer tf = 11; */ @java.lang.Override @@ -1109,7 +1697,7 @@ public final class Wcf { * 64 位整数,通用 * * - * uint64 ui64 = 12; + * uint64 ui64 = 12 [jstype = JS_STRING]; * @return Whether the ui64 field is set. */ @java.lang.Override @@ -1121,7 +1709,7 @@ public final class Wcf { * 64 位整数,通用 * * - * uint64 ui64 = 12; + * uint64 ui64 = 12 [jstype = JS_STRING]; * @return The ui64. */ @java.lang.Override @@ -1134,6 +1722,10 @@ public final class Wcf { public static final int FLAG_FIELD_NUMBER = 13; /** + *
+     * 布尔值
+     * 
+ * * bool flag = 13; * @return Whether the flag field is set. */ @@ -1142,6 +1734,10 @@ public final class Wcf { return msgCase_ == 13; } /** + *
+     * 布尔值
+     * 
+ * * bool flag = 13; * @return The flag. */ @@ -1155,6 +1751,10 @@ public final class Wcf { public static final int ATT_FIELD_NUMBER = 14; /** + *
+     * 下载图片、视频、文件参数结构
+     * 
+ * * .wcf.AttachMsg att = 14; * @return Whether the att field is set. */ @@ -1163,6 +1763,10 @@ public final class Wcf { return msgCase_ == 14; } /** + *
+     * 下载图片、视频、文件参数结构
+     * 
+ * * .wcf.AttachMsg att = 14; * @return The att. */ @@ -1174,6 +1778,10 @@ public final class Wcf { return com.iamteer.Wcf.AttachMsg.getDefaultInstance(); } /** + *
+     * 下载图片、视频、文件参数结构
+     * 
+ * * .wcf.AttachMsg att = 14; */ @java.lang.Override @@ -1186,6 +1794,10 @@ public final class Wcf { public static final int AM_FIELD_NUMBER = 15; /** + *
+     * 保存语音参数结构
+     * 
+ * * .wcf.AudioMsg am = 15; * @return Whether the am field is set. */ @@ -1194,6 +1806,10 @@ public final class Wcf { return msgCase_ == 15; } /** + *
+     * 保存语音参数结构
+     * 
+ * * .wcf.AudioMsg am = 15; * @return The am. */ @@ -1205,6 +1821,10 @@ public final class Wcf { return com.iamteer.Wcf.AudioMsg.getDefaultInstance(); } /** + *
+     * 保存语音参数结构
+     * 
+ * * .wcf.AudioMsg am = 15; */ @java.lang.Override @@ -1217,6 +1837,10 @@ public final class Wcf { public static final int RT_FIELD_NUMBER = 16; /** + *
+     * 发送卡片消息结构
+     * 
+ * * .wcf.RichText rt = 16; * @return Whether the rt field is set. */ @@ -1225,6 +1849,10 @@ public final class Wcf { return msgCase_ == 16; } /** + *
+     * 发送卡片消息结构
+     * 
+ * * .wcf.RichText rt = 16; * @return The rt. */ @@ -1236,6 +1864,10 @@ public final class Wcf { return com.iamteer.Wcf.RichText.getDefaultInstance(); } /** + *
+     * 发送卡片消息结构
+     * 
+ * * .wcf.RichText rt = 16; */ @java.lang.Override @@ -1248,6 +1880,10 @@ public final class Wcf { public static final int PM_FIELD_NUMBER = 17; /** + *
+     * 发送拍一拍参数结构
+     * 
+ * * .wcf.PatMsg pm = 17; * @return Whether the pm field is set. */ @@ -1256,6 +1892,10 @@ public final class Wcf { return msgCase_ == 17; } /** + *
+     * 发送拍一拍参数结构
+     * 
+ * * .wcf.PatMsg pm = 17; * @return The pm. */ @@ -1267,6 +1907,10 @@ public final class Wcf { return com.iamteer.Wcf.PatMsg.getDefaultInstance(); } /** + *
+     * 发送拍一拍参数结构
+     * 
+ * * .wcf.PatMsg pm = 17; */ @java.lang.Override @@ -1277,6 +1921,49 @@ public final class Wcf { return com.iamteer.Wcf.PatMsg.getDefaultInstance(); } + public static final int FM_FIELD_NUMBER = 18; + /** + *
+     * 转发消息参数结构
+     * 
+ * + * .wcf.ForwardMsg fm = 18; + * @return Whether the fm field is set. + */ + @java.lang.Override + public boolean hasFm() { + return msgCase_ == 18; + } + /** + *
+     * 转发消息参数结构
+     * 
+ * + * .wcf.ForwardMsg fm = 18; + * @return The fm. + */ + @java.lang.Override + public com.iamteer.Wcf.ForwardMsg getFm() { + if (msgCase_ == 18) { + return (com.iamteer.Wcf.ForwardMsg) msg_; + } + return com.iamteer.Wcf.ForwardMsg.getDefaultInstance(); + } + /** + *
+     * 转发消息参数结构
+     * 
+ * + * .wcf.ForwardMsg fm = 18; + */ + @java.lang.Override + public com.iamteer.Wcf.ForwardMsgOrBuilder getFmOrBuilder() { + if (msgCase_ == 18) { + return (com.iamteer.Wcf.ForwardMsg) msg_; + } + return com.iamteer.Wcf.ForwardMsg.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -1344,7 +2031,10 @@ public final class Wcf { if (msgCase_ == 17) { output.writeMessage(17, (com.iamteer.Wcf.PatMsg) msg_); } - getUnknownFields().writeTo(output); + if (msgCase_ == 18) { + output.writeMessage(18, (com.iamteer.Wcf.ForwardMsg) msg_); + } + unknownFields.writeTo(output); } @java.lang.Override @@ -1422,7 +2112,11 @@ public final class Wcf { size += com.google.protobuf.CodedOutputStream .computeMessageSize(17, (com.iamteer.Wcf.PatMsg) msg_); } - size += getUnknownFields().getSerializedSize(); + if (msgCase_ == 18) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, (com.iamteer.Wcf.ForwardMsg) msg_); + } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @@ -1504,10 +2198,14 @@ public final class Wcf { if (!getPm() .equals(other.getPm())) return false; break; + case 18: + if (!getFm() + .equals(other.getFm())) return false; + break; case 0: default: } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1587,10 +2285,14 @@ public final class Wcf { hash = (37 * hash) + PM_FIELD_NUMBER; hash = (53 * hash) + getPm().hashCode(); break; + case 18: + hash = (37 * hash) + FM_FIELD_NUMBER; + hash = (53 * hash) + getFm().hashCode(); + break; case 0: default: } - hash = (29 * hash) + getUnknownFields().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } @@ -1707,58 +2409,24 @@ public final class Wcf { // Construct using com.iamteer.Wcf.Request.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } } @java.lang.Override public Builder clear() { super.clear(); - bitField0_ = 0; func_ = 0; - if (emptyBuilder_ != null) { - emptyBuilder_.clear(); - } - if (txtBuilder_ != null) { - txtBuilder_.clear(); - } - if (fileBuilder_ != null) { - fileBuilder_.clear(); - } - if (queryBuilder_ != null) { - queryBuilder_.clear(); - } - if (vBuilder_ != null) { - vBuilder_.clear(); - } - if (mBuilder_ != null) { - mBuilder_.clear(); - } - if (xmlBuilder_ != null) { - xmlBuilder_.clear(); - } - if (decBuilder_ != null) { - decBuilder_.clear(); - } - if (tfBuilder_ != null) { - tfBuilder_.clear(); - } - if (attBuilder_ != null) { - attBuilder_.clear(); - } - if (amBuilder_ != null) { - amBuilder_.clear(); - } - if (rtBuilder_ != null) { - rtBuilder_.clear(); - } - if (pmBuilder_ != null) { - pmBuilder_.clear(); - } + msgCase_ = 0; msg_ = null; return this; @@ -1787,76 +2455,151 @@ public final class Wcf { @java.lang.Override public com.iamteer.Wcf.Request buildPartial() { com.iamteer.Wcf.Request result = new com.iamteer.Wcf.Request(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); + result.func_ = func_; + if (msgCase_ == 2) { + if (emptyBuilder_ == null) { + result.msg_ = msg_; + } else { + result.msg_ = emptyBuilder_.build(); + } + } + if (msgCase_ == 3) { + result.msg_ = msg_; + } + if (msgCase_ == 4) { + if (txtBuilder_ == null) { + result.msg_ = msg_; + } else { + result.msg_ = txtBuilder_.build(); + } + } + if (msgCase_ == 5) { + if (fileBuilder_ == null) { + result.msg_ = msg_; + } else { + result.msg_ = fileBuilder_.build(); + } + } + if (msgCase_ == 6) { + if (queryBuilder_ == null) { + result.msg_ = msg_; + } else { + result.msg_ = queryBuilder_.build(); + } + } + if (msgCase_ == 7) { + if (vBuilder_ == null) { + result.msg_ = msg_; + } else { + result.msg_ = vBuilder_.build(); + } + } + if (msgCase_ == 8) { + if (mBuilder_ == null) { + result.msg_ = msg_; + } else { + result.msg_ = mBuilder_.build(); + } + } + if (msgCase_ == 9) { + if (xmlBuilder_ == null) { + result.msg_ = msg_; + } else { + result.msg_ = xmlBuilder_.build(); + } + } + if (msgCase_ == 10) { + if (decBuilder_ == null) { + result.msg_ = msg_; + } else { + result.msg_ = decBuilder_.build(); + } + } + if (msgCase_ == 11) { + if (tfBuilder_ == null) { + result.msg_ = msg_; + } else { + result.msg_ = tfBuilder_.build(); + } + } + if (msgCase_ == 12) { + result.msg_ = msg_; + } + if (msgCase_ == 13) { + result.msg_ = msg_; + } + if (msgCase_ == 14) { + if (attBuilder_ == null) { + result.msg_ = msg_; + } else { + result.msg_ = attBuilder_.build(); + } + } + if (msgCase_ == 15) { + if (amBuilder_ == null) { + result.msg_ = msg_; + } else { + result.msg_ = amBuilder_.build(); + } + } + if (msgCase_ == 16) { + if (rtBuilder_ == null) { + result.msg_ = msg_; + } else { + result.msg_ = rtBuilder_.build(); + } + } + if (msgCase_ == 17) { + if (pmBuilder_ == null) { + result.msg_ = msg_; + } else { + result.msg_ = pmBuilder_.build(); + } + } + if (msgCase_ == 18) { + if (fmBuilder_ == null) { + result.msg_ = msg_; + } else { + result.msg_ = fmBuilder_.build(); + } + } + result.msgCase_ = msgCase_; onBuilt(); return result; } - private void buildPartial0(com.iamteer.Wcf.Request result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.func_ = func_; - } + @java.lang.Override + public Builder clone() { + return super.clone(); } - - private void buildPartialOneofs(com.iamteer.Wcf.Request result) { - result.msgCase_ = msgCase_; - result.msg_ = this.msg_; - if (msgCase_ == 2 && - emptyBuilder_ != null) { - result.msg_ = emptyBuilder_.build(); - } - if (msgCase_ == 4 && - txtBuilder_ != null) { - result.msg_ = txtBuilder_.build(); - } - if (msgCase_ == 5 && - fileBuilder_ != null) { - result.msg_ = fileBuilder_.build(); - } - if (msgCase_ == 6 && - queryBuilder_ != null) { - result.msg_ = queryBuilder_.build(); - } - if (msgCase_ == 7 && - vBuilder_ != null) { - result.msg_ = vBuilder_.build(); - } - if (msgCase_ == 8 && - mBuilder_ != null) { - result.msg_ = mBuilder_.build(); - } - if (msgCase_ == 9 && - xmlBuilder_ != null) { - result.msg_ = xmlBuilder_.build(); - } - if (msgCase_ == 10 && - decBuilder_ != null) { - result.msg_ = decBuilder_.build(); - } - if (msgCase_ == 11 && - tfBuilder_ != null) { - result.msg_ = tfBuilder_.build(); - } - if (msgCase_ == 14 && - attBuilder_ != null) { - result.msg_ = attBuilder_.build(); - } - if (msgCase_ == 15 && - amBuilder_ != null) { - result.msg_ = amBuilder_.build(); - } - if (msgCase_ == 16 && - rtBuilder_ != null) { - result.msg_ = rtBuilder_.build(); - } - if (msgCase_ == 17 && - pmBuilder_ != null) { - result.msg_ = pmBuilder_.build(); - } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.iamteer.Wcf.Request) { @@ -1939,11 +2682,15 @@ public final class Wcf { mergePm(other.getPm()); break; } + case FM: { + mergeFm(other.getFm()); + break; + } case MSG_NOT_SET: { break; } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -1958,142 +2705,17 @@ public final class Wcf { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } + com.iamteer.Wcf.Request parsedMessage = null; try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - func_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: { - input.readMessage( - getEmptyFieldBuilder().getBuilder(), - extensionRegistry); - msgCase_ = 2; - break; - } // case 18 - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - msgCase_ = 3; - msg_ = s; - break; - } // case 26 - case 34: { - input.readMessage( - getTxtFieldBuilder().getBuilder(), - extensionRegistry); - msgCase_ = 4; - break; - } // case 34 - case 42: { - input.readMessage( - getFileFieldBuilder().getBuilder(), - extensionRegistry); - msgCase_ = 5; - break; - } // case 42 - case 50: { - input.readMessage( - getQueryFieldBuilder().getBuilder(), - extensionRegistry); - msgCase_ = 6; - break; - } // case 50 - case 58: { - input.readMessage( - getVFieldBuilder().getBuilder(), - extensionRegistry); - msgCase_ = 7; - break; - } // case 58 - case 66: { - input.readMessage( - getMFieldBuilder().getBuilder(), - extensionRegistry); - msgCase_ = 8; - break; - } // case 66 - case 74: { - input.readMessage( - getXmlFieldBuilder().getBuilder(), - extensionRegistry); - msgCase_ = 9; - break; - } // case 74 - case 82: { - input.readMessage( - getDecFieldBuilder().getBuilder(), - extensionRegistry); - msgCase_ = 10; - break; - } // case 82 - case 90: { - input.readMessage( - getTfFieldBuilder().getBuilder(), - extensionRegistry); - msgCase_ = 11; - break; - } // case 90 - case 96: { - msg_ = input.readUInt64(); - msgCase_ = 12; - break; - } // case 96 - case 104: { - msg_ = input.readBool(); - msgCase_ = 13; - break; - } // case 104 - case 114: { - input.readMessage( - getAttFieldBuilder().getBuilder(), - extensionRegistry); - msgCase_ = 14; - break; - } // case 114 - case 122: { - input.readMessage( - getAmFieldBuilder().getBuilder(), - extensionRegistry); - msgCase_ = 15; - break; - } // case 122 - case 130: { - input.readMessage( - getRtFieldBuilder().getBuilder(), - extensionRegistry); - msgCase_ = 16; - break; - } // case 130 - case 138: { - input.readMessage( - getPmFieldBuilder().getBuilder(), - extensionRegistry); - msgCase_ = 17; - break; - } // case 138 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.iamteer.Wcf.Request) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - onChanged(); - } // finally + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } return this; } private int msgCase_ = 0; @@ -2111,7 +2733,6 @@ public final class Wcf { return this; } - private int bitField0_; private int func_ = 0; /** @@ -2127,8 +2748,8 @@ public final class Wcf { * @return This builder for chaining. */ public Builder setFuncValue(int value) { + func_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } @@ -2138,7 +2759,8 @@ public final class Wcf { */ @java.lang.Override public com.iamteer.Wcf.Functions getFunc() { - com.iamteer.Wcf.Functions result = com.iamteer.Wcf.Functions.forNumber(func_); + @SuppressWarnings("deprecation") + com.iamteer.Wcf.Functions result = com.iamteer.Wcf.Functions.valueOf(func_); return result == null ? com.iamteer.Wcf.Functions.UNRECOGNIZED : result; } /** @@ -2150,7 +2772,7 @@ public final class Wcf { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; + func_ = value.getNumber(); onChanged(); return this; @@ -2160,7 +2782,7 @@ public final class Wcf { * @return This builder for chaining. */ public Builder clearFunc() { - bitField0_ = (bitField0_ & ~0x00000001); + func_ = 0; onChanged(); return this; @@ -2169,6 +2791,10 @@ public final class Wcf { private com.google.protobuf.SingleFieldBuilderV3< com.iamteer.Wcf.Empty, com.iamteer.Wcf.Empty.Builder, com.iamteer.Wcf.EmptyOrBuilder> emptyBuilder_; /** + *
+       * 无参数
+       * 
+ * * .wcf.Empty empty = 2; * @return Whether the empty field is set. */ @@ -2177,6 +2803,10 @@ public final class Wcf { return msgCase_ == 2; } /** + *
+       * 无参数
+       * 
+ * * .wcf.Empty empty = 2; * @return The empty. */ @@ -2195,6 +2825,10 @@ public final class Wcf { } } /** + *
+       * 无参数
+       * 
+ * * .wcf.Empty empty = 2; */ public Builder setEmpty(com.iamteer.Wcf.Empty value) { @@ -2211,6 +2845,10 @@ public final class Wcf { return this; } /** + *
+       * 无参数
+       * 
+ * * .wcf.Empty empty = 2; */ public Builder setEmpty( @@ -2225,6 +2863,10 @@ public final class Wcf { return this; } /** + *
+       * 无参数
+       * 
+ * * .wcf.Empty empty = 2; */ public Builder mergeEmpty(com.iamteer.Wcf.Empty value) { @@ -2240,14 +2882,17 @@ public final class Wcf { } else { if (msgCase_ == 2) { emptyBuilder_.mergeFrom(value); - } else { - emptyBuilder_.setMessage(value); } + emptyBuilder_.setMessage(value); } msgCase_ = 2; return this; } /** + *
+       * 无参数
+       * 
+ * * .wcf.Empty empty = 2; */ public Builder clearEmpty() { @@ -2267,12 +2912,20 @@ public final class Wcf { return this; } /** + *
+       * 无参数
+       * 
+ * * .wcf.Empty empty = 2; */ public com.iamteer.Wcf.Empty.Builder getEmptyBuilder() { return getEmptyFieldBuilder().getBuilder(); } /** + *
+       * 无参数
+       * 
+ * * .wcf.Empty empty = 2; */ @java.lang.Override @@ -2287,6 +2940,10 @@ public final class Wcf { } } /** + *
+       * 无参数
+       * 
+ * * .wcf.Empty empty = 2; */ private com.google.protobuf.SingleFieldBuilderV3< @@ -2304,11 +2961,15 @@ public final class Wcf { msg_ = null; } msgCase_ = 2; - onChanged(); + onChanged();; return emptyBuilder_; } /** + *
+       * 字符串
+       * 
+ * * string str = 3; * @return Whether the str field is set. */ @@ -2317,6 +2978,10 @@ public final class Wcf { return msgCase_ == 3; } /** + *
+       * 字符串
+       * 
+ * * string str = 3; * @return The str. */ @@ -2339,6 +3004,10 @@ public final class Wcf { } } /** + *
+       * 字符串
+       * 
+ * * string str = 3; * @return The bytes for str. */ @@ -2362,19 +3031,29 @@ public final class Wcf { } } /** + *
+       * 字符串
+       * 
+ * * string str = 3; * @param value The str to set. * @return This builder for chaining. */ public Builder setStr( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - msgCase_ = 3; + if (value == null) { + throw new NullPointerException(); + } + msgCase_ = 3; msg_ = value; onChanged(); return this; } /** + *
+       * 字符串
+       * 
+ * * string str = 3; * @return This builder for chaining. */ @@ -2387,14 +3066,20 @@ public final class Wcf { return this; } /** + *
+       * 字符串
+       * 
+ * * string str = 3; * @param value The bytes for str to set. * @return This builder for chaining. */ public Builder setStrBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); msgCase_ = 3; msg_ = value; onChanged(); @@ -2404,6 +3089,10 @@ public final class Wcf { private com.google.protobuf.SingleFieldBuilderV3< com.iamteer.Wcf.TextMsg, com.iamteer.Wcf.TextMsg.Builder, com.iamteer.Wcf.TextMsgOrBuilder> txtBuilder_; /** + *
+       * 发送文本消息结构
+       * 
+ * * .wcf.TextMsg txt = 4; * @return Whether the txt field is set. */ @@ -2412,6 +3101,10 @@ public final class Wcf { return msgCase_ == 4; } /** + *
+       * 发送文本消息结构
+       * 
+ * * .wcf.TextMsg txt = 4; * @return The txt. */ @@ -2430,6 +3123,10 @@ public final class Wcf { } } /** + *
+       * 发送文本消息结构
+       * 
+ * * .wcf.TextMsg txt = 4; */ public Builder setTxt(com.iamteer.Wcf.TextMsg value) { @@ -2446,6 +3143,10 @@ public final class Wcf { return this; } /** + *
+       * 发送文本消息结构
+       * 
+ * * .wcf.TextMsg txt = 4; */ public Builder setTxt( @@ -2460,6 +3161,10 @@ public final class Wcf { return this; } /** + *
+       * 发送文本消息结构
+       * 
+ * * .wcf.TextMsg txt = 4; */ public Builder mergeTxt(com.iamteer.Wcf.TextMsg value) { @@ -2475,14 +3180,17 @@ public final class Wcf { } else { if (msgCase_ == 4) { txtBuilder_.mergeFrom(value); - } else { - txtBuilder_.setMessage(value); } + txtBuilder_.setMessage(value); } msgCase_ = 4; return this; } /** + *
+       * 发送文本消息结构
+       * 
+ * * .wcf.TextMsg txt = 4; */ public Builder clearTxt() { @@ -2502,12 +3210,20 @@ public final class Wcf { return this; } /** + *
+       * 发送文本消息结构
+       * 
+ * * .wcf.TextMsg txt = 4; */ public com.iamteer.Wcf.TextMsg.Builder getTxtBuilder() { return getTxtFieldBuilder().getBuilder(); } /** + *
+       * 发送文本消息结构
+       * 
+ * * .wcf.TextMsg txt = 4; */ @java.lang.Override @@ -2522,6 +3238,10 @@ public final class Wcf { } } /** + *
+       * 发送文本消息结构
+       * 
+ * * .wcf.TextMsg txt = 4; */ private com.google.protobuf.SingleFieldBuilderV3< @@ -2539,13 +3259,17 @@ public final class Wcf { msg_ = null; } msgCase_ = 4; - onChanged(); + onChanged();; return txtBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.iamteer.Wcf.PathMsg, com.iamteer.Wcf.PathMsg.Builder, com.iamteer.Wcf.PathMsgOrBuilder> fileBuilder_; /** + *
+       * 发送图片、文件消息结构
+       * 
+ * * .wcf.PathMsg file = 5; * @return Whether the file field is set. */ @@ -2554,6 +3278,10 @@ public final class Wcf { return msgCase_ == 5; } /** + *
+       * 发送图片、文件消息结构
+       * 
+ * * .wcf.PathMsg file = 5; * @return The file. */ @@ -2572,6 +3300,10 @@ public final class Wcf { } } /** + *
+       * 发送图片、文件消息结构
+       * 
+ * * .wcf.PathMsg file = 5; */ public Builder setFile(com.iamteer.Wcf.PathMsg value) { @@ -2588,6 +3320,10 @@ public final class Wcf { return this; } /** + *
+       * 发送图片、文件消息结构
+       * 
+ * * .wcf.PathMsg file = 5; */ public Builder setFile( @@ -2602,6 +3338,10 @@ public final class Wcf { return this; } /** + *
+       * 发送图片、文件消息结构
+       * 
+ * * .wcf.PathMsg file = 5; */ public Builder mergeFile(com.iamteer.Wcf.PathMsg value) { @@ -2617,14 +3357,17 @@ public final class Wcf { } else { if (msgCase_ == 5) { fileBuilder_.mergeFrom(value); - } else { - fileBuilder_.setMessage(value); } + fileBuilder_.setMessage(value); } msgCase_ = 5; return this; } /** + *
+       * 发送图片、文件消息结构
+       * 
+ * * .wcf.PathMsg file = 5; */ public Builder clearFile() { @@ -2644,12 +3387,20 @@ public final class Wcf { return this; } /** + *
+       * 发送图片、文件消息结构
+       * 
+ * * .wcf.PathMsg file = 5; */ public com.iamteer.Wcf.PathMsg.Builder getFileBuilder() { return getFileFieldBuilder().getBuilder(); } /** + *
+       * 发送图片、文件消息结构
+       * 
+ * * .wcf.PathMsg file = 5; */ @java.lang.Override @@ -2664,6 +3415,10 @@ public final class Wcf { } } /** + *
+       * 发送图片、文件消息结构
+       * 
+ * * .wcf.PathMsg file = 5; */ private com.google.protobuf.SingleFieldBuilderV3< @@ -2681,13 +3436,17 @@ public final class Wcf { msg_ = null; } msgCase_ = 5; - onChanged(); + onChanged();; return fileBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.iamteer.Wcf.DbQuery, com.iamteer.Wcf.DbQuery.Builder, com.iamteer.Wcf.DbQueryOrBuilder> queryBuilder_; /** + *
+       * 数据库查询参数结构
+       * 
+ * * .wcf.DbQuery query = 6; * @return Whether the query field is set. */ @@ -2696,6 +3455,10 @@ public final class Wcf { return msgCase_ == 6; } /** + *
+       * 数据库查询参数结构
+       * 
+ * * .wcf.DbQuery query = 6; * @return The query. */ @@ -2714,6 +3477,10 @@ public final class Wcf { } } /** + *
+       * 数据库查询参数结构
+       * 
+ * * .wcf.DbQuery query = 6; */ public Builder setQuery(com.iamteer.Wcf.DbQuery value) { @@ -2730,6 +3497,10 @@ public final class Wcf { return this; } /** + *
+       * 数据库查询参数结构
+       * 
+ * * .wcf.DbQuery query = 6; */ public Builder setQuery( @@ -2744,6 +3515,10 @@ public final class Wcf { return this; } /** + *
+       * 数据库查询参数结构
+       * 
+ * * .wcf.DbQuery query = 6; */ public Builder mergeQuery(com.iamteer.Wcf.DbQuery value) { @@ -2759,14 +3534,17 @@ public final class Wcf { } else { if (msgCase_ == 6) { queryBuilder_.mergeFrom(value); - } else { - queryBuilder_.setMessage(value); } + queryBuilder_.setMessage(value); } msgCase_ = 6; return this; } /** + *
+       * 数据库查询参数结构
+       * 
+ * * .wcf.DbQuery query = 6; */ public Builder clearQuery() { @@ -2786,12 +3564,20 @@ public final class Wcf { return this; } /** + *
+       * 数据库查询参数结构
+       * 
+ * * .wcf.DbQuery query = 6; */ public com.iamteer.Wcf.DbQuery.Builder getQueryBuilder() { return getQueryFieldBuilder().getBuilder(); } /** + *
+       * 数据库查询参数结构
+       * 
+ * * .wcf.DbQuery query = 6; */ @java.lang.Override @@ -2806,6 +3592,10 @@ public final class Wcf { } } /** + *
+       * 数据库查询参数结构
+       * 
+ * * .wcf.DbQuery query = 6; */ private com.google.protobuf.SingleFieldBuilderV3< @@ -2823,13 +3613,17 @@ public final class Wcf { msg_ = null; } msgCase_ = 6; - onChanged(); + onChanged();; return queryBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.iamteer.Wcf.Verification, com.iamteer.Wcf.Verification.Builder, com.iamteer.Wcf.VerificationOrBuilder> vBuilder_; /** + *
+       * 通过好友验证参数结构
+       * 
+ * * .wcf.Verification v = 7; * @return Whether the v field is set. */ @@ -2838,6 +3632,10 @@ public final class Wcf { return msgCase_ == 7; } /** + *
+       * 通过好友验证参数结构
+       * 
+ * * .wcf.Verification v = 7; * @return The v. */ @@ -2856,6 +3654,10 @@ public final class Wcf { } } /** + *
+       * 通过好友验证参数结构
+       * 
+ * * .wcf.Verification v = 7; */ public Builder setV(com.iamteer.Wcf.Verification value) { @@ -2872,6 +3674,10 @@ public final class Wcf { return this; } /** + *
+       * 通过好友验证参数结构
+       * 
+ * * .wcf.Verification v = 7; */ public Builder setV( @@ -2886,6 +3692,10 @@ public final class Wcf { return this; } /** + *
+       * 通过好友验证参数结构
+       * 
+ * * .wcf.Verification v = 7; */ public Builder mergeV(com.iamteer.Wcf.Verification value) { @@ -2901,14 +3711,17 @@ public final class Wcf { } else { if (msgCase_ == 7) { vBuilder_.mergeFrom(value); - } else { - vBuilder_.setMessage(value); } + vBuilder_.setMessage(value); } msgCase_ = 7; return this; } /** + *
+       * 通过好友验证参数结构
+       * 
+ * * .wcf.Verification v = 7; */ public Builder clearV() { @@ -2928,12 +3741,20 @@ public final class Wcf { return this; } /** + *
+       * 通过好友验证参数结构
+       * 
+ * * .wcf.Verification v = 7; */ public com.iamteer.Wcf.Verification.Builder getVBuilder() { return getVFieldBuilder().getBuilder(); } /** + *
+       * 通过好友验证参数结构
+       * 
+ * * .wcf.Verification v = 7; */ @java.lang.Override @@ -2948,6 +3769,10 @@ public final class Wcf { } } /** + *
+       * 通过好友验证参数结构
+       * 
+ * * .wcf.Verification v = 7; */ private com.google.protobuf.SingleFieldBuilderV3< @@ -2965,7 +3790,7 @@ public final class Wcf { msg_ = null; } msgCase_ = 7; - onChanged(); + onChanged();; return vBuilder_; } @@ -3063,9 +3888,8 @@ public final class Wcf { } else { if (msgCase_ == 8) { mBuilder_.mergeFrom(value); - } else { - mBuilder_.setMessage(value); } + mBuilder_.setMessage(value); } msgCase_ = 8; return this; @@ -3143,13 +3967,17 @@ public final class Wcf { msg_ = null; } msgCase_ = 8; - onChanged(); + onChanged();; return mBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.iamteer.Wcf.XmlMsg, com.iamteer.Wcf.XmlMsg.Builder, com.iamteer.Wcf.XmlMsgOrBuilder> xmlBuilder_; /** + *
+       * XML参数结构
+       * 
+ * * .wcf.XmlMsg xml = 9; * @return Whether the xml field is set. */ @@ -3158,6 +3986,10 @@ public final class Wcf { return msgCase_ == 9; } /** + *
+       * XML参数结构
+       * 
+ * * .wcf.XmlMsg xml = 9; * @return The xml. */ @@ -3176,6 +4008,10 @@ public final class Wcf { } } /** + *
+       * XML参数结构
+       * 
+ * * .wcf.XmlMsg xml = 9; */ public Builder setXml(com.iamteer.Wcf.XmlMsg value) { @@ -3192,6 +4028,10 @@ public final class Wcf { return this; } /** + *
+       * XML参数结构
+       * 
+ * * .wcf.XmlMsg xml = 9; */ public Builder setXml( @@ -3206,6 +4046,10 @@ public final class Wcf { return this; } /** + *
+       * XML参数结构
+       * 
+ * * .wcf.XmlMsg xml = 9; */ public Builder mergeXml(com.iamteer.Wcf.XmlMsg value) { @@ -3221,14 +4065,17 @@ public final class Wcf { } else { if (msgCase_ == 9) { xmlBuilder_.mergeFrom(value); - } else { - xmlBuilder_.setMessage(value); } + xmlBuilder_.setMessage(value); } msgCase_ = 9; return this; } /** + *
+       * XML参数结构
+       * 
+ * * .wcf.XmlMsg xml = 9; */ public Builder clearXml() { @@ -3248,12 +4095,20 @@ public final class Wcf { return this; } /** + *
+       * XML参数结构
+       * 
+ * * .wcf.XmlMsg xml = 9; */ public com.iamteer.Wcf.XmlMsg.Builder getXmlBuilder() { return getXmlFieldBuilder().getBuilder(); } /** + *
+       * XML参数结构
+       * 
+ * * .wcf.XmlMsg xml = 9; */ @java.lang.Override @@ -3268,6 +4123,10 @@ public final class Wcf { } } /** + *
+       * XML参数结构
+       * 
+ * * .wcf.XmlMsg xml = 9; */ private com.google.protobuf.SingleFieldBuilderV3< @@ -3285,13 +4144,17 @@ public final class Wcf { msg_ = null; } msgCase_ = 9; - onChanged(); + onChanged();; return xmlBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.iamteer.Wcf.DecPath, com.iamteer.Wcf.DecPath.Builder, com.iamteer.Wcf.DecPathOrBuilder> decBuilder_; /** + *
+       * 解密图片参数结构
+       * 
+ * * .wcf.DecPath dec = 10; * @return Whether the dec field is set. */ @@ -3300,6 +4163,10 @@ public final class Wcf { return msgCase_ == 10; } /** + *
+       * 解密图片参数结构
+       * 
+ * * .wcf.DecPath dec = 10; * @return The dec. */ @@ -3318,6 +4185,10 @@ public final class Wcf { } } /** + *
+       * 解密图片参数结构
+       * 
+ * * .wcf.DecPath dec = 10; */ public Builder setDec(com.iamteer.Wcf.DecPath value) { @@ -3334,6 +4205,10 @@ public final class Wcf { return this; } /** + *
+       * 解密图片参数结构
+       * 
+ * * .wcf.DecPath dec = 10; */ public Builder setDec( @@ -3348,6 +4223,10 @@ public final class Wcf { return this; } /** + *
+       * 解密图片参数结构
+       * 
+ * * .wcf.DecPath dec = 10; */ public Builder mergeDec(com.iamteer.Wcf.DecPath value) { @@ -3363,14 +4242,17 @@ public final class Wcf { } else { if (msgCase_ == 10) { decBuilder_.mergeFrom(value); - } else { - decBuilder_.setMessage(value); } + decBuilder_.setMessage(value); } msgCase_ = 10; return this; } /** + *
+       * 解密图片参数结构
+       * 
+ * * .wcf.DecPath dec = 10; */ public Builder clearDec() { @@ -3390,12 +4272,20 @@ public final class Wcf { return this; } /** + *
+       * 解密图片参数结构
+       * 
+ * * .wcf.DecPath dec = 10; */ public com.iamteer.Wcf.DecPath.Builder getDecBuilder() { return getDecFieldBuilder().getBuilder(); } /** + *
+       * 解密图片参数结构
+       * 
+ * * .wcf.DecPath dec = 10; */ @java.lang.Override @@ -3410,6 +4300,10 @@ public final class Wcf { } } /** + *
+       * 解密图片参数结构
+       * 
+ * * .wcf.DecPath dec = 10; */ private com.google.protobuf.SingleFieldBuilderV3< @@ -3427,13 +4321,17 @@ public final class Wcf { msg_ = null; } msgCase_ = 10; - onChanged(); + onChanged();; return decBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.iamteer.Wcf.Transfer, com.iamteer.Wcf.Transfer.Builder, com.iamteer.Wcf.TransferOrBuilder> tfBuilder_; /** + *
+       * 接收转账参数结构
+       * 
+ * * .wcf.Transfer tf = 11; * @return Whether the tf field is set. */ @@ -3442,6 +4340,10 @@ public final class Wcf { return msgCase_ == 11; } /** + *
+       * 接收转账参数结构
+       * 
+ * * .wcf.Transfer tf = 11; * @return The tf. */ @@ -3460,6 +4362,10 @@ public final class Wcf { } } /** + *
+       * 接收转账参数结构
+       * 
+ * * .wcf.Transfer tf = 11; */ public Builder setTf(com.iamteer.Wcf.Transfer value) { @@ -3476,6 +4382,10 @@ public final class Wcf { return this; } /** + *
+       * 接收转账参数结构
+       * 
+ * * .wcf.Transfer tf = 11; */ public Builder setTf( @@ -3490,6 +4400,10 @@ public final class Wcf { return this; } /** + *
+       * 接收转账参数结构
+       * 
+ * * .wcf.Transfer tf = 11; */ public Builder mergeTf(com.iamteer.Wcf.Transfer value) { @@ -3505,14 +4419,17 @@ public final class Wcf { } else { if (msgCase_ == 11) { tfBuilder_.mergeFrom(value); - } else { - tfBuilder_.setMessage(value); } + tfBuilder_.setMessage(value); } msgCase_ = 11; return this; } /** + *
+       * 接收转账参数结构
+       * 
+ * * .wcf.Transfer tf = 11; */ public Builder clearTf() { @@ -3532,12 +4449,20 @@ public final class Wcf { return this; } /** + *
+       * 接收转账参数结构
+       * 
+ * * .wcf.Transfer tf = 11; */ public com.iamteer.Wcf.Transfer.Builder getTfBuilder() { return getTfFieldBuilder().getBuilder(); } /** + *
+       * 接收转账参数结构
+       * 
+ * * .wcf.Transfer tf = 11; */ @java.lang.Override @@ -3552,6 +4477,10 @@ public final class Wcf { } } /** + *
+       * 接收转账参数结构
+       * 
+ * * .wcf.Transfer tf = 11; */ private com.google.protobuf.SingleFieldBuilderV3< @@ -3569,7 +4498,7 @@ public final class Wcf { msg_ = null; } msgCase_ = 11; - onChanged(); + onChanged();; return tfBuilder_; } @@ -3578,7 +4507,7 @@ public final class Wcf { * 64 位整数,通用 * * - * uint64 ui64 = 12; + * uint64 ui64 = 12 [jstype = JS_STRING]; * @return Whether the ui64 field is set. */ public boolean hasUi64() { @@ -3589,7 +4518,7 @@ public final class Wcf { * 64 位整数,通用 * * - * uint64 ui64 = 12; + * uint64 ui64 = 12 [jstype = JS_STRING]; * @return The ui64. */ public long getUi64() { @@ -3603,12 +4532,11 @@ public final class Wcf { * 64 位整数,通用 * * - * uint64 ui64 = 12; + * uint64 ui64 = 12 [jstype = JS_STRING]; * @param value The ui64 to set. * @return This builder for chaining. */ public Builder setUi64(long value) { - msgCase_ = 12; msg_ = value; onChanged(); @@ -3619,7 +4547,7 @@ public final class Wcf { * 64 位整数,通用 * * - * uint64 ui64 = 12; + * uint64 ui64 = 12 [jstype = JS_STRING]; * @return This builder for chaining. */ public Builder clearUi64() { @@ -3632,6 +4560,10 @@ public final class Wcf { } /** + *
+       * 布尔值
+       * 
+ * * bool flag = 13; * @return Whether the flag field is set. */ @@ -3639,6 +4571,10 @@ public final class Wcf { return msgCase_ == 13; } /** + *
+       * 布尔值
+       * 
+ * * bool flag = 13; * @return The flag. */ @@ -3649,18 +4585,25 @@ public final class Wcf { return false; } /** + *
+       * 布尔值
+       * 
+ * * bool flag = 13; * @param value The flag to set. * @return This builder for chaining. */ public Builder setFlag(boolean value) { - msgCase_ = 13; msg_ = value; onChanged(); return this; } /** + *
+       * 布尔值
+       * 
+ * * bool flag = 13; * @return This builder for chaining. */ @@ -3676,6 +4619,10 @@ public final class Wcf { private com.google.protobuf.SingleFieldBuilderV3< com.iamteer.Wcf.AttachMsg, com.iamteer.Wcf.AttachMsg.Builder, com.iamteer.Wcf.AttachMsgOrBuilder> attBuilder_; /** + *
+       * 下载图片、视频、文件参数结构
+       * 
+ * * .wcf.AttachMsg att = 14; * @return Whether the att field is set. */ @@ -3684,6 +4631,10 @@ public final class Wcf { return msgCase_ == 14; } /** + *
+       * 下载图片、视频、文件参数结构
+       * 
+ * * .wcf.AttachMsg att = 14; * @return The att. */ @@ -3702,6 +4653,10 @@ public final class Wcf { } } /** + *
+       * 下载图片、视频、文件参数结构
+       * 
+ * * .wcf.AttachMsg att = 14; */ public Builder setAtt(com.iamteer.Wcf.AttachMsg value) { @@ -3718,6 +4673,10 @@ public final class Wcf { return this; } /** + *
+       * 下载图片、视频、文件参数结构
+       * 
+ * * .wcf.AttachMsg att = 14; */ public Builder setAtt( @@ -3732,6 +4691,10 @@ public final class Wcf { return this; } /** + *
+       * 下载图片、视频、文件参数结构
+       * 
+ * * .wcf.AttachMsg att = 14; */ public Builder mergeAtt(com.iamteer.Wcf.AttachMsg value) { @@ -3747,14 +4710,17 @@ public final class Wcf { } else { if (msgCase_ == 14) { attBuilder_.mergeFrom(value); - } else { - attBuilder_.setMessage(value); } + attBuilder_.setMessage(value); } msgCase_ = 14; return this; } /** + *
+       * 下载图片、视频、文件参数结构
+       * 
+ * * .wcf.AttachMsg att = 14; */ public Builder clearAtt() { @@ -3774,12 +4740,20 @@ public final class Wcf { return this; } /** + *
+       * 下载图片、视频、文件参数结构
+       * 
+ * * .wcf.AttachMsg att = 14; */ public com.iamteer.Wcf.AttachMsg.Builder getAttBuilder() { return getAttFieldBuilder().getBuilder(); } /** + *
+       * 下载图片、视频、文件参数结构
+       * 
+ * * .wcf.AttachMsg att = 14; */ @java.lang.Override @@ -3794,6 +4768,10 @@ public final class Wcf { } } /** + *
+       * 下载图片、视频、文件参数结构
+       * 
+ * * .wcf.AttachMsg att = 14; */ private com.google.protobuf.SingleFieldBuilderV3< @@ -3811,13 +4789,17 @@ public final class Wcf { msg_ = null; } msgCase_ = 14; - onChanged(); + onChanged();; return attBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.iamteer.Wcf.AudioMsg, com.iamteer.Wcf.AudioMsg.Builder, com.iamteer.Wcf.AudioMsgOrBuilder> amBuilder_; /** + *
+       * 保存语音参数结构
+       * 
+ * * .wcf.AudioMsg am = 15; * @return Whether the am field is set. */ @@ -3826,6 +4808,10 @@ public final class Wcf { return msgCase_ == 15; } /** + *
+       * 保存语音参数结构
+       * 
+ * * .wcf.AudioMsg am = 15; * @return The am. */ @@ -3844,6 +4830,10 @@ public final class Wcf { } } /** + *
+       * 保存语音参数结构
+       * 
+ * * .wcf.AudioMsg am = 15; */ public Builder setAm(com.iamteer.Wcf.AudioMsg value) { @@ -3860,6 +4850,10 @@ public final class Wcf { return this; } /** + *
+       * 保存语音参数结构
+       * 
+ * * .wcf.AudioMsg am = 15; */ public Builder setAm( @@ -3874,6 +4868,10 @@ public final class Wcf { return this; } /** + *
+       * 保存语音参数结构
+       * 
+ * * .wcf.AudioMsg am = 15; */ public Builder mergeAm(com.iamteer.Wcf.AudioMsg value) { @@ -3889,14 +4887,17 @@ public final class Wcf { } else { if (msgCase_ == 15) { amBuilder_.mergeFrom(value); - } else { - amBuilder_.setMessage(value); } + amBuilder_.setMessage(value); } msgCase_ = 15; return this; } /** + *
+       * 保存语音参数结构
+       * 
+ * * .wcf.AudioMsg am = 15; */ public Builder clearAm() { @@ -3916,12 +4917,20 @@ public final class Wcf { return this; } /** + *
+       * 保存语音参数结构
+       * 
+ * * .wcf.AudioMsg am = 15; */ public com.iamteer.Wcf.AudioMsg.Builder getAmBuilder() { return getAmFieldBuilder().getBuilder(); } /** + *
+       * 保存语音参数结构
+       * 
+ * * .wcf.AudioMsg am = 15; */ @java.lang.Override @@ -3936,6 +4945,10 @@ public final class Wcf { } } /** + *
+       * 保存语音参数结构
+       * 
+ * * .wcf.AudioMsg am = 15; */ private com.google.protobuf.SingleFieldBuilderV3< @@ -3953,13 +4966,17 @@ public final class Wcf { msg_ = null; } msgCase_ = 15; - onChanged(); + onChanged();; return amBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.iamteer.Wcf.RichText, com.iamteer.Wcf.RichText.Builder, com.iamteer.Wcf.RichTextOrBuilder> rtBuilder_; /** + *
+       * 发送卡片消息结构
+       * 
+ * * .wcf.RichText rt = 16; * @return Whether the rt field is set. */ @@ -3968,6 +4985,10 @@ public final class Wcf { return msgCase_ == 16; } /** + *
+       * 发送卡片消息结构
+       * 
+ * * .wcf.RichText rt = 16; * @return The rt. */ @@ -3986,6 +5007,10 @@ public final class Wcf { } } /** + *
+       * 发送卡片消息结构
+       * 
+ * * .wcf.RichText rt = 16; */ public Builder setRt(com.iamteer.Wcf.RichText value) { @@ -4002,6 +5027,10 @@ public final class Wcf { return this; } /** + *
+       * 发送卡片消息结构
+       * 
+ * * .wcf.RichText rt = 16; */ public Builder setRt( @@ -4016,6 +5045,10 @@ public final class Wcf { return this; } /** + *
+       * 发送卡片消息结构
+       * 
+ * * .wcf.RichText rt = 16; */ public Builder mergeRt(com.iamteer.Wcf.RichText value) { @@ -4031,14 +5064,17 @@ public final class Wcf { } else { if (msgCase_ == 16) { rtBuilder_.mergeFrom(value); - } else { - rtBuilder_.setMessage(value); } + rtBuilder_.setMessage(value); } msgCase_ = 16; return this; } /** + *
+       * 发送卡片消息结构
+       * 
+ * * .wcf.RichText rt = 16; */ public Builder clearRt() { @@ -4058,12 +5094,20 @@ public final class Wcf { return this; } /** + *
+       * 发送卡片消息结构
+       * 
+ * * .wcf.RichText rt = 16; */ public com.iamteer.Wcf.RichText.Builder getRtBuilder() { return getRtFieldBuilder().getBuilder(); } /** + *
+       * 发送卡片消息结构
+       * 
+ * * .wcf.RichText rt = 16; */ @java.lang.Override @@ -4078,6 +5122,10 @@ public final class Wcf { } } /** + *
+       * 发送卡片消息结构
+       * 
+ * * .wcf.RichText rt = 16; */ private com.google.protobuf.SingleFieldBuilderV3< @@ -4095,13 +5143,17 @@ public final class Wcf { msg_ = null; } msgCase_ = 16; - onChanged(); + onChanged();; return rtBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.iamteer.Wcf.PatMsg, com.iamteer.Wcf.PatMsg.Builder, com.iamteer.Wcf.PatMsgOrBuilder> pmBuilder_; /** + *
+       * 发送拍一拍参数结构
+       * 
+ * * .wcf.PatMsg pm = 17; * @return Whether the pm field is set. */ @@ -4110,6 +5162,10 @@ public final class Wcf { return msgCase_ == 17; } /** + *
+       * 发送拍一拍参数结构
+       * 
+ * * .wcf.PatMsg pm = 17; * @return The pm. */ @@ -4128,6 +5184,10 @@ public final class Wcf { } } /** + *
+       * 发送拍一拍参数结构
+       * 
+ * * .wcf.PatMsg pm = 17; */ public Builder setPm(com.iamteer.Wcf.PatMsg value) { @@ -4144,6 +5204,10 @@ public final class Wcf { return this; } /** + *
+       * 发送拍一拍参数结构
+       * 
+ * * .wcf.PatMsg pm = 17; */ public Builder setPm( @@ -4158,6 +5222,10 @@ public final class Wcf { return this; } /** + *
+       * 发送拍一拍参数结构
+       * 
+ * * .wcf.PatMsg pm = 17; */ public Builder mergePm(com.iamteer.Wcf.PatMsg value) { @@ -4173,14 +5241,17 @@ public final class Wcf { } else { if (msgCase_ == 17) { pmBuilder_.mergeFrom(value); - } else { - pmBuilder_.setMessage(value); } + pmBuilder_.setMessage(value); } msgCase_ = 17; return this; } /** + *
+       * 发送拍一拍参数结构
+       * 
+ * * .wcf.PatMsg pm = 17; */ public Builder clearPm() { @@ -4200,12 +5271,20 @@ public final class Wcf { return this; } /** + *
+       * 发送拍一拍参数结构
+       * 
+ * * .wcf.PatMsg pm = 17; */ public com.iamteer.Wcf.PatMsg.Builder getPmBuilder() { return getPmFieldBuilder().getBuilder(); } /** + *
+       * 发送拍一拍参数结构
+       * 
+ * * .wcf.PatMsg pm = 17; */ @java.lang.Override @@ -4220,6 +5299,10 @@ public final class Wcf { } } /** + *
+       * 发送拍一拍参数结构
+       * 
+ * * .wcf.PatMsg pm = 17; */ private com.google.protobuf.SingleFieldBuilderV3< @@ -4237,9 +5320,186 @@ public final class Wcf { msg_ = null; } msgCase_ = 17; - onChanged(); + onChanged();; return pmBuilder_; } + + private com.google.protobuf.SingleFieldBuilderV3< + com.iamteer.Wcf.ForwardMsg, com.iamteer.Wcf.ForwardMsg.Builder, com.iamteer.Wcf.ForwardMsgOrBuilder> fmBuilder_; + /** + *
+       * 转发消息参数结构
+       * 
+ * + * .wcf.ForwardMsg fm = 18; + * @return Whether the fm field is set. + */ + @java.lang.Override + public boolean hasFm() { + return msgCase_ == 18; + } + /** + *
+       * 转发消息参数结构
+       * 
+ * + * .wcf.ForwardMsg fm = 18; + * @return The fm. + */ + @java.lang.Override + public com.iamteer.Wcf.ForwardMsg getFm() { + if (fmBuilder_ == null) { + if (msgCase_ == 18) { + return (com.iamteer.Wcf.ForwardMsg) msg_; + } + return com.iamteer.Wcf.ForwardMsg.getDefaultInstance(); + } else { + if (msgCase_ == 18) { + return fmBuilder_.getMessage(); + } + return com.iamteer.Wcf.ForwardMsg.getDefaultInstance(); + } + } + /** + *
+       * 转发消息参数结构
+       * 
+ * + * .wcf.ForwardMsg fm = 18; + */ + public Builder setFm(com.iamteer.Wcf.ForwardMsg value) { + if (fmBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + msg_ = value; + onChanged(); + } else { + fmBuilder_.setMessage(value); + } + msgCase_ = 18; + return this; + } + /** + *
+       * 转发消息参数结构
+       * 
+ * + * .wcf.ForwardMsg fm = 18; + */ + public Builder setFm( + com.iamteer.Wcf.ForwardMsg.Builder builderForValue) { + if (fmBuilder_ == null) { + msg_ = builderForValue.build(); + onChanged(); + } else { + fmBuilder_.setMessage(builderForValue.build()); + } + msgCase_ = 18; + return this; + } + /** + *
+       * 转发消息参数结构
+       * 
+ * + * .wcf.ForwardMsg fm = 18; + */ + public Builder mergeFm(com.iamteer.Wcf.ForwardMsg value) { + if (fmBuilder_ == null) { + if (msgCase_ == 18 && + msg_ != com.iamteer.Wcf.ForwardMsg.getDefaultInstance()) { + msg_ = com.iamteer.Wcf.ForwardMsg.newBuilder((com.iamteer.Wcf.ForwardMsg) msg_) + .mergeFrom(value).buildPartial(); + } else { + msg_ = value; + } + onChanged(); + } else { + if (msgCase_ == 18) { + fmBuilder_.mergeFrom(value); + } + fmBuilder_.setMessage(value); + } + msgCase_ = 18; + return this; + } + /** + *
+       * 转发消息参数结构
+       * 
+ * + * .wcf.ForwardMsg fm = 18; + */ + public Builder clearFm() { + if (fmBuilder_ == null) { + if (msgCase_ == 18) { + msgCase_ = 0; + msg_ = null; + onChanged(); + } + } else { + if (msgCase_ == 18) { + msgCase_ = 0; + msg_ = null; + } + fmBuilder_.clear(); + } + return this; + } + /** + *
+       * 转发消息参数结构
+       * 
+ * + * .wcf.ForwardMsg fm = 18; + */ + public com.iamteer.Wcf.ForwardMsg.Builder getFmBuilder() { + return getFmFieldBuilder().getBuilder(); + } + /** + *
+       * 转发消息参数结构
+       * 
+ * + * .wcf.ForwardMsg fm = 18; + */ + @java.lang.Override + public com.iamteer.Wcf.ForwardMsgOrBuilder getFmOrBuilder() { + if ((msgCase_ == 18) && (fmBuilder_ != null)) { + return fmBuilder_.getMessageOrBuilder(); + } else { + if (msgCase_ == 18) { + return (com.iamteer.Wcf.ForwardMsg) msg_; + } + return com.iamteer.Wcf.ForwardMsg.getDefaultInstance(); + } + } + /** + *
+       * 转发消息参数结构
+       * 
+ * + * .wcf.ForwardMsg fm = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.iamteer.Wcf.ForwardMsg, com.iamteer.Wcf.ForwardMsg.Builder, com.iamteer.Wcf.ForwardMsgOrBuilder> + getFmFieldBuilder() { + if (fmBuilder_ == null) { + if (!(msgCase_ == 18)) { + msg_ = com.iamteer.Wcf.ForwardMsg.getDefaultInstance(); + } + fmBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.iamteer.Wcf.ForwardMsg, com.iamteer.Wcf.ForwardMsg.Builder, com.iamteer.Wcf.ForwardMsgOrBuilder>( + (com.iamteer.Wcf.ForwardMsg) msg_, + getParentForChildren(), + isClean()); + msg_ = null; + } + msgCase_ = 18; + onChanged();; + return fmBuilder_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -4273,18 +5533,7 @@ public final class Wcf { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new Request(input, extensionRegistry); } }; @@ -4556,7 +5805,34 @@ public final class Wcf { */ com.iamteer.Wcf.UserInfoOrBuilder getUiOrBuilder(); - com.iamteer.Wcf.Response.MsgCase getMsgCase(); + /** + *
+     * OCR 结果
+     * 
+ * + * .wcf.OcrMsg ocr = 11; + * @return Whether the ocr field is set. + */ + boolean hasOcr(); + /** + *
+     * OCR 结果
+     * 
+ * + * .wcf.OcrMsg ocr = 11; + * @return The ocr. + */ + com.iamteer.Wcf.OcrMsg getOcr(); + /** + *
+     * OCR 结果
+     * 
+ * + * .wcf.OcrMsg ocr = 11; + */ + com.iamteer.Wcf.OcrMsgOrBuilder getOcrOrBuilder(); + + public com.iamteer.Wcf.Response.MsgCase getMsgCase(); } /** * Protobuf type {@code wcf.Response} @@ -4581,6 +5857,177 @@ public final class Wcf { return new Response(); } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Response( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + func_ = rawValue; + break; + } + case 16: { + msg_ = input.readInt32(); + msgCase_ = 2; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + msgCase_ = 3; + msg_ = s; + break; + } + case 34: { + com.iamteer.Wcf.WxMsg.Builder subBuilder = null; + if (msgCase_ == 4) { + subBuilder = ((com.iamteer.Wcf.WxMsg) msg_).toBuilder(); + } + msg_ = + input.readMessage(com.iamteer.Wcf.WxMsg.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.iamteer.Wcf.WxMsg) msg_); + msg_ = subBuilder.buildPartial(); + } + msgCase_ = 4; + break; + } + case 42: { + com.iamteer.Wcf.MsgTypes.Builder subBuilder = null; + if (msgCase_ == 5) { + subBuilder = ((com.iamteer.Wcf.MsgTypes) msg_).toBuilder(); + } + msg_ = + input.readMessage(com.iamteer.Wcf.MsgTypes.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.iamteer.Wcf.MsgTypes) msg_); + msg_ = subBuilder.buildPartial(); + } + msgCase_ = 5; + break; + } + case 50: { + com.iamteer.Wcf.RpcContacts.Builder subBuilder = null; + if (msgCase_ == 6) { + subBuilder = ((com.iamteer.Wcf.RpcContacts) msg_).toBuilder(); + } + msg_ = + input.readMessage(com.iamteer.Wcf.RpcContacts.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.iamteer.Wcf.RpcContacts) msg_); + msg_ = subBuilder.buildPartial(); + } + msgCase_ = 6; + break; + } + case 58: { + com.iamteer.Wcf.DbNames.Builder subBuilder = null; + if (msgCase_ == 7) { + subBuilder = ((com.iamteer.Wcf.DbNames) msg_).toBuilder(); + } + msg_ = + input.readMessage(com.iamteer.Wcf.DbNames.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.iamteer.Wcf.DbNames) msg_); + msg_ = subBuilder.buildPartial(); + } + msgCase_ = 7; + break; + } + case 66: { + com.iamteer.Wcf.DbTables.Builder subBuilder = null; + if (msgCase_ == 8) { + subBuilder = ((com.iamteer.Wcf.DbTables) msg_).toBuilder(); + } + msg_ = + input.readMessage(com.iamteer.Wcf.DbTables.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.iamteer.Wcf.DbTables) msg_); + msg_ = subBuilder.buildPartial(); + } + msgCase_ = 8; + break; + } + case 74: { + com.iamteer.Wcf.DbRows.Builder subBuilder = null; + if (msgCase_ == 9) { + subBuilder = ((com.iamteer.Wcf.DbRows) msg_).toBuilder(); + } + msg_ = + input.readMessage(com.iamteer.Wcf.DbRows.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.iamteer.Wcf.DbRows) msg_); + msg_ = subBuilder.buildPartial(); + } + msgCase_ = 9; + break; + } + case 82: { + com.iamteer.Wcf.UserInfo.Builder subBuilder = null; + if (msgCase_ == 10) { + subBuilder = ((com.iamteer.Wcf.UserInfo) msg_).toBuilder(); + } + msg_ = + input.readMessage(com.iamteer.Wcf.UserInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.iamteer.Wcf.UserInfo) msg_); + msg_ = subBuilder.buildPartial(); + } + msgCase_ = 10; + break; + } + case 90: { + com.iamteer.Wcf.OcrMsg.Builder subBuilder = null; + if (msgCase_ == 11) { + subBuilder = ((com.iamteer.Wcf.OcrMsg) msg_).toBuilder(); + } + msg_ = + input.readMessage(com.iamteer.Wcf.OcrMsg.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.iamteer.Wcf.OcrMsg) msg_); + msg_ = subBuilder.buildPartial(); + } + msgCase_ = 11; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.iamteer.Wcf.internal_static_wcf_Response_descriptor; @@ -4595,7 +6042,6 @@ public final class Wcf { } private int msgCase_ = 0; - @SuppressWarnings("serial") private java.lang.Object msg_; public enum MsgCase implements com.google.protobuf.Internal.EnumLite, @@ -4609,6 +6055,7 @@ public final class Wcf { TABLES(8), ROWS(9), UI(10), + OCR(11), MSG_NOT_SET(0); private final int value; private MsgCase(int value) { @@ -4635,6 +6082,7 @@ public final class Wcf { case 8: return TABLES; case 9: return ROWS; case 10: return UI; + case 11: return OCR; case 0: return MSG_NOT_SET; default: return null; } @@ -4651,7 +6099,7 @@ public final class Wcf { } public static final int FUNC_FIELD_NUMBER = 1; - private int func_ = 0; + private int func_; /** * .wcf.Functions func = 1; * @return The enum numeric value on the wire for func. @@ -4664,7 +6112,8 @@ public final class Wcf { * @return The func. */ @java.lang.Override public com.iamteer.Wcf.Functions getFunc() { - com.iamteer.Wcf.Functions result = com.iamteer.Wcf.Functions.forNumber(func_); + @SuppressWarnings("deprecation") + com.iamteer.Wcf.Functions result = com.iamteer.Wcf.Functions.valueOf(func_); return result == null ? com.iamteer.Wcf.Functions.UNRECOGNIZED : result; } @@ -5062,6 +6511,49 @@ public final class Wcf { return com.iamteer.Wcf.UserInfo.getDefaultInstance(); } + public static final int OCR_FIELD_NUMBER = 11; + /** + *
+     * OCR 结果
+     * 
+ * + * .wcf.OcrMsg ocr = 11; + * @return Whether the ocr field is set. + */ + @java.lang.Override + public boolean hasOcr() { + return msgCase_ == 11; + } + /** + *
+     * OCR 结果
+     * 
+ * + * .wcf.OcrMsg ocr = 11; + * @return The ocr. + */ + @java.lang.Override + public com.iamteer.Wcf.OcrMsg getOcr() { + if (msgCase_ == 11) { + return (com.iamteer.Wcf.OcrMsg) msg_; + } + return com.iamteer.Wcf.OcrMsg.getDefaultInstance(); + } + /** + *
+     * OCR 结果
+     * 
+ * + * .wcf.OcrMsg ocr = 11; + */ + @java.lang.Override + public com.iamteer.Wcf.OcrMsgOrBuilder getOcrOrBuilder() { + if (msgCase_ == 11) { + return (com.iamteer.Wcf.OcrMsg) msg_; + } + return com.iamteer.Wcf.OcrMsg.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -5107,7 +6599,10 @@ public final class Wcf { if (msgCase_ == 10) { output.writeMessage(10, (com.iamteer.Wcf.UserInfo) msg_); } - getUnknownFields().writeTo(output); + if (msgCase_ == 11) { + output.writeMessage(11, (com.iamteer.Wcf.OcrMsg) msg_); + } + unknownFields.writeTo(output); } @java.lang.Override @@ -5156,7 +6651,11 @@ public final class Wcf { size += com.google.protobuf.CodedOutputStream .computeMessageSize(10, (com.iamteer.Wcf.UserInfo) msg_); } - size += getUnknownFields().getSerializedSize(); + if (msgCase_ == 11) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, (com.iamteer.Wcf.OcrMsg) msg_); + } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @@ -5210,10 +6709,14 @@ public final class Wcf { if (!getUi() .equals(other.getUi())) return false; break; + case 11: + if (!getOcr() + .equals(other.getOcr())) return false; + break; case 0: default: } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -5263,10 +6766,14 @@ public final class Wcf { hash = (37 * hash) + UI_FIELD_NUMBER; hash = (53 * hash) + getUi().hashCode(); break; + case 11: + hash = (37 * hash) + OCR_FIELD_NUMBER; + hash = (53 * hash) + getOcr().hashCode(); + break; case 0: default: } - hash = (29 * hash) + getUnknownFields().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } @@ -5383,40 +6890,24 @@ public final class Wcf { // Construct using com.iamteer.Wcf.Response.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } } @java.lang.Override public Builder clear() { super.clear(); - bitField0_ = 0; func_ = 0; - if (wxmsgBuilder_ != null) { - wxmsgBuilder_.clear(); - } - if (typesBuilder_ != null) { - typesBuilder_.clear(); - } - if (contactsBuilder_ != null) { - contactsBuilder_.clear(); - } - if (dbsBuilder_ != null) { - dbsBuilder_.clear(); - } - if (tablesBuilder_ != null) { - tablesBuilder_.clear(); - } - if (rowsBuilder_ != null) { - rowsBuilder_.clear(); - } - if (uiBuilder_ != null) { - uiBuilder_.clear(); - } + msgCase_ = 0; msg_ = null; return this; @@ -5445,52 +6936,106 @@ public final class Wcf { @java.lang.Override public com.iamteer.Wcf.Response buildPartial() { com.iamteer.Wcf.Response result = new com.iamteer.Wcf.Response(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); + result.func_ = func_; + if (msgCase_ == 2) { + result.msg_ = msg_; + } + if (msgCase_ == 3) { + result.msg_ = msg_; + } + if (msgCase_ == 4) { + if (wxmsgBuilder_ == null) { + result.msg_ = msg_; + } else { + result.msg_ = wxmsgBuilder_.build(); + } + } + if (msgCase_ == 5) { + if (typesBuilder_ == null) { + result.msg_ = msg_; + } else { + result.msg_ = typesBuilder_.build(); + } + } + if (msgCase_ == 6) { + if (contactsBuilder_ == null) { + result.msg_ = msg_; + } else { + result.msg_ = contactsBuilder_.build(); + } + } + if (msgCase_ == 7) { + if (dbsBuilder_ == null) { + result.msg_ = msg_; + } else { + result.msg_ = dbsBuilder_.build(); + } + } + if (msgCase_ == 8) { + if (tablesBuilder_ == null) { + result.msg_ = msg_; + } else { + result.msg_ = tablesBuilder_.build(); + } + } + if (msgCase_ == 9) { + if (rowsBuilder_ == null) { + result.msg_ = msg_; + } else { + result.msg_ = rowsBuilder_.build(); + } + } + if (msgCase_ == 10) { + if (uiBuilder_ == null) { + result.msg_ = msg_; + } else { + result.msg_ = uiBuilder_.build(); + } + } + if (msgCase_ == 11) { + if (ocrBuilder_ == null) { + result.msg_ = msg_; + } else { + result.msg_ = ocrBuilder_.build(); + } + } + result.msgCase_ = msgCase_; onBuilt(); return result; } - private void buildPartial0(com.iamteer.Wcf.Response result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.func_ = func_; - } + @java.lang.Override + public Builder clone() { + return super.clone(); } - - private void buildPartialOneofs(com.iamteer.Wcf.Response result) { - result.msgCase_ = msgCase_; - result.msg_ = this.msg_; - if (msgCase_ == 4 && - wxmsgBuilder_ != null) { - result.msg_ = wxmsgBuilder_.build(); - } - if (msgCase_ == 5 && - typesBuilder_ != null) { - result.msg_ = typesBuilder_.build(); - } - if (msgCase_ == 6 && - contactsBuilder_ != null) { - result.msg_ = contactsBuilder_.build(); - } - if (msgCase_ == 7 && - dbsBuilder_ != null) { - result.msg_ = dbsBuilder_.build(); - } - if (msgCase_ == 8 && - tablesBuilder_ != null) { - result.msg_ = tablesBuilder_.build(); - } - if (msgCase_ == 9 && - rowsBuilder_ != null) { - result.msg_ = rowsBuilder_.build(); - } - if (msgCase_ == 10 && - uiBuilder_ != null) { - result.msg_ = uiBuilder_.build(); - } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.iamteer.Wcf.Response) { @@ -5545,11 +7090,15 @@ public final class Wcf { mergeUi(other.getUi()); break; } + case OCR: { + mergeOcr(other.getOcr()); + break; + } case MSG_NOT_SET: { break; } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -5564,95 +7113,17 @@ public final class Wcf { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } + com.iamteer.Wcf.Response parsedMessage = null; try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - func_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - msg_ = input.readInt32(); - msgCase_ = 2; - break; - } // case 16 - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - msgCase_ = 3; - msg_ = s; - break; - } // case 26 - case 34: { - input.readMessage( - getWxmsgFieldBuilder().getBuilder(), - extensionRegistry); - msgCase_ = 4; - break; - } // case 34 - case 42: { - input.readMessage( - getTypesFieldBuilder().getBuilder(), - extensionRegistry); - msgCase_ = 5; - break; - } // case 42 - case 50: { - input.readMessage( - getContactsFieldBuilder().getBuilder(), - extensionRegistry); - msgCase_ = 6; - break; - } // case 50 - case 58: { - input.readMessage( - getDbsFieldBuilder().getBuilder(), - extensionRegistry); - msgCase_ = 7; - break; - } // case 58 - case 66: { - input.readMessage( - getTablesFieldBuilder().getBuilder(), - extensionRegistry); - msgCase_ = 8; - break; - } // case 66 - case 74: { - input.readMessage( - getRowsFieldBuilder().getBuilder(), - extensionRegistry); - msgCase_ = 9; - break; - } // case 74 - case 82: { - input.readMessage( - getUiFieldBuilder().getBuilder(), - extensionRegistry); - msgCase_ = 10; - break; - } // case 82 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.iamteer.Wcf.Response) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - onChanged(); - } // finally + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } return this; } private int msgCase_ = 0; @@ -5670,7 +7141,6 @@ public final class Wcf { return this; } - private int bitField0_; private int func_ = 0; /** @@ -5686,8 +7156,8 @@ public final class Wcf { * @return This builder for chaining. */ public Builder setFuncValue(int value) { + func_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } @@ -5697,7 +7167,8 @@ public final class Wcf { */ @java.lang.Override public com.iamteer.Wcf.Functions getFunc() { - com.iamteer.Wcf.Functions result = com.iamteer.Wcf.Functions.forNumber(func_); + @SuppressWarnings("deprecation") + com.iamteer.Wcf.Functions result = com.iamteer.Wcf.Functions.valueOf(func_); return result == null ? com.iamteer.Wcf.Functions.UNRECOGNIZED : result; } /** @@ -5709,7 +7180,7 @@ public final class Wcf { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; + func_ = value.getNumber(); onChanged(); return this; @@ -5719,7 +7190,7 @@ public final class Wcf { * @return This builder for chaining. */ public Builder clearFunc() { - bitField0_ = (bitField0_ & ~0x00000001); + func_ = 0; onChanged(); return this; @@ -5760,7 +7231,6 @@ public final class Wcf { * @return This builder for chaining. */ public Builder setStatus(int value) { - msgCase_ = 2; msg_ = value; onChanged(); @@ -5859,8 +7329,10 @@ public final class Wcf { */ public Builder setStr( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - msgCase_ = 3; + if (value == null) { + throw new NullPointerException(); + } + msgCase_ = 3; msg_ = value; onChanged(); return this; @@ -5892,8 +7364,10 @@ public final class Wcf { */ public Builder setStrBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); msgCase_ = 3; msg_ = value; onChanged(); @@ -5994,9 +7468,8 @@ public final class Wcf { } else { if (msgCase_ == 4) { wxmsgBuilder_.mergeFrom(value); - } else { - wxmsgBuilder_.setMessage(value); } + wxmsgBuilder_.setMessage(value); } msgCase_ = 4; return this; @@ -6074,7 +7547,7 @@ public final class Wcf { msg_ = null; } msgCase_ = 4; - onChanged(); + onChanged();; return wxmsgBuilder_; } @@ -6172,9 +7645,8 @@ public final class Wcf { } else { if (msgCase_ == 5) { typesBuilder_.mergeFrom(value); - } else { - typesBuilder_.setMessage(value); } + typesBuilder_.setMessage(value); } msgCase_ = 5; return this; @@ -6252,7 +7724,7 @@ public final class Wcf { msg_ = null; } msgCase_ = 5; - onChanged(); + onChanged();; return typesBuilder_; } @@ -6350,9 +7822,8 @@ public final class Wcf { } else { if (msgCase_ == 6) { contactsBuilder_.mergeFrom(value); - } else { - contactsBuilder_.setMessage(value); } + contactsBuilder_.setMessage(value); } msgCase_ = 6; return this; @@ -6430,7 +7901,7 @@ public final class Wcf { msg_ = null; } msgCase_ = 6; - onChanged(); + onChanged();; return contactsBuilder_; } @@ -6528,9 +7999,8 @@ public final class Wcf { } else { if (msgCase_ == 7) { dbsBuilder_.mergeFrom(value); - } else { - dbsBuilder_.setMessage(value); } + dbsBuilder_.setMessage(value); } msgCase_ = 7; return this; @@ -6608,7 +8078,7 @@ public final class Wcf { msg_ = null; } msgCase_ = 7; - onChanged(); + onChanged();; return dbsBuilder_; } @@ -6706,9 +8176,8 @@ public final class Wcf { } else { if (msgCase_ == 8) { tablesBuilder_.mergeFrom(value); - } else { - tablesBuilder_.setMessage(value); } + tablesBuilder_.setMessage(value); } msgCase_ = 8; return this; @@ -6786,7 +8255,7 @@ public final class Wcf { msg_ = null; } msgCase_ = 8; - onChanged(); + onChanged();; return tablesBuilder_; } @@ -6884,9 +8353,8 @@ public final class Wcf { } else { if (msgCase_ == 9) { rowsBuilder_.mergeFrom(value); - } else { - rowsBuilder_.setMessage(value); } + rowsBuilder_.setMessage(value); } msgCase_ = 9; return this; @@ -6964,7 +8432,7 @@ public final class Wcf { msg_ = null; } msgCase_ = 9; - onChanged(); + onChanged();; return rowsBuilder_; } @@ -7062,9 +8530,8 @@ public final class Wcf { } else { if (msgCase_ == 10) { uiBuilder_.mergeFrom(value); - } else { - uiBuilder_.setMessage(value); } + uiBuilder_.setMessage(value); } msgCase_ = 10; return this; @@ -7142,9 +8609,186 @@ public final class Wcf { msg_ = null; } msgCase_ = 10; - onChanged(); + onChanged();; return uiBuilder_; } + + private com.google.protobuf.SingleFieldBuilderV3< + com.iamteer.Wcf.OcrMsg, com.iamteer.Wcf.OcrMsg.Builder, com.iamteer.Wcf.OcrMsgOrBuilder> ocrBuilder_; + /** + *
+       * OCR 结果
+       * 
+ * + * .wcf.OcrMsg ocr = 11; + * @return Whether the ocr field is set. + */ + @java.lang.Override + public boolean hasOcr() { + return msgCase_ == 11; + } + /** + *
+       * OCR 结果
+       * 
+ * + * .wcf.OcrMsg ocr = 11; + * @return The ocr. + */ + @java.lang.Override + public com.iamteer.Wcf.OcrMsg getOcr() { + if (ocrBuilder_ == null) { + if (msgCase_ == 11) { + return (com.iamteer.Wcf.OcrMsg) msg_; + } + return com.iamteer.Wcf.OcrMsg.getDefaultInstance(); + } else { + if (msgCase_ == 11) { + return ocrBuilder_.getMessage(); + } + return com.iamteer.Wcf.OcrMsg.getDefaultInstance(); + } + } + /** + *
+       * OCR 结果
+       * 
+ * + * .wcf.OcrMsg ocr = 11; + */ + public Builder setOcr(com.iamteer.Wcf.OcrMsg value) { + if (ocrBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + msg_ = value; + onChanged(); + } else { + ocrBuilder_.setMessage(value); + } + msgCase_ = 11; + return this; + } + /** + *
+       * OCR 结果
+       * 
+ * + * .wcf.OcrMsg ocr = 11; + */ + public Builder setOcr( + com.iamteer.Wcf.OcrMsg.Builder builderForValue) { + if (ocrBuilder_ == null) { + msg_ = builderForValue.build(); + onChanged(); + } else { + ocrBuilder_.setMessage(builderForValue.build()); + } + msgCase_ = 11; + return this; + } + /** + *
+       * OCR 结果
+       * 
+ * + * .wcf.OcrMsg ocr = 11; + */ + public Builder mergeOcr(com.iamteer.Wcf.OcrMsg value) { + if (ocrBuilder_ == null) { + if (msgCase_ == 11 && + msg_ != com.iamteer.Wcf.OcrMsg.getDefaultInstance()) { + msg_ = com.iamteer.Wcf.OcrMsg.newBuilder((com.iamteer.Wcf.OcrMsg) msg_) + .mergeFrom(value).buildPartial(); + } else { + msg_ = value; + } + onChanged(); + } else { + if (msgCase_ == 11) { + ocrBuilder_.mergeFrom(value); + } + ocrBuilder_.setMessage(value); + } + msgCase_ = 11; + return this; + } + /** + *
+       * OCR 结果
+       * 
+ * + * .wcf.OcrMsg ocr = 11; + */ + public Builder clearOcr() { + if (ocrBuilder_ == null) { + if (msgCase_ == 11) { + msgCase_ = 0; + msg_ = null; + onChanged(); + } + } else { + if (msgCase_ == 11) { + msgCase_ = 0; + msg_ = null; + } + ocrBuilder_.clear(); + } + return this; + } + /** + *
+       * OCR 结果
+       * 
+ * + * .wcf.OcrMsg ocr = 11; + */ + public com.iamteer.Wcf.OcrMsg.Builder getOcrBuilder() { + return getOcrFieldBuilder().getBuilder(); + } + /** + *
+       * OCR 结果
+       * 
+ * + * .wcf.OcrMsg ocr = 11; + */ + @java.lang.Override + public com.iamteer.Wcf.OcrMsgOrBuilder getOcrOrBuilder() { + if ((msgCase_ == 11) && (ocrBuilder_ != null)) { + return ocrBuilder_.getMessageOrBuilder(); + } else { + if (msgCase_ == 11) { + return (com.iamteer.Wcf.OcrMsg) msg_; + } + return com.iamteer.Wcf.OcrMsg.getDefaultInstance(); + } + } + /** + *
+       * OCR 结果
+       * 
+ * + * .wcf.OcrMsg ocr = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.iamteer.Wcf.OcrMsg, com.iamteer.Wcf.OcrMsg.Builder, com.iamteer.Wcf.OcrMsgOrBuilder> + getOcrFieldBuilder() { + if (ocrBuilder_ == null) { + if (!(msgCase_ == 11)) { + msg_ = com.iamteer.Wcf.OcrMsg.getDefaultInstance(); + } + ocrBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.iamteer.Wcf.OcrMsg, com.iamteer.Wcf.OcrMsg.Builder, com.iamteer.Wcf.OcrMsgOrBuilder>( + (com.iamteer.Wcf.OcrMsg) msg_, + getParentForChildren(), + isClean()); + msg_ = null; + } + msgCase_ = 11; + onChanged();; + return ocrBuilder_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -7178,18 +8822,7 @@ public final class Wcf { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new Response(input, extensionRegistry); } }; @@ -7235,6 +8868,48 @@ public final class Wcf { return new Empty(); } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Empty( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.iamteer.Wcf.internal_static_wcf_Empty_descriptor; @@ -7262,7 +8937,7 @@ public final class Wcf { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } @java.lang.Override @@ -7271,7 +8946,7 @@ public final class Wcf { if (size != -1) return size; size = 0; - size += getUnknownFields().getSerializedSize(); + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @@ -7286,7 +8961,7 @@ public final class Wcf { } com.iamteer.Wcf.Empty other = (com.iamteer.Wcf.Empty) obj; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -7297,7 +8972,7 @@ public final class Wcf { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } @@ -7414,13 +9089,18 @@ public final class Wcf { // Construct using com.iamteer.Wcf.Empty.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } } @java.lang.Override public Builder clear() { @@ -7455,6 +9135,38 @@ public final class Wcf { return result; } + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.iamteer.Wcf.Empty) { @@ -7467,7 +9179,7 @@ public final class Wcf { public Builder mergeFrom(com.iamteer.Wcf.Empty other) { if (other == com.iamteer.Wcf.Empty.getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -7482,30 +9194,17 @@ public final class Wcf { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } + com.iamteer.Wcf.Empty parsedMessage = null; try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.iamteer.Wcf.Empty) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - onChanged(); - } // finally + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } return this; } @java.lang.Override @@ -7541,18 +9240,7 @@ public final class Wcf { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new Empty(input, extensionRegistry); } }; @@ -7601,7 +9289,7 @@ public final class Wcf { * 消息 id * * - * uint64 id = 3; + * uint64 id = 3 [jstype = JS_STRING]; * @return The id. */ long getId(); @@ -7795,6 +9483,115 @@ public final class Wcf { return new WxMsg(); } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WxMsg( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + isSelf_ = input.readBool(); + break; + } + case 16: { + + isGroup_ = input.readBool(); + break; + } + case 24: { + + id_ = input.readUInt64(); + break; + } + case 32: { + + type_ = input.readUInt32(); + break; + } + case 40: { + + ts_ = input.readUInt32(); + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + roomid_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + content_ = s; + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + sender_ = s; + break; + } + case 74: { + java.lang.String s = input.readStringRequireUtf8(); + + sign_ = s; + break; + } + case 82: { + java.lang.String s = input.readStringRequireUtf8(); + + thumb_ = s; + break; + } + case 90: { + java.lang.String s = input.readStringRequireUtf8(); + + extra_ = s; + break; + } + case 98: { + java.lang.String s = input.readStringRequireUtf8(); + + xml_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.iamteer.Wcf.internal_static_wcf_WxMsg_descriptor; @@ -7809,7 +9606,7 @@ public final class Wcf { } public static final int IS_SELF_FIELD_NUMBER = 1; - private boolean isSelf_ = false; + private boolean isSelf_; /** *
      * 是否自己发送的
@@ -7824,7 +9621,7 @@ public final class Wcf {
     }
 
     public static final int IS_GROUP_FIELD_NUMBER = 2;
-    private boolean isGroup_ = false;
+    private boolean isGroup_;
     /**
      * 
      * 是否群消息
@@ -7839,13 +9636,13 @@ public final class Wcf {
     }
 
     public static final int ID_FIELD_NUMBER = 3;
-    private long id_ = 0L;
+    private long id_;
     /**
      * 
      * 消息 id
      * 
* - * uint64 id = 3; + * uint64 id = 3 [jstype = JS_STRING]; * @return The id. */ @java.lang.Override @@ -7854,7 +9651,7 @@ public final class Wcf { } public static final int TYPE_FIELD_NUMBER = 4; - private int type_ = 0; + private int type_; /** *
      * 消息类型
@@ -7869,7 +9666,7 @@ public final class Wcf {
     }
 
     public static final int TS_FIELD_NUMBER = 5;
-    private int ts_ = 0;
+    private int ts_;
     /**
      * 
      * 消息类型
@@ -7884,8 +9681,7 @@ public final class Wcf {
     }
 
     public static final int ROOMID_FIELD_NUMBER = 6;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object roomid_ = "";
+    private volatile java.lang.Object roomid_;
     /**
      * 
      * 群 id(如果是群消息的话)
@@ -7931,8 +9727,7 @@ public final class Wcf {
     }
 
     public static final int CONTENT_FIELD_NUMBER = 7;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object content_ = "";
+    private volatile java.lang.Object content_;
     /**
      * 
      * 消息内容
@@ -7978,8 +9773,7 @@ public final class Wcf {
     }
 
     public static final int SENDER_FIELD_NUMBER = 8;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object sender_ = "";
+    private volatile java.lang.Object sender_;
     /**
      * 
      * 消息发送者
@@ -8025,8 +9819,7 @@ public final class Wcf {
     }
 
     public static final int SIGN_FIELD_NUMBER = 9;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object sign_ = "";
+    private volatile java.lang.Object sign_;
     /**
      * 
      * Sign
@@ -8072,8 +9865,7 @@ public final class Wcf {
     }
 
     public static final int THUMB_FIELD_NUMBER = 10;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object thumb_ = "";
+    private volatile java.lang.Object thumb_;
     /**
      * 
      * 缩略图
@@ -8119,8 +9911,7 @@ public final class Wcf {
     }
 
     public static final int EXTRA_FIELD_NUMBER = 11;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object extra_ = "";
+    private volatile java.lang.Object extra_;
     /**
      * 
      * 附加内容
@@ -8166,8 +9957,7 @@ public final class Wcf {
     }
 
     public static final int XML_FIELD_NUMBER = 12;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object xml_ = "";
+    private volatile java.lang.Object xml_;
     /**
      * 
      * 消息 xml
@@ -8262,7 +10052,7 @@ public final class Wcf {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xml_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 12, xml_);
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -8312,7 +10102,7 @@ public final class Wcf {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xml_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, xml_);
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -8351,7 +10141,7 @@ public final class Wcf {
           .equals(other.getExtra())) return false;
       if (!getXml()
           .equals(other.getXml())) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -8389,7 +10179,7 @@ public final class Wcf {
       hash = (53 * hash) + getExtra().hashCode();
       hash = (37 * hash) + XML_FIELD_NUMBER;
       hash = (53 * hash) + getXml().hashCode();
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -8506,30 +10296,46 @@ public final class Wcf {
 
       // Construct using com.iamteer.Wcf.WxMsg.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         isSelf_ = false;
+
         isGroup_ = false;
+
         id_ = 0L;
+
         type_ = 0;
+
         ts_ = 0;
+
         roomid_ = "";
+
         content_ = "";
+
         sender_ = "";
+
         sign_ = "";
+
         thumb_ = "";
+
         extra_ = "";
+
         xml_ = "";
+
         return this;
       }
 
@@ -8556,51 +10362,54 @@ public final class Wcf {
       @java.lang.Override
       public com.iamteer.Wcf.WxMsg buildPartial() {
         com.iamteer.Wcf.WxMsg result = new com.iamteer.Wcf.WxMsg(this);
-        if (bitField0_ != 0) { buildPartial0(result); }
+        result.isSelf_ = isSelf_;
+        result.isGroup_ = isGroup_;
+        result.id_ = id_;
+        result.type_ = type_;
+        result.ts_ = ts_;
+        result.roomid_ = roomid_;
+        result.content_ = content_;
+        result.sender_ = sender_;
+        result.sign_ = sign_;
+        result.thumb_ = thumb_;
+        result.extra_ = extra_;
+        result.xml_ = xml_;
         onBuilt();
         return result;
       }
 
-      private void buildPartial0(com.iamteer.Wcf.WxMsg result) {
-        int from_bitField0_ = bitField0_;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          result.isSelf_ = isSelf_;
-        }
-        if (((from_bitField0_ & 0x00000002) != 0)) {
-          result.isGroup_ = isGroup_;
-        }
-        if (((from_bitField0_ & 0x00000004) != 0)) {
-          result.id_ = id_;
-        }
-        if (((from_bitField0_ & 0x00000008) != 0)) {
-          result.type_ = type_;
-        }
-        if (((from_bitField0_ & 0x00000010) != 0)) {
-          result.ts_ = ts_;
-        }
-        if (((from_bitField0_ & 0x00000020) != 0)) {
-          result.roomid_ = roomid_;
-        }
-        if (((from_bitField0_ & 0x00000040) != 0)) {
-          result.content_ = content_;
-        }
-        if (((from_bitField0_ & 0x00000080) != 0)) {
-          result.sender_ = sender_;
-        }
-        if (((from_bitField0_ & 0x00000100) != 0)) {
-          result.sign_ = sign_;
-        }
-        if (((from_bitField0_ & 0x00000200) != 0)) {
-          result.thumb_ = thumb_;
-        }
-        if (((from_bitField0_ & 0x00000400) != 0)) {
-          result.extra_ = extra_;
-        }
-        if (((from_bitField0_ & 0x00000800) != 0)) {
-          result.xml_ = xml_;
-        }
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
       }
-
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.iamteer.Wcf.WxMsg) {
@@ -8630,40 +10439,33 @@ public final class Wcf {
         }
         if (!other.getRoomid().isEmpty()) {
           roomid_ = other.roomid_;
-          bitField0_ |= 0x00000020;
           onChanged();
         }
         if (!other.getContent().isEmpty()) {
           content_ = other.content_;
-          bitField0_ |= 0x00000040;
           onChanged();
         }
         if (!other.getSender().isEmpty()) {
           sender_ = other.sender_;
-          bitField0_ |= 0x00000080;
           onChanged();
         }
         if (!other.getSign().isEmpty()) {
           sign_ = other.sign_;
-          bitField0_ |= 0x00000100;
           onChanged();
         }
         if (!other.getThumb().isEmpty()) {
           thumb_ = other.thumb_;
-          bitField0_ |= 0x00000200;
           onChanged();
         }
         if (!other.getExtra().isEmpty()) {
           extra_ = other.extra_;
-          bitField0_ |= 0x00000400;
           onChanged();
         }
         if (!other.getXml().isEmpty()) {
           xml_ = other.xml_;
-          bitField0_ |= 0x00000800;
           onChanged();
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -8678,93 +10480,19 @@ public final class Wcf {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        com.iamteer.Wcf.WxMsg parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 8: {
-                isSelf_ = input.readBool();
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 8
-              case 16: {
-                isGroup_ = input.readBool();
-                bitField0_ |= 0x00000002;
-                break;
-              } // case 16
-              case 24: {
-                id_ = input.readUInt64();
-                bitField0_ |= 0x00000004;
-                break;
-              } // case 24
-              case 32: {
-                type_ = input.readUInt32();
-                bitField0_ |= 0x00000008;
-                break;
-              } // case 32
-              case 40: {
-                ts_ = input.readUInt32();
-                bitField0_ |= 0x00000010;
-                break;
-              } // case 40
-              case 50: {
-                roomid_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000020;
-                break;
-              } // case 50
-              case 58: {
-                content_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000040;
-                break;
-              } // case 58
-              case 66: {
-                sender_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000080;
-                break;
-              } // case 66
-              case 74: {
-                sign_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000100;
-                break;
-              } // case 74
-              case 82: {
-                thumb_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000200;
-                break;
-              } // case 82
-              case 90: {
-                extra_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000400;
-                break;
-              } // case 90
-              case 98: {
-                xml_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000800;
-                break;
-              } // case 98
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.iamteer.Wcf.WxMsg) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
-      private int bitField0_;
 
       private boolean isSelf_ ;
       /**
@@ -8789,9 +10517,8 @@ public final class Wcf {
        * @return This builder for chaining.
        */
       public Builder setIsSelf(boolean value) {
-
+        
         isSelf_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -8804,7 +10531,7 @@ public final class Wcf {
        * @return This builder for chaining.
        */
       public Builder clearIsSelf() {
-        bitField0_ = (bitField0_ & ~0x00000001);
+        
         isSelf_ = false;
         onChanged();
         return this;
@@ -8833,9 +10560,8 @@ public final class Wcf {
        * @return This builder for chaining.
        */
       public Builder setIsGroup(boolean value) {
-
+        
         isGroup_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -8848,7 +10574,7 @@ public final class Wcf {
        * @return This builder for chaining.
        */
       public Builder clearIsGroup() {
-        bitField0_ = (bitField0_ & ~0x00000002);
+        
         isGroup_ = false;
         onChanged();
         return this;
@@ -8860,7 +10586,7 @@ public final class Wcf {
        * 消息 id
        * 
* - * uint64 id = 3; + * uint64 id = 3 [jstype = JS_STRING]; * @return The id. */ @java.lang.Override @@ -8872,14 +10598,13 @@ public final class Wcf { * 消息 id *
* - * uint64 id = 3; + * uint64 id = 3 [jstype = JS_STRING]; * @param value The id to set. * @return This builder for chaining. */ public Builder setId(long value) { - + id_ = value; - bitField0_ |= 0x00000004; onChanged(); return this; } @@ -8888,11 +10613,11 @@ public final class Wcf { * 消息 id *
* - * uint64 id = 3; + * uint64 id = 3 [jstype = JS_STRING]; * @return This builder for chaining. */ public Builder clearId() { - bitField0_ = (bitField0_ & ~0x00000004); + id_ = 0L; onChanged(); return this; @@ -8921,9 +10646,8 @@ public final class Wcf { * @return This builder for chaining. */ public Builder setType(int value) { - + type_ = value; - bitField0_ |= 0x00000008; onChanged(); return this; } @@ -8936,7 +10660,7 @@ public final class Wcf { * @return This builder for chaining. */ public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000008); + type_ = 0; onChanged(); return this; @@ -8965,9 +10689,8 @@ public final class Wcf { * @return This builder for chaining. */ public Builder setTs(int value) { - + ts_ = value; - bitField0_ |= 0x00000010; onChanged(); return this; } @@ -8980,7 +10703,7 @@ public final class Wcf { * @return This builder for chaining. */ public Builder clearTs() { - bitField0_ = (bitField0_ & ~0x00000010); + ts_ = 0; onChanged(); return this; @@ -9039,9 +10762,11 @@ public final class Wcf { */ public Builder setRoomid( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + roomid_ = value; - bitField0_ |= 0x00000020; onChanged(); return this; } @@ -9054,8 +10779,8 @@ public final class Wcf { * @return This builder for chaining. */ public Builder clearRoomid() { + roomid_ = getDefaultInstance().getRoomid(); - bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } @@ -9070,10 +10795,12 @@ public final class Wcf { */ public Builder setRoomidBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + roomid_ = value; - bitField0_ |= 0x00000020; onChanged(); return this; } @@ -9131,9 +10858,11 @@ public final class Wcf { */ public Builder setContent( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + content_ = value; - bitField0_ |= 0x00000040; onChanged(); return this; } @@ -9146,8 +10875,8 @@ public final class Wcf { * @return This builder for chaining. */ public Builder clearContent() { + content_ = getDefaultInstance().getContent(); - bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } @@ -9162,10 +10891,12 @@ public final class Wcf { */ public Builder setContentBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + content_ = value; - bitField0_ |= 0x00000040; onChanged(); return this; } @@ -9223,9 +10954,11 @@ public final class Wcf { */ public Builder setSender( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + sender_ = value; - bitField0_ |= 0x00000080; onChanged(); return this; } @@ -9238,8 +10971,8 @@ public final class Wcf { * @return This builder for chaining. */ public Builder clearSender() { + sender_ = getDefaultInstance().getSender(); - bitField0_ = (bitField0_ & ~0x00000080); onChanged(); return this; } @@ -9254,10 +10987,12 @@ public final class Wcf { */ public Builder setSenderBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sender_ = value; - bitField0_ |= 0x00000080; onChanged(); return this; } @@ -9315,9 +11050,11 @@ public final class Wcf { */ public Builder setSign( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + sign_ = value; - bitField0_ |= 0x00000100; onChanged(); return this; } @@ -9330,8 +11067,8 @@ public final class Wcf { * @return This builder for chaining. */ public Builder clearSign() { + sign_ = getDefaultInstance().getSign(); - bitField0_ = (bitField0_ & ~0x00000100); onChanged(); return this; } @@ -9346,10 +11083,12 @@ public final class Wcf { */ public Builder setSignBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sign_ = value; - bitField0_ |= 0x00000100; onChanged(); return this; } @@ -9407,9 +11146,11 @@ public final class Wcf { */ public Builder setThumb( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + thumb_ = value; - bitField0_ |= 0x00000200; onChanged(); return this; } @@ -9422,8 +11163,8 @@ public final class Wcf { * @return This builder for chaining. */ public Builder clearThumb() { + thumb_ = getDefaultInstance().getThumb(); - bitField0_ = (bitField0_ & ~0x00000200); onChanged(); return this; } @@ -9438,10 +11179,12 @@ public final class Wcf { */ public Builder setThumbBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + thumb_ = value; - bitField0_ |= 0x00000200; onChanged(); return this; } @@ -9499,9 +11242,11 @@ public final class Wcf { */ public Builder setExtra( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + extra_ = value; - bitField0_ |= 0x00000400; onChanged(); return this; } @@ -9514,8 +11259,8 @@ public final class Wcf { * @return This builder for chaining. */ public Builder clearExtra() { + extra_ = getDefaultInstance().getExtra(); - bitField0_ = (bitField0_ & ~0x00000400); onChanged(); return this; } @@ -9530,10 +11275,12 @@ public final class Wcf { */ public Builder setExtraBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + extra_ = value; - bitField0_ |= 0x00000400; onChanged(); return this; } @@ -9591,9 +11338,11 @@ public final class Wcf { */ public Builder setXml( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + xml_ = value; - bitField0_ |= 0x00000800; onChanged(); return this; } @@ -9606,8 +11355,8 @@ public final class Wcf { * @return This builder for chaining. */ public Builder clearXml() { + xml_ = getDefaultInstance().getXml(); - bitField0_ = (bitField0_ & ~0x00000800); onChanged(); return this; } @@ -9622,10 +11371,12 @@ public final class Wcf { */ public Builder setXmlBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + xml_ = value; - bitField0_ |= 0x00000800; onChanged(); return this; } @@ -9662,18 +11413,7 @@ public final class Wcf { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new WxMsg(input, extensionRegistry); } }; @@ -9782,6 +11522,66 @@ public final class Wcf { return new TextMsg(); } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TextMsg( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + msg_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + receiver_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + aters_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.iamteer.Wcf.internal_static_wcf_TextMsg_descriptor; @@ -9796,8 +11596,7 @@ public final class Wcf { } public static final int MSG_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object msg_ = ""; + private volatile java.lang.Object msg_; /** *
      * 要发送的消息内容
@@ -9843,8 +11642,7 @@ public final class Wcf {
     }
 
     public static final int RECEIVER_FIELD_NUMBER = 2;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object receiver_ = "";
+    private volatile java.lang.Object receiver_;
     /**
      * 
      * 消息接收人,当为群时可@
@@ -9890,8 +11688,7 @@ public final class Wcf {
     }
 
     public static final int ATERS_FIELD_NUMBER = 3;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object aters_ = "";
+    private volatile java.lang.Object aters_;
     /**
      * 
      * 要@的人列表,逗号分隔
@@ -9959,7 +11756,7 @@ public final class Wcf {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(aters_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 3, aters_);
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -9977,7 +11774,7 @@ public final class Wcf {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(aters_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, aters_);
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -9998,7 +11795,7 @@ public final class Wcf {
           .equals(other.getReceiver())) return false;
       if (!getAters()
           .equals(other.getAters())) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -10015,7 +11812,7 @@ public final class Wcf {
       hash = (53 * hash) + getReceiver().hashCode();
       hash = (37 * hash) + ATERS_FIELD_NUMBER;
       hash = (53 * hash) + getAters().hashCode();
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -10132,21 +11929,28 @@ public final class Wcf {
 
       // Construct using com.iamteer.Wcf.TextMsg.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         msg_ = "";
+
         receiver_ = "";
+
         aters_ = "";
+
         return this;
       }
 
@@ -10173,24 +11977,45 @@ public final class Wcf {
       @java.lang.Override
       public com.iamteer.Wcf.TextMsg buildPartial() {
         com.iamteer.Wcf.TextMsg result = new com.iamteer.Wcf.TextMsg(this);
-        if (bitField0_ != 0) { buildPartial0(result); }
+        result.msg_ = msg_;
+        result.receiver_ = receiver_;
+        result.aters_ = aters_;
         onBuilt();
         return result;
       }
 
-      private void buildPartial0(com.iamteer.Wcf.TextMsg result) {
-        int from_bitField0_ = bitField0_;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          result.msg_ = msg_;
-        }
-        if (((from_bitField0_ & 0x00000002) != 0)) {
-          result.receiver_ = receiver_;
-        }
-        if (((from_bitField0_ & 0x00000004) != 0)) {
-          result.aters_ = aters_;
-        }
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
       }
-
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.iamteer.Wcf.TextMsg) {
@@ -10205,20 +12030,17 @@ public final class Wcf {
         if (other == com.iamteer.Wcf.TextMsg.getDefaultInstance()) return this;
         if (!other.getMsg().isEmpty()) {
           msg_ = other.msg_;
-          bitField0_ |= 0x00000001;
           onChanged();
         }
         if (!other.getReceiver().isEmpty()) {
           receiver_ = other.receiver_;
-          bitField0_ |= 0x00000002;
           onChanged();
         }
         if (!other.getAters().isEmpty()) {
           aters_ = other.aters_;
-          bitField0_ |= 0x00000004;
           onChanged();
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -10233,48 +12055,19 @@ public final class Wcf {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        com.iamteer.Wcf.TextMsg parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 10: {
-                msg_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 10
-              case 18: {
-                receiver_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000002;
-                break;
-              } // case 18
-              case 26: {
-                aters_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000004;
-                break;
-              } // case 26
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.iamteer.Wcf.TextMsg) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
-      private int bitField0_;
 
       private java.lang.Object msg_ = "";
       /**
@@ -10329,9 +12122,11 @@ public final class Wcf {
        */
       public Builder setMsg(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         msg_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -10344,8 +12139,8 @@ public final class Wcf {
        * @return This builder for chaining.
        */
       public Builder clearMsg() {
+        
         msg_ = getDefaultInstance().getMsg();
-        bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
@@ -10360,10 +12155,12 @@ public final class Wcf {
        */
       public Builder setMsgBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         msg_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -10421,9 +12218,11 @@ public final class Wcf {
        */
       public Builder setReceiver(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         receiver_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -10436,8 +12235,8 @@ public final class Wcf {
        * @return This builder for chaining.
        */
       public Builder clearReceiver() {
+        
         receiver_ = getDefaultInstance().getReceiver();
-        bitField0_ = (bitField0_ & ~0x00000002);
         onChanged();
         return this;
       }
@@ -10452,10 +12251,12 @@ public final class Wcf {
        */
       public Builder setReceiverBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         receiver_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -10513,9 +12314,11 @@ public final class Wcf {
        */
       public Builder setAters(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         aters_ = value;
-        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -10528,8 +12331,8 @@ public final class Wcf {
        * @return This builder for chaining.
        */
       public Builder clearAters() {
+        
         aters_ = getDefaultInstance().getAters();
-        bitField0_ = (bitField0_ & ~0x00000004);
         onChanged();
         return this;
       }
@@ -10544,10 +12347,12 @@ public final class Wcf {
        */
       public Builder setAtersBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         aters_ = value;
-        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -10584,18 +12389,7 @@ public final class Wcf {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        Builder builder = newBuilder();
-        try {
-          builder.mergeFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          throw e.setUnfinishedMessage(builder.buildPartial());
-        } catch (com.google.protobuf.UninitializedMessageException e) {
-          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
-        } catch (java.io.IOException e) {
-          throw new com.google.protobuf.InvalidProtocolBufferException(e)
-              .setUnfinishedMessage(builder.buildPartial());
-        }
-        return builder.buildPartial();
+        return new TextMsg(input, extensionRegistry);
       }
     };
 
@@ -10683,6 +12477,60 @@ public final class Wcf {
       return new PathMsg();
     }
 
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return this.unknownFields;
+    }
+    private PathMsg(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              path_ = s;
+              break;
+            }
+            case 18: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              receiver_ = s;
+              break;
+            }
+            default: {
+              if (!parseUnknownField(
+                  input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e).setUnfinishedMessage(this);
+      } finally {
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return com.iamteer.Wcf.internal_static_wcf_PathMsg_descriptor;
@@ -10697,8 +12545,7 @@ public final class Wcf {
     }
 
     public static final int PATH_FIELD_NUMBER = 1;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object path_ = "";
+    private volatile java.lang.Object path_;
     /**
      * 
      * 要发送的图片的路径
@@ -10744,8 +12591,7 @@ public final class Wcf {
     }
 
     public static final int RECEIVER_FIELD_NUMBER = 2;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object receiver_ = "";
+    private volatile java.lang.Object receiver_;
     /**
      * 
      * 消息接收人
@@ -10810,7 +12656,7 @@ public final class Wcf {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 2, receiver_);
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -10825,7 +12671,7 @@ public final class Wcf {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, receiver_);
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -10844,7 +12690,7 @@ public final class Wcf {
           .equals(other.getPath())) return false;
       if (!getReceiver()
           .equals(other.getReceiver())) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -10859,7 +12705,7 @@ public final class Wcf {
       hash = (53 * hash) + getPath().hashCode();
       hash = (37 * hash) + RECEIVER_FIELD_NUMBER;
       hash = (53 * hash) + getReceiver().hashCode();
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -10976,20 +12822,26 @@ public final class Wcf {
 
       // Construct using com.iamteer.Wcf.PathMsg.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         path_ = "";
+
         receiver_ = "";
+
         return this;
       }
 
@@ -11016,21 +12868,44 @@ public final class Wcf {
       @java.lang.Override
       public com.iamteer.Wcf.PathMsg buildPartial() {
         com.iamteer.Wcf.PathMsg result = new com.iamteer.Wcf.PathMsg(this);
-        if (bitField0_ != 0) { buildPartial0(result); }
+        result.path_ = path_;
+        result.receiver_ = receiver_;
         onBuilt();
         return result;
       }
 
-      private void buildPartial0(com.iamteer.Wcf.PathMsg result) {
-        int from_bitField0_ = bitField0_;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          result.path_ = path_;
-        }
-        if (((from_bitField0_ & 0x00000002) != 0)) {
-          result.receiver_ = receiver_;
-        }
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
       }
-
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.iamteer.Wcf.PathMsg) {
@@ -11045,15 +12920,13 @@ public final class Wcf {
         if (other == com.iamteer.Wcf.PathMsg.getDefaultInstance()) return this;
         if (!other.getPath().isEmpty()) {
           path_ = other.path_;
-          bitField0_ |= 0x00000001;
           onChanged();
         }
         if (!other.getReceiver().isEmpty()) {
           receiver_ = other.receiver_;
-          bitField0_ |= 0x00000002;
           onChanged();
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -11068,43 +12941,19 @@ public final class Wcf {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        com.iamteer.Wcf.PathMsg parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 10: {
-                path_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 10
-              case 18: {
-                receiver_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000002;
-                break;
-              } // case 18
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.iamteer.Wcf.PathMsg) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
-      private int bitField0_;
 
       private java.lang.Object path_ = "";
       /**
@@ -11159,9 +13008,11 @@ public final class Wcf {
        */
       public Builder setPath(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         path_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -11174,8 +13025,8 @@ public final class Wcf {
        * @return This builder for chaining.
        */
       public Builder clearPath() {
+        
         path_ = getDefaultInstance().getPath();
-        bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
@@ -11190,10 +13041,12 @@ public final class Wcf {
        */
       public Builder setPathBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         path_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -11251,9 +13104,11 @@ public final class Wcf {
        */
       public Builder setReceiver(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         receiver_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -11266,8 +13121,8 @@ public final class Wcf {
        * @return This builder for chaining.
        */
       public Builder clearReceiver() {
+        
         receiver_ = getDefaultInstance().getReceiver();
-        bitField0_ = (bitField0_ & ~0x00000002);
         onChanged();
         return this;
       }
@@ -11282,10 +13137,12 @@ public final class Wcf {
        */
       public Builder setReceiverBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         receiver_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -11322,18 +13179,7 @@ public final class Wcf {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        Builder builder = newBuilder();
-        try {
-          builder.mergeFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          throw e.setUnfinishedMessage(builder.buildPartial());
-        } catch (com.google.protobuf.UninitializedMessageException e) {
-          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
-        } catch (java.io.IOException e) {
-          throw new com.google.protobuf.InvalidProtocolBufferException(e)
-              .setUnfinishedMessage(builder.buildPartial());
-        }
-        return builder.buildPartial();
+        return new PathMsg(input, extensionRegistry);
       }
     };
 
@@ -11452,6 +13298,71 @@ public final class Wcf {
       return new XmlMsg();
     }
 
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return this.unknownFields;
+    }
+    private XmlMsg(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              receiver_ = s;
+              break;
+            }
+            case 18: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              content_ = s;
+              break;
+            }
+            case 26: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              path_ = s;
+              break;
+            }
+            case 32: {
+
+              type_ = input.readInt32();
+              break;
+            }
+            default: {
+              if (!parseUnknownField(
+                  input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e).setUnfinishedMessage(this);
+      } finally {
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return com.iamteer.Wcf.internal_static_wcf_XmlMsg_descriptor;
@@ -11466,8 +13377,7 @@ public final class Wcf {
     }
 
     public static final int RECEIVER_FIELD_NUMBER = 1;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object receiver_ = "";
+    private volatile java.lang.Object receiver_;
     /**
      * 
      * 消息接收人
@@ -11513,8 +13423,7 @@ public final class Wcf {
     }
 
     public static final int CONTENT_FIELD_NUMBER = 2;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object content_ = "";
+    private volatile java.lang.Object content_;
     /**
      * 
      * xml 内容
@@ -11560,8 +13469,7 @@ public final class Wcf {
     }
 
     public static final int PATH_FIELD_NUMBER = 3;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object path_ = "";
+    private volatile java.lang.Object path_;
     /**
      * 
      * 图片路径
@@ -11607,7 +13515,7 @@ public final class Wcf {
     }
 
     public static final int TYPE_FIELD_NUMBER = 4;
-    private int type_ = 0;
+    private int type_;
     /**
      * 
      * 消息类型
@@ -11647,7 +13555,7 @@ public final class Wcf {
       if (type_ != 0) {
         output.writeInt32(4, type_);
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -11669,7 +13577,7 @@ public final class Wcf {
         size += com.google.protobuf.CodedOutputStream
           .computeInt32Size(4, type_);
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -11692,7 +13600,7 @@ public final class Wcf {
           .equals(other.getPath())) return false;
       if (getType()
           != other.getType()) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -11711,7 +13619,7 @@ public final class Wcf {
       hash = (53 * hash) + getPath().hashCode();
       hash = (37 * hash) + TYPE_FIELD_NUMBER;
       hash = (53 * hash) + getType();
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -11828,22 +13736,30 @@ public final class Wcf {
 
       // Construct using com.iamteer.Wcf.XmlMsg.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         receiver_ = "";
+
         content_ = "";
+
         path_ = "";
+
         type_ = 0;
+
         return this;
       }
 
@@ -11870,27 +13786,46 @@ public final class Wcf {
       @java.lang.Override
       public com.iamteer.Wcf.XmlMsg buildPartial() {
         com.iamteer.Wcf.XmlMsg result = new com.iamteer.Wcf.XmlMsg(this);
-        if (bitField0_ != 0) { buildPartial0(result); }
+        result.receiver_ = receiver_;
+        result.content_ = content_;
+        result.path_ = path_;
+        result.type_ = type_;
         onBuilt();
         return result;
       }
 
-      private void buildPartial0(com.iamteer.Wcf.XmlMsg result) {
-        int from_bitField0_ = bitField0_;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          result.receiver_ = receiver_;
-        }
-        if (((from_bitField0_ & 0x00000002) != 0)) {
-          result.content_ = content_;
-        }
-        if (((from_bitField0_ & 0x00000004) != 0)) {
-          result.path_ = path_;
-        }
-        if (((from_bitField0_ & 0x00000008) != 0)) {
-          result.type_ = type_;
-        }
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
       }
-
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.iamteer.Wcf.XmlMsg) {
@@ -11905,23 +13840,20 @@ public final class Wcf {
         if (other == com.iamteer.Wcf.XmlMsg.getDefaultInstance()) return this;
         if (!other.getReceiver().isEmpty()) {
           receiver_ = other.receiver_;
-          bitField0_ |= 0x00000001;
           onChanged();
         }
         if (!other.getContent().isEmpty()) {
           content_ = other.content_;
-          bitField0_ |= 0x00000002;
           onChanged();
         }
         if (!other.getPath().isEmpty()) {
           path_ = other.path_;
-          bitField0_ |= 0x00000004;
           onChanged();
         }
         if (other.getType() != 0) {
           setType(other.getType());
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -11936,53 +13868,19 @@ public final class Wcf {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        com.iamteer.Wcf.XmlMsg parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 10: {
-                receiver_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 10
-              case 18: {
-                content_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000002;
-                break;
-              } // case 18
-              case 26: {
-                path_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000004;
-                break;
-              } // case 26
-              case 32: {
-                type_ = input.readInt32();
-                bitField0_ |= 0x00000008;
-                break;
-              } // case 32
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.iamteer.Wcf.XmlMsg) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
-      private int bitField0_;
 
       private java.lang.Object receiver_ = "";
       /**
@@ -12037,9 +13935,11 @@ public final class Wcf {
        */
       public Builder setReceiver(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         receiver_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -12052,8 +13952,8 @@ public final class Wcf {
        * @return This builder for chaining.
        */
       public Builder clearReceiver() {
+        
         receiver_ = getDefaultInstance().getReceiver();
-        bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
@@ -12068,10 +13968,12 @@ public final class Wcf {
        */
       public Builder setReceiverBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         receiver_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -12129,9 +14031,11 @@ public final class Wcf {
        */
       public Builder setContent(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         content_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -12144,8 +14048,8 @@ public final class Wcf {
        * @return This builder for chaining.
        */
       public Builder clearContent() {
+        
         content_ = getDefaultInstance().getContent();
-        bitField0_ = (bitField0_ & ~0x00000002);
         onChanged();
         return this;
       }
@@ -12160,10 +14064,12 @@ public final class Wcf {
        */
       public Builder setContentBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         content_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -12221,9 +14127,11 @@ public final class Wcf {
        */
       public Builder setPath(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         path_ = value;
-        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -12236,8 +14144,8 @@ public final class Wcf {
        * @return This builder for chaining.
        */
       public Builder clearPath() {
+        
         path_ = getDefaultInstance().getPath();
-        bitField0_ = (bitField0_ & ~0x00000004);
         onChanged();
         return this;
       }
@@ -12252,10 +14160,12 @@ public final class Wcf {
        */
       public Builder setPathBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         path_ = value;
-        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -12283,9 +14193,8 @@ public final class Wcf {
        * @return This builder for chaining.
        */
       public Builder setType(int value) {
-
+        
         type_ = value;
-        bitField0_ |= 0x00000008;
         onChanged();
         return this;
       }
@@ -12298,7 +14207,7 @@ public final class Wcf {
        * @return This builder for chaining.
        */
       public Builder clearType() {
-        bitField0_ = (bitField0_ & ~0x00000008);
+        
         type_ = 0;
         onChanged();
         return this;
@@ -12336,18 +14245,7 @@ public final class Wcf {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        Builder builder = newBuilder();
-        try {
-          builder.mergeFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          throw e.setUnfinishedMessage(builder.buildPartial());
-        } catch (com.google.protobuf.UninitializedMessageException e) {
-          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
-        } catch (java.io.IOException e) {
-          throw new com.google.protobuf.InvalidProtocolBufferException(e)
-              .setUnfinishedMessage(builder.buildPartial());
-        }
-        return builder.buildPartial();
+        return new XmlMsg(input, extensionRegistry);
       }
     };
 
@@ -12394,14 +14292,14 @@ public final class Wcf {
     /**
      * map<int32, string> types = 1;
      */
-    /* nullable */
-java.lang.String getTypesOrDefault(
+
+    java.lang.String getTypesOrDefault(
         int key,
-        /* nullable */
-java.lang.String defaultValue);
+        java.lang.String defaultValue);
     /**
      * map<int32, string> types = 1;
      */
+
     java.lang.String getTypesOrThrow(
         int key);
   }
@@ -12427,6 +14325,62 @@ java.lang.String defaultValue);
       return new MsgTypes();
     }
 
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return this.unknownFields;
+    }
+    private MsgTypes(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10: {
+              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+                types_ = com.google.protobuf.MapField.newMapField(
+                    TypesDefaultEntryHolder.defaultEntry);
+                mutable_bitField0_ |= 0x00000001;
+              }
+              com.google.protobuf.MapEntry
+              types__ = input.readMessage(
+                  TypesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
+              types_.getMutableMap().put(
+                  types__.getKey(), types__.getValue());
+              break;
+            }
+            default: {
+              if (!parseUnknownField(
+                  input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e).setUnfinishedMessage(this);
+      } finally {
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return com.iamteer.Wcf.internal_static_wcf_MsgTypes_descriptor;
@@ -12464,7 +14418,6 @@ java.lang.String defaultValue);
                   com.google.protobuf.WireFormat.FieldType.STRING,
                   "");
     }
-    @SuppressWarnings("serial")
     private com.google.protobuf.MapField<
         java.lang.Integer, java.lang.String> types_;
     private com.google.protobuf.MapField
@@ -12475,16 +14428,18 @@ java.lang.String defaultValue);
       }
       return types_;
     }
+
     public int getTypesCount() {
       return internalGetTypes().getMap().size();
     }
     /**
      * map<int32, string> types = 1;
      */
+
     @java.lang.Override
     public boolean containsTypes(
         int key) {
-
+      
       return internalGetTypes().getMap().containsKey(key);
     }
     /**
@@ -12499,6 +14454,7 @@ java.lang.String defaultValue);
      * map<int32, string> types = 1;
      */
     @java.lang.Override
+
     public java.util.Map getTypesMap() {
       return internalGetTypes().getMap();
     }
@@ -12506,12 +14462,11 @@ java.lang.String defaultValue);
      * map<int32, string> types = 1;
      */
     @java.lang.Override
-    public /* nullable */
-java.lang.String getTypesOrDefault(
-        int key,
-        /* nullable */
-java.lang.String defaultValue) {
 
+    public java.lang.String getTypesOrDefault(
+        int key,
+        java.lang.String defaultValue) {
+      
       java.util.Map map =
           internalGetTypes().getMap();
       return map.containsKey(key) ? map.get(key) : defaultValue;
@@ -12520,9 +14475,10 @@ java.lang.String defaultValue) {
      * map<int32, string> types = 1;
      */
     @java.lang.Override
+
     public java.lang.String getTypesOrThrow(
         int key) {
-
+      
       java.util.Map map =
           internalGetTypes().getMap();
       if (!map.containsKey(key)) {
@@ -12551,7 +14507,7 @@ java.lang.String defaultValue) {
           internalGetTypes(),
           TypesDefaultEntryHolder.defaultEntry,
           1);
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -12570,7 +14526,7 @@ java.lang.String defaultValue) {
         size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(1, types__);
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -12587,7 +14543,7 @@ java.lang.String defaultValue) {
 
       if (!internalGetTypes().equals(
           other.internalGetTypes())) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -12602,7 +14558,7 @@ java.lang.String defaultValue) {
         hash = (37 * hash) + TYPES_FIELD_NUMBER;
         hash = (53 * hash) + internalGetTypes().hashCode();
       }
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -12741,18 +14697,22 @@ java.lang.String defaultValue) {
 
       // Construct using com.iamteer.Wcf.MsgTypes.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         internalGetMutableTypes().clear();
         return this;
       }
@@ -12780,19 +14740,45 @@ java.lang.String defaultValue) {
       @java.lang.Override
       public com.iamteer.Wcf.MsgTypes buildPartial() {
         com.iamteer.Wcf.MsgTypes result = new com.iamteer.Wcf.MsgTypes(this);
-        if (bitField0_ != 0) { buildPartial0(result); }
+        int from_bitField0_ = bitField0_;
+        result.types_ = internalGetTypes();
+        result.types_.makeImmutable();
         onBuilt();
         return result;
       }
 
-      private void buildPartial0(com.iamteer.Wcf.MsgTypes result) {
-        int from_bitField0_ = bitField0_;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          result.types_ = internalGetTypes();
-          result.types_.makeImmutable();
-        }
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
       }
-
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.iamteer.Wcf.MsgTypes) {
@@ -12807,8 +14793,7 @@ java.lang.String defaultValue) {
         if (other == com.iamteer.Wcf.MsgTypes.getDefaultInstance()) return this;
         internalGetMutableTypes().mergeFrom(
             other.internalGetTypes());
-        bitField0_ |= 0x00000001;
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -12823,39 +14808,17 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        com.iamteer.Wcf.MsgTypes parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 10: {
-                com.google.protobuf.MapEntry
-                types__ = input.readMessage(
-                    TypesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
-                internalGetMutableTypes().getMutableMap().put(
-                    types__.getKey(), types__.getValue());
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 10
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.iamteer.Wcf.MsgTypes) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
       private int bitField0_;
@@ -12863,7 +14826,7 @@ java.lang.String defaultValue) {
       private com.google.protobuf.MapField<
           java.lang.Integer, java.lang.String> types_;
       private com.google.protobuf.MapField
-          internalGetTypes() {
+      internalGetTypes() {
         if (types_ == null) {
           return com.google.protobuf.MapField.emptyMapField(
               TypesDefaultEntryHolder.defaultEntry);
@@ -12871,7 +14834,8 @@ java.lang.String defaultValue) {
         return types_;
       }
       private com.google.protobuf.MapField
-          internalGetMutableTypes() {
+      internalGetMutableTypes() {
+        onChanged();;
         if (types_ == null) {
           types_ = com.google.protobuf.MapField.newMapField(
               TypesDefaultEntryHolder.defaultEntry);
@@ -12879,20 +14843,20 @@ java.lang.String defaultValue) {
         if (!types_.isMutable()) {
           types_ = types_.copy();
         }
-        bitField0_ |= 0x00000001;
-        onChanged();
         return types_;
       }
+
       public int getTypesCount() {
         return internalGetTypes().getMap().size();
       }
       /**
        * map<int32, string> types = 1;
        */
+
       @java.lang.Override
       public boolean containsTypes(
           int key) {
-
+        
         return internalGetTypes().getMap().containsKey(key);
       }
       /**
@@ -12907,6 +14871,7 @@ java.lang.String defaultValue) {
        * map<int32, string> types = 1;
        */
       @java.lang.Override
+
       public java.util.Map getTypesMap() {
         return internalGetTypes().getMap();
       }
@@ -12914,12 +14879,11 @@ java.lang.String defaultValue) {
        * map<int32, string> types = 1;
        */
       @java.lang.Override
-      public /* nullable */
-java.lang.String getTypesOrDefault(
-          int key,
-          /* nullable */
-java.lang.String defaultValue) {
 
+      public java.lang.String getTypesOrDefault(
+          int key,
+          java.lang.String defaultValue) {
+        
         java.util.Map map =
             internalGetTypes().getMap();
         return map.containsKey(key) ? map.get(key) : defaultValue;
@@ -12928,9 +14892,10 @@ java.lang.String defaultValue) {
        * map<int32, string> types = 1;
        */
       @java.lang.Override
+
       public java.lang.String getTypesOrThrow(
           int key) {
-
+        
         java.util.Map map =
             internalGetTypes().getMap();
         if (!map.containsKey(key)) {
@@ -12938,8 +14903,8 @@ java.lang.String defaultValue) {
         }
         return map.get(key);
       }
+
       public Builder clearTypes() {
-        bitField0_ = (bitField0_ & ~0x00000001);
         internalGetMutableTypes().getMutableMap()
             .clear();
         return this;
@@ -12947,9 +14912,10 @@ java.lang.String defaultValue) {
       /**
        * map<int32, string> types = 1;
        */
+
       public Builder removeTypes(
           int key) {
-
+        
         internalGetMutableTypes().getMutableMap()
             .remove(key);
         return this;
@@ -12959,8 +14925,7 @@ java.lang.String defaultValue) {
        */
       @java.lang.Deprecated
       public java.util.Map
-          getMutableTypes() {
-        bitField0_ |= 0x00000001;
+      getMutableTypes() {
         return internalGetMutableTypes().getMutableMap();
       }
       /**
@@ -12969,21 +14934,23 @@ java.lang.String defaultValue) {
       public Builder putTypes(
           int key,
           java.lang.String value) {
+        
+        if (value == null) {
+  throw new NullPointerException("map value");
+}
 
-        if (value == null) { throw new NullPointerException("map value"); }
         internalGetMutableTypes().getMutableMap()
             .put(key, value);
-        bitField0_ |= 0x00000001;
         return this;
       }
       /**
        * map<int32, string> types = 1;
        */
+
       public Builder putAllTypes(
           java.util.Map values) {
         internalGetMutableTypes().getMutableMap()
             .putAll(values);
-        bitField0_ |= 0x00000001;
         return this;
       }
       @java.lang.Override
@@ -13019,18 +14986,7 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        Builder builder = newBuilder();
-        try {
-          builder.mergeFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          throw e.setUnfinishedMessage(builder.buildPartial());
-        } catch (com.google.protobuf.UninitializedMessageException e) {
-          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
-        } catch (java.io.IOException e) {
-          throw new com.google.protobuf.InvalidProtocolBufferException(e)
-              .setUnfinishedMessage(builder.buildPartial());
-        }
-        return builder.buildPartial();
+        return new MsgTypes(input, extensionRegistry);
       }
     };
 
@@ -13233,6 +15189,95 @@ java.lang.String defaultValue) {
       return new RpcContact();
     }
 
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return this.unknownFields;
+    }
+    private RpcContact(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              wxid_ = s;
+              break;
+            }
+            case 18: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              code_ = s;
+              break;
+            }
+            case 26: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              remark_ = s;
+              break;
+            }
+            case 34: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              name_ = s;
+              break;
+            }
+            case 42: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              country_ = s;
+              break;
+            }
+            case 50: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              province_ = s;
+              break;
+            }
+            case 58: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              city_ = s;
+              break;
+            }
+            case 64: {
+
+              gender_ = input.readInt32();
+              break;
+            }
+            default: {
+              if (!parseUnknownField(
+                  input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e).setUnfinishedMessage(this);
+      } finally {
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return com.iamteer.Wcf.internal_static_wcf_RpcContact_descriptor;
@@ -13247,8 +15292,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int WXID_FIELD_NUMBER = 1;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object wxid_ = "";
+    private volatile java.lang.Object wxid_;
     /**
      * 
      * 微信 id
@@ -13294,8 +15338,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int CODE_FIELD_NUMBER = 2;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object code_ = "";
+    private volatile java.lang.Object code_;
     /**
      * 
      * 微信号
@@ -13341,8 +15384,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int REMARK_FIELD_NUMBER = 3;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object remark_ = "";
+    private volatile java.lang.Object remark_;
     /**
      * 
      * 备注
@@ -13388,8 +15430,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int NAME_FIELD_NUMBER = 4;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object name_ = "";
+    private volatile java.lang.Object name_;
     /**
      * 
      * 微信昵称
@@ -13435,8 +15476,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int COUNTRY_FIELD_NUMBER = 5;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object country_ = "";
+    private volatile java.lang.Object country_;
     /**
      * 
      * 国家
@@ -13482,8 +15522,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int PROVINCE_FIELD_NUMBER = 6;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object province_ = "";
+    private volatile java.lang.Object province_;
     /**
      * 
      * 省/州
@@ -13529,8 +15568,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int CITY_FIELD_NUMBER = 7;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object city_ = "";
+    private volatile java.lang.Object city_;
     /**
      * 
      * 城市
@@ -13576,7 +15614,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int GENDER_FIELD_NUMBER = 8;
-    private int gender_ = 0;
+    private int gender_;
     /**
      * 
      * 性别
@@ -13628,7 +15666,7 @@ java.lang.String defaultValue) {
       if (gender_ != 0) {
         output.writeInt32(8, gender_);
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -13662,7 +15700,7 @@ java.lang.String defaultValue) {
         size += com.google.protobuf.CodedOutputStream
           .computeInt32Size(8, gender_);
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -13693,7 +15731,7 @@ java.lang.String defaultValue) {
           .equals(other.getCity())) return false;
       if (getGender()
           != other.getGender()) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -13720,7 +15758,7 @@ java.lang.String defaultValue) {
       hash = (53 * hash) + getCity().hashCode();
       hash = (37 * hash) + GENDER_FIELD_NUMBER;
       hash = (53 * hash) + getGender();
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -13837,26 +15875,38 @@ java.lang.String defaultValue) {
 
       // Construct using com.iamteer.Wcf.RpcContact.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         wxid_ = "";
+
         code_ = "";
+
         remark_ = "";
+
         name_ = "";
+
         country_ = "";
+
         province_ = "";
+
         city_ = "";
+
         gender_ = 0;
+
         return this;
       }
 
@@ -13883,39 +15933,50 @@ java.lang.String defaultValue) {
       @java.lang.Override
       public com.iamteer.Wcf.RpcContact buildPartial() {
         com.iamteer.Wcf.RpcContact result = new com.iamteer.Wcf.RpcContact(this);
-        if (bitField0_ != 0) { buildPartial0(result); }
+        result.wxid_ = wxid_;
+        result.code_ = code_;
+        result.remark_ = remark_;
+        result.name_ = name_;
+        result.country_ = country_;
+        result.province_ = province_;
+        result.city_ = city_;
+        result.gender_ = gender_;
         onBuilt();
         return result;
       }
 
-      private void buildPartial0(com.iamteer.Wcf.RpcContact result) {
-        int from_bitField0_ = bitField0_;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          result.wxid_ = wxid_;
-        }
-        if (((from_bitField0_ & 0x00000002) != 0)) {
-          result.code_ = code_;
-        }
-        if (((from_bitField0_ & 0x00000004) != 0)) {
-          result.remark_ = remark_;
-        }
-        if (((from_bitField0_ & 0x00000008) != 0)) {
-          result.name_ = name_;
-        }
-        if (((from_bitField0_ & 0x00000010) != 0)) {
-          result.country_ = country_;
-        }
-        if (((from_bitField0_ & 0x00000020) != 0)) {
-          result.province_ = province_;
-        }
-        if (((from_bitField0_ & 0x00000040) != 0)) {
-          result.city_ = city_;
-        }
-        if (((from_bitField0_ & 0x00000080) != 0)) {
-          result.gender_ = gender_;
-        }
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
       }
-
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.iamteer.Wcf.RpcContact) {
@@ -13930,43 +15991,36 @@ java.lang.String defaultValue) {
         if (other == com.iamteer.Wcf.RpcContact.getDefaultInstance()) return this;
         if (!other.getWxid().isEmpty()) {
           wxid_ = other.wxid_;
-          bitField0_ |= 0x00000001;
           onChanged();
         }
         if (!other.getCode().isEmpty()) {
           code_ = other.code_;
-          bitField0_ |= 0x00000002;
           onChanged();
         }
         if (!other.getRemark().isEmpty()) {
           remark_ = other.remark_;
-          bitField0_ |= 0x00000004;
           onChanged();
         }
         if (!other.getName().isEmpty()) {
           name_ = other.name_;
-          bitField0_ |= 0x00000008;
           onChanged();
         }
         if (!other.getCountry().isEmpty()) {
           country_ = other.country_;
-          bitField0_ |= 0x00000010;
           onChanged();
         }
         if (!other.getProvince().isEmpty()) {
           province_ = other.province_;
-          bitField0_ |= 0x00000020;
           onChanged();
         }
         if (!other.getCity().isEmpty()) {
           city_ = other.city_;
-          bitField0_ |= 0x00000040;
           onChanged();
         }
         if (other.getGender() != 0) {
           setGender(other.getGender());
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -13981,73 +16035,19 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        com.iamteer.Wcf.RpcContact parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 10: {
-                wxid_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 10
-              case 18: {
-                code_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000002;
-                break;
-              } // case 18
-              case 26: {
-                remark_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000004;
-                break;
-              } // case 26
-              case 34: {
-                name_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000008;
-                break;
-              } // case 34
-              case 42: {
-                country_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000010;
-                break;
-              } // case 42
-              case 50: {
-                province_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000020;
-                break;
-              } // case 50
-              case 58: {
-                city_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000040;
-                break;
-              } // case 58
-              case 64: {
-                gender_ = input.readInt32();
-                bitField0_ |= 0x00000080;
-                break;
-              } // case 64
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.iamteer.Wcf.RpcContact) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
-      private int bitField0_;
 
       private java.lang.Object wxid_ = "";
       /**
@@ -14102,9 +16102,11 @@ java.lang.String defaultValue) {
        */
       public Builder setWxid(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         wxid_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -14117,8 +16119,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearWxid() {
+        
         wxid_ = getDefaultInstance().getWxid();
-        bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
@@ -14133,10 +16135,12 @@ java.lang.String defaultValue) {
        */
       public Builder setWxidBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         wxid_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -14194,9 +16198,11 @@ java.lang.String defaultValue) {
        */
       public Builder setCode(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         code_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -14209,8 +16215,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearCode() {
+        
         code_ = getDefaultInstance().getCode();
-        bitField0_ = (bitField0_ & ~0x00000002);
         onChanged();
         return this;
       }
@@ -14225,10 +16231,12 @@ java.lang.String defaultValue) {
        */
       public Builder setCodeBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         code_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -14286,9 +16294,11 @@ java.lang.String defaultValue) {
        */
       public Builder setRemark(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         remark_ = value;
-        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -14301,8 +16311,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearRemark() {
+        
         remark_ = getDefaultInstance().getRemark();
-        bitField0_ = (bitField0_ & ~0x00000004);
         onChanged();
         return this;
       }
@@ -14317,10 +16327,12 @@ java.lang.String defaultValue) {
        */
       public Builder setRemarkBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         remark_ = value;
-        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -14378,9 +16390,11 @@ java.lang.String defaultValue) {
        */
       public Builder setName(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         name_ = value;
-        bitField0_ |= 0x00000008;
         onChanged();
         return this;
       }
@@ -14393,8 +16407,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearName() {
+        
         name_ = getDefaultInstance().getName();
-        bitField0_ = (bitField0_ & ~0x00000008);
         onChanged();
         return this;
       }
@@ -14409,10 +16423,12 @@ java.lang.String defaultValue) {
        */
       public Builder setNameBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         name_ = value;
-        bitField0_ |= 0x00000008;
         onChanged();
         return this;
       }
@@ -14470,9 +16486,11 @@ java.lang.String defaultValue) {
        */
       public Builder setCountry(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         country_ = value;
-        bitField0_ |= 0x00000010;
         onChanged();
         return this;
       }
@@ -14485,8 +16503,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearCountry() {
+        
         country_ = getDefaultInstance().getCountry();
-        bitField0_ = (bitField0_ & ~0x00000010);
         onChanged();
         return this;
       }
@@ -14501,10 +16519,12 @@ java.lang.String defaultValue) {
        */
       public Builder setCountryBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         country_ = value;
-        bitField0_ |= 0x00000010;
         onChanged();
         return this;
       }
@@ -14562,9 +16582,11 @@ java.lang.String defaultValue) {
        */
       public Builder setProvince(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         province_ = value;
-        bitField0_ |= 0x00000020;
         onChanged();
         return this;
       }
@@ -14577,8 +16599,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearProvince() {
+        
         province_ = getDefaultInstance().getProvince();
-        bitField0_ = (bitField0_ & ~0x00000020);
         onChanged();
         return this;
       }
@@ -14593,10 +16615,12 @@ java.lang.String defaultValue) {
        */
       public Builder setProvinceBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         province_ = value;
-        bitField0_ |= 0x00000020;
         onChanged();
         return this;
       }
@@ -14654,9 +16678,11 @@ java.lang.String defaultValue) {
        */
       public Builder setCity(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         city_ = value;
-        bitField0_ |= 0x00000040;
         onChanged();
         return this;
       }
@@ -14669,8 +16695,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearCity() {
+        
         city_ = getDefaultInstance().getCity();
-        bitField0_ = (bitField0_ & ~0x00000040);
         onChanged();
         return this;
       }
@@ -14685,10 +16711,12 @@ java.lang.String defaultValue) {
        */
       public Builder setCityBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         city_ = value;
-        bitField0_ |= 0x00000040;
         onChanged();
         return this;
       }
@@ -14716,9 +16744,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder setGender(int value) {
-
+        
         gender_ = value;
-        bitField0_ |= 0x00000080;
         onChanged();
         return this;
       }
@@ -14731,7 +16758,7 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearGender() {
-        bitField0_ = (bitField0_ & ~0x00000080);
+        
         gender_ = 0;
         onChanged();
         return this;
@@ -14769,18 +16796,7 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        Builder builder = newBuilder();
-        try {
-          builder.mergeFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          throw e.setUnfinishedMessage(builder.buildPartial());
-        } catch (com.google.protobuf.UninitializedMessageException e) {
-          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
-        } catch (java.io.IOException e) {
-          throw new com.google.protobuf.InvalidProtocolBufferException(e)
-              .setUnfinishedMessage(builder.buildPartial());
-        }
-        return builder.buildPartial();
+        return new RpcContact(input, extensionRegistry);
       }
     };
 
@@ -14851,6 +16867,61 @@ java.lang.String defaultValue) {
       return new RpcContacts();
     }
 
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return this.unknownFields;
+    }
+    private RpcContacts(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10: {
+              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+                contacts_ = new java.util.ArrayList();
+                mutable_bitField0_ |= 0x00000001;
+              }
+              contacts_.add(
+                  input.readMessage(com.iamteer.Wcf.RpcContact.parser(), extensionRegistry));
+              break;
+            }
+            default: {
+              if (!parseUnknownField(
+                  input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e).setUnfinishedMessage(this);
+      } finally {
+        if (((mutable_bitField0_ & 0x00000001) != 0)) {
+          contacts_ = java.util.Collections.unmodifiableList(contacts_);
+        }
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return com.iamteer.Wcf.internal_static_wcf_RpcContacts_descriptor;
@@ -14865,7 +16936,6 @@ java.lang.String defaultValue) {
     }
 
     public static final int CONTACTS_FIELD_NUMBER = 1;
-    @SuppressWarnings("serial")
     private java.util.List contacts_;
     /**
      * repeated .wcf.RpcContact contacts = 1;
@@ -14922,7 +16992,7 @@ java.lang.String defaultValue) {
       for (int i = 0; i < contacts_.size(); i++) {
         output.writeMessage(1, contacts_.get(i));
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -14935,7 +17005,7 @@ java.lang.String defaultValue) {
         size += com.google.protobuf.CodedOutputStream
           .computeMessageSize(1, contacts_.get(i));
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -14952,7 +17022,7 @@ java.lang.String defaultValue) {
 
       if (!getContactsList()
           .equals(other.getContactsList())) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -14967,7 +17037,7 @@ java.lang.String defaultValue) {
         hash = (37 * hash) + CONTACTS_FIELD_NUMBER;
         hash = (53 * hash) + getContactsList().hashCode();
       }
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -15084,25 +17154,29 @@ java.lang.String defaultValue) {
 
       // Construct using com.iamteer.Wcf.RpcContacts.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+          getContactsFieldBuilder();
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         if (contactsBuilder_ == null) {
           contacts_ = java.util.Collections.emptyList();
+          bitField0_ = (bitField0_ & ~0x00000001);
         } else {
-          contacts_ = null;
           contactsBuilder_.clear();
         }
-        bitField0_ = (bitField0_ & ~0x00000001);
         return this;
       }
 
@@ -15129,13 +17203,7 @@ java.lang.String defaultValue) {
       @java.lang.Override
       public com.iamteer.Wcf.RpcContacts buildPartial() {
         com.iamteer.Wcf.RpcContacts result = new com.iamteer.Wcf.RpcContacts(this);
-        buildPartialRepeatedFields(result);
-        if (bitField0_ != 0) { buildPartial0(result); }
-        onBuilt();
-        return result;
-      }
-
-      private void buildPartialRepeatedFields(com.iamteer.Wcf.RpcContacts result) {
+        int from_bitField0_ = bitField0_;
         if (contactsBuilder_ == null) {
           if (((bitField0_ & 0x00000001) != 0)) {
             contacts_ = java.util.Collections.unmodifiableList(contacts_);
@@ -15145,12 +17213,42 @@ java.lang.String defaultValue) {
         } else {
           result.contacts_ = contactsBuilder_.build();
         }
+        onBuilt();
+        return result;
       }
 
-      private void buildPartial0(com.iamteer.Wcf.RpcContacts result) {
-        int from_bitField0_ = bitField0_;
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
       }
-
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.iamteer.Wcf.RpcContacts) {
@@ -15189,7 +17287,7 @@ java.lang.String defaultValue) {
             }
           }
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -15204,43 +17302,17 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        com.iamteer.Wcf.RpcContacts parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 10: {
-                com.iamteer.Wcf.RpcContact m =
-                    input.readMessage(
-                        com.iamteer.Wcf.RpcContact.parser(),
-                        extensionRegistry);
-                if (contactsBuilder_ == null) {
-                  ensureContactsIsMutable();
-                  contacts_.add(m);
-                } else {
-                  contactsBuilder_.addMessage(m);
-                }
-                break;
-              } // case 10
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.iamteer.Wcf.RpcContacts) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
       private int bitField0_;
@@ -15517,18 +17589,7 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        Builder builder = newBuilder();
-        try {
-          builder.mergeFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          throw e.setUnfinishedMessage(builder.buildPartial());
-        } catch (com.google.protobuf.UninitializedMessageException e) {
-          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
-        } catch (java.io.IOException e) {
-          throw new com.google.protobuf.InvalidProtocolBufferException(e)
-              .setUnfinishedMessage(builder.buildPartial());
-        }
-        return builder.buildPartial();
+        return new RpcContacts(input, extensionRegistry);
       }
     };
 
@@ -15590,8 +17651,7 @@ java.lang.String defaultValue) {
       super(builder);
     }
     private DbNames() {
-      names_ =
-          com.google.protobuf.LazyStringArrayList.emptyList();
+      names_ = com.google.protobuf.LazyStringArrayList.EMPTY;
     }
 
     @java.lang.Override
@@ -15601,6 +17661,61 @@ java.lang.String defaultValue) {
       return new DbNames();
     }
 
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return this.unknownFields;
+    }
+    private DbNames(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10: {
+              java.lang.String s = input.readStringRequireUtf8();
+              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+                names_ = new com.google.protobuf.LazyStringArrayList();
+                mutable_bitField0_ |= 0x00000001;
+              }
+              names_.add(s);
+              break;
+            }
+            default: {
+              if (!parseUnknownField(
+                  input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e).setUnfinishedMessage(this);
+      } finally {
+        if (((mutable_bitField0_ & 0x00000001) != 0)) {
+          names_ = names_.getUnmodifiableView();
+        }
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return com.iamteer.Wcf.internal_static_wcf_DbNames_descriptor;
@@ -15615,9 +17730,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int NAMES_FIELD_NUMBER = 1;
-    @SuppressWarnings("serial")
-    private com.google.protobuf.LazyStringArrayList names_ =
-        com.google.protobuf.LazyStringArrayList.emptyList();
+    private com.google.protobuf.LazyStringList names_;
     /**
      * repeated string names = 1;
      * @return A list containing the names.
@@ -15668,7 +17781,7 @@ java.lang.String defaultValue) {
       for (int i = 0; i < names_.size(); i++) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 1, names_.getRaw(i));
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -15685,7 +17798,7 @@ java.lang.String defaultValue) {
         size += dataSize;
         size += 1 * getNamesList().size();
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -15702,7 +17815,7 @@ java.lang.String defaultValue) {
 
       if (!getNamesList()
           .equals(other.getNamesList())) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -15717,7 +17830,7 @@ java.lang.String defaultValue) {
         hash = (37 * hash) + NAMES_FIELD_NUMBER;
         hash = (53 * hash) + getNamesList().hashCode();
       }
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -15834,20 +17947,24 @@ java.lang.String defaultValue) {
 
       // Construct using com.iamteer.Wcf.DbNames.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
-        names_ =
-            com.google.protobuf.LazyStringArrayList.emptyList();
+        names_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+        bitField0_ = (bitField0_ & ~0x00000001);
         return this;
       }
 
@@ -15874,19 +17991,48 @@ java.lang.String defaultValue) {
       @java.lang.Override
       public com.iamteer.Wcf.DbNames buildPartial() {
         com.iamteer.Wcf.DbNames result = new com.iamteer.Wcf.DbNames(this);
-        if (bitField0_ != 0) { buildPartial0(result); }
+        int from_bitField0_ = bitField0_;
+        if (((bitField0_ & 0x00000001) != 0)) {
+          names_ = names_.getUnmodifiableView();
+          bitField0_ = (bitField0_ & ~0x00000001);
+        }
+        result.names_ = names_;
         onBuilt();
         return result;
       }
 
-      private void buildPartial0(com.iamteer.Wcf.DbNames result) {
-        int from_bitField0_ = bitField0_;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          names_.makeImmutable();
-          result.names_ = names_;
-        }
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
       }
-
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.iamteer.Wcf.DbNames) {
@@ -15902,14 +18048,14 @@ java.lang.String defaultValue) {
         if (!other.names_.isEmpty()) {
           if (names_.isEmpty()) {
             names_ = other.names_;
-            bitField0_ |= 0x00000001;
+            bitField0_ = (bitField0_ & ~0x00000001);
           } else {
             ensureNamesIsMutable();
             names_.addAll(other.names_);
           }
           onChanged();
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -15924,47 +18070,27 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        com.iamteer.Wcf.DbNames parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 10: {
-                java.lang.String s = input.readStringRequireUtf8();
-                ensureNamesIsMutable();
-                names_.add(s);
-                break;
-              } // case 10
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.iamteer.Wcf.DbNames) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
       private int bitField0_;
 
-      private com.google.protobuf.LazyStringArrayList names_ =
-          com.google.protobuf.LazyStringArrayList.emptyList();
+      private com.google.protobuf.LazyStringList names_ = com.google.protobuf.LazyStringArrayList.EMPTY;
       private void ensureNamesIsMutable() {
-        if (!names_.isModifiable()) {
+        if (!((bitField0_ & 0x00000001) != 0)) {
           names_ = new com.google.protobuf.LazyStringArrayList(names_);
-        }
-        bitField0_ |= 0x00000001;
+          bitField0_ |= 0x00000001;
+         }
       }
       /**
        * repeated string names = 1;
@@ -15972,8 +18098,7 @@ java.lang.String defaultValue) {
        */
       public com.google.protobuf.ProtocolStringList
           getNamesList() {
-        names_.makeImmutable();
-        return names_;
+        return names_.getUnmodifiableView();
       }
       /**
        * repeated string names = 1;
@@ -16007,10 +18132,11 @@ java.lang.String defaultValue) {
        */
       public Builder setNames(
           int index, java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
-        ensureNamesIsMutable();
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  ensureNamesIsMutable();
         names_.set(index, value);
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -16021,10 +18147,11 @@ java.lang.String defaultValue) {
        */
       public Builder addNames(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
-        ensureNamesIsMutable();
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  ensureNamesIsMutable();
         names_.add(value);
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -16038,7 +18165,6 @@ java.lang.String defaultValue) {
         ensureNamesIsMutable();
         com.google.protobuf.AbstractMessageLite.Builder.addAll(
             values, names_);
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -16047,9 +18173,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearNames() {
-        names_ =
-          com.google.protobuf.LazyStringArrayList.emptyList();
-        bitField0_ = (bitField0_ & ~0x00000001);;
+        names_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+        bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
@@ -16060,11 +18185,12 @@ java.lang.String defaultValue) {
        */
       public Builder addNamesBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
         ensureNamesIsMutable();
         names_.add(value);
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -16101,18 +18227,7 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        Builder builder = newBuilder();
-        try {
-          builder.mergeFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          throw e.setUnfinishedMessage(builder.buildPartial());
-        } catch (com.google.protobuf.UninitializedMessageException e) {
-          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
-        } catch (java.io.IOException e) {
-          throw new com.google.protobuf.InvalidProtocolBufferException(e)
-              .setUnfinishedMessage(builder.buildPartial());
-        }
-        return builder.buildPartial();
+        return new DbNames(input, extensionRegistry);
       }
     };
 
@@ -16200,6 +18315,60 @@ java.lang.String defaultValue) {
       return new DbTable();
     }
 
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return this.unknownFields;
+    }
+    private DbTable(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              name_ = s;
+              break;
+            }
+            case 18: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              sql_ = s;
+              break;
+            }
+            default: {
+              if (!parseUnknownField(
+                  input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e).setUnfinishedMessage(this);
+      } finally {
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return com.iamteer.Wcf.internal_static_wcf_DbTable_descriptor;
@@ -16214,8 +18383,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int NAME_FIELD_NUMBER = 1;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object name_ = "";
+    private volatile java.lang.Object name_;
     /**
      * 
      * 表名
@@ -16261,8 +18429,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int SQL_FIELD_NUMBER = 2;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object sql_ = "";
+    private volatile java.lang.Object sql_;
     /**
      * 
      * 建表 SQL
@@ -16327,7 +18494,7 @@ java.lang.String defaultValue) {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sql_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sql_);
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -16342,7 +18509,7 @@ java.lang.String defaultValue) {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sql_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sql_);
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -16361,7 +18528,7 @@ java.lang.String defaultValue) {
           .equals(other.getName())) return false;
       if (!getSql()
           .equals(other.getSql())) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -16376,7 +18543,7 @@ java.lang.String defaultValue) {
       hash = (53 * hash) + getName().hashCode();
       hash = (37 * hash) + SQL_FIELD_NUMBER;
       hash = (53 * hash) + getSql().hashCode();
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -16493,20 +18660,26 @@ java.lang.String defaultValue) {
 
       // Construct using com.iamteer.Wcf.DbTable.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         name_ = "";
+
         sql_ = "";
+
         return this;
       }
 
@@ -16533,21 +18706,44 @@ java.lang.String defaultValue) {
       @java.lang.Override
       public com.iamteer.Wcf.DbTable buildPartial() {
         com.iamteer.Wcf.DbTable result = new com.iamteer.Wcf.DbTable(this);
-        if (bitField0_ != 0) { buildPartial0(result); }
+        result.name_ = name_;
+        result.sql_ = sql_;
         onBuilt();
         return result;
       }
 
-      private void buildPartial0(com.iamteer.Wcf.DbTable result) {
-        int from_bitField0_ = bitField0_;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          result.name_ = name_;
-        }
-        if (((from_bitField0_ & 0x00000002) != 0)) {
-          result.sql_ = sql_;
-        }
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
       }
-
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.iamteer.Wcf.DbTable) {
@@ -16562,15 +18758,13 @@ java.lang.String defaultValue) {
         if (other == com.iamteer.Wcf.DbTable.getDefaultInstance()) return this;
         if (!other.getName().isEmpty()) {
           name_ = other.name_;
-          bitField0_ |= 0x00000001;
           onChanged();
         }
         if (!other.getSql().isEmpty()) {
           sql_ = other.sql_;
-          bitField0_ |= 0x00000002;
           onChanged();
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -16585,43 +18779,19 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        com.iamteer.Wcf.DbTable parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 10: {
-                name_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 10
-              case 18: {
-                sql_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000002;
-                break;
-              } // case 18
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.iamteer.Wcf.DbTable) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
-      private int bitField0_;
 
       private java.lang.Object name_ = "";
       /**
@@ -16676,9 +18846,11 @@ java.lang.String defaultValue) {
        */
       public Builder setName(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         name_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -16691,8 +18863,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearName() {
+        
         name_ = getDefaultInstance().getName();
-        bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
@@ -16707,10 +18879,12 @@ java.lang.String defaultValue) {
        */
       public Builder setNameBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         name_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -16768,9 +18942,11 @@ java.lang.String defaultValue) {
        */
       public Builder setSql(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         sql_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -16783,8 +18959,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearSql() {
+        
         sql_ = getDefaultInstance().getSql();
-        bitField0_ = (bitField0_ & ~0x00000002);
         onChanged();
         return this;
       }
@@ -16799,10 +18975,12 @@ java.lang.String defaultValue) {
        */
       public Builder setSqlBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         sql_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -16839,18 +19017,7 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        Builder builder = newBuilder();
-        try {
-          builder.mergeFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          throw e.setUnfinishedMessage(builder.buildPartial());
-        } catch (com.google.protobuf.UninitializedMessageException e) {
-          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
-        } catch (java.io.IOException e) {
-          throw new com.google.protobuf.InvalidProtocolBufferException(e)
-              .setUnfinishedMessage(builder.buildPartial());
-        }
-        return builder.buildPartial();
+        return new DbTable(input, extensionRegistry);
       }
     };
 
@@ -16921,6 +19088,61 @@ java.lang.String defaultValue) {
       return new DbTables();
     }
 
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return this.unknownFields;
+    }
+    private DbTables(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10: {
+              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+                tables_ = new java.util.ArrayList();
+                mutable_bitField0_ |= 0x00000001;
+              }
+              tables_.add(
+                  input.readMessage(com.iamteer.Wcf.DbTable.parser(), extensionRegistry));
+              break;
+            }
+            default: {
+              if (!parseUnknownField(
+                  input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e).setUnfinishedMessage(this);
+      } finally {
+        if (((mutable_bitField0_ & 0x00000001) != 0)) {
+          tables_ = java.util.Collections.unmodifiableList(tables_);
+        }
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return com.iamteer.Wcf.internal_static_wcf_DbTables_descriptor;
@@ -16935,7 +19157,6 @@ java.lang.String defaultValue) {
     }
 
     public static final int TABLES_FIELD_NUMBER = 1;
-    @SuppressWarnings("serial")
     private java.util.List tables_;
     /**
      * repeated .wcf.DbTable tables = 1;
@@ -16992,7 +19213,7 @@ java.lang.String defaultValue) {
       for (int i = 0; i < tables_.size(); i++) {
         output.writeMessage(1, tables_.get(i));
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -17005,7 +19226,7 @@ java.lang.String defaultValue) {
         size += com.google.protobuf.CodedOutputStream
           .computeMessageSize(1, tables_.get(i));
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -17022,7 +19243,7 @@ java.lang.String defaultValue) {
 
       if (!getTablesList()
           .equals(other.getTablesList())) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -17037,7 +19258,7 @@ java.lang.String defaultValue) {
         hash = (37 * hash) + TABLES_FIELD_NUMBER;
         hash = (53 * hash) + getTablesList().hashCode();
       }
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -17154,25 +19375,29 @@ java.lang.String defaultValue) {
 
       // Construct using com.iamteer.Wcf.DbTables.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+          getTablesFieldBuilder();
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         if (tablesBuilder_ == null) {
           tables_ = java.util.Collections.emptyList();
+          bitField0_ = (bitField0_ & ~0x00000001);
         } else {
-          tables_ = null;
           tablesBuilder_.clear();
         }
-        bitField0_ = (bitField0_ & ~0x00000001);
         return this;
       }
 
@@ -17199,13 +19424,7 @@ java.lang.String defaultValue) {
       @java.lang.Override
       public com.iamteer.Wcf.DbTables buildPartial() {
         com.iamteer.Wcf.DbTables result = new com.iamteer.Wcf.DbTables(this);
-        buildPartialRepeatedFields(result);
-        if (bitField0_ != 0) { buildPartial0(result); }
-        onBuilt();
-        return result;
-      }
-
-      private void buildPartialRepeatedFields(com.iamteer.Wcf.DbTables result) {
+        int from_bitField0_ = bitField0_;
         if (tablesBuilder_ == null) {
           if (((bitField0_ & 0x00000001) != 0)) {
             tables_ = java.util.Collections.unmodifiableList(tables_);
@@ -17215,12 +19434,42 @@ java.lang.String defaultValue) {
         } else {
           result.tables_ = tablesBuilder_.build();
         }
+        onBuilt();
+        return result;
       }
 
-      private void buildPartial0(com.iamteer.Wcf.DbTables result) {
-        int from_bitField0_ = bitField0_;
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
       }
-
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.iamteer.Wcf.DbTables) {
@@ -17259,7 +19508,7 @@ java.lang.String defaultValue) {
             }
           }
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -17274,43 +19523,17 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        com.iamteer.Wcf.DbTables parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 10: {
-                com.iamteer.Wcf.DbTable m =
-                    input.readMessage(
-                        com.iamteer.Wcf.DbTable.parser(),
-                        extensionRegistry);
-                if (tablesBuilder_ == null) {
-                  ensureTablesIsMutable();
-                  tables_.add(m);
-                } else {
-                  tablesBuilder_.addMessage(m);
-                }
-                break;
-              } // case 10
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.iamteer.Wcf.DbTables) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
       private int bitField0_;
@@ -17587,18 +19810,7 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        Builder builder = newBuilder();
-        try {
-          builder.mergeFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          throw e.setUnfinishedMessage(builder.buildPartial());
-        } catch (com.google.protobuf.UninitializedMessageException e) {
-          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
-        } catch (java.io.IOException e) {
-          throw new com.google.protobuf.InvalidProtocolBufferException(e)
-              .setUnfinishedMessage(builder.buildPartial());
-        }
-        return builder.buildPartial();
+        return new DbTables(input, extensionRegistry);
       }
     };
 
@@ -17686,6 +19898,60 @@ java.lang.String defaultValue) {
       return new DbQuery();
     }
 
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return this.unknownFields;
+    }
+    private DbQuery(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              db_ = s;
+              break;
+            }
+            case 18: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              sql_ = s;
+              break;
+            }
+            default: {
+              if (!parseUnknownField(
+                  input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e).setUnfinishedMessage(this);
+      } finally {
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return com.iamteer.Wcf.internal_static_wcf_DbQuery_descriptor;
@@ -17700,8 +19966,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int DB_FIELD_NUMBER = 1;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object db_ = "";
+    private volatile java.lang.Object db_;
     /**
      * 
      * 目标数据库
@@ -17747,8 +20012,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int SQL_FIELD_NUMBER = 2;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object sql_ = "";
+    private volatile java.lang.Object sql_;
     /**
      * 
      * 查询 SQL
@@ -17813,7 +20077,7 @@ java.lang.String defaultValue) {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sql_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sql_);
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -17828,7 +20092,7 @@ java.lang.String defaultValue) {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sql_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sql_);
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -17847,7 +20111,7 @@ java.lang.String defaultValue) {
           .equals(other.getDb())) return false;
       if (!getSql()
           .equals(other.getSql())) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -17862,7 +20126,7 @@ java.lang.String defaultValue) {
       hash = (53 * hash) + getDb().hashCode();
       hash = (37 * hash) + SQL_FIELD_NUMBER;
       hash = (53 * hash) + getSql().hashCode();
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -17979,20 +20243,26 @@ java.lang.String defaultValue) {
 
       // Construct using com.iamteer.Wcf.DbQuery.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         db_ = "";
+
         sql_ = "";
+
         return this;
       }
 
@@ -18019,21 +20289,44 @@ java.lang.String defaultValue) {
       @java.lang.Override
       public com.iamteer.Wcf.DbQuery buildPartial() {
         com.iamteer.Wcf.DbQuery result = new com.iamteer.Wcf.DbQuery(this);
-        if (bitField0_ != 0) { buildPartial0(result); }
+        result.db_ = db_;
+        result.sql_ = sql_;
         onBuilt();
         return result;
       }
 
-      private void buildPartial0(com.iamteer.Wcf.DbQuery result) {
-        int from_bitField0_ = bitField0_;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          result.db_ = db_;
-        }
-        if (((from_bitField0_ & 0x00000002) != 0)) {
-          result.sql_ = sql_;
-        }
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
       }
-
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.iamteer.Wcf.DbQuery) {
@@ -18048,15 +20341,13 @@ java.lang.String defaultValue) {
         if (other == com.iamteer.Wcf.DbQuery.getDefaultInstance()) return this;
         if (!other.getDb().isEmpty()) {
           db_ = other.db_;
-          bitField0_ |= 0x00000001;
           onChanged();
         }
         if (!other.getSql().isEmpty()) {
           sql_ = other.sql_;
-          bitField0_ |= 0x00000002;
           onChanged();
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -18071,43 +20362,19 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        com.iamteer.Wcf.DbQuery parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 10: {
-                db_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 10
-              case 18: {
-                sql_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000002;
-                break;
-              } // case 18
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.iamteer.Wcf.DbQuery) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
-      private int bitField0_;
 
       private java.lang.Object db_ = "";
       /**
@@ -18162,9 +20429,11 @@ java.lang.String defaultValue) {
        */
       public Builder setDb(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         db_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -18177,8 +20446,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearDb() {
+        
         db_ = getDefaultInstance().getDb();
-        bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
@@ -18193,10 +20462,12 @@ java.lang.String defaultValue) {
        */
       public Builder setDbBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         db_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -18254,9 +20525,11 @@ java.lang.String defaultValue) {
        */
       public Builder setSql(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         sql_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -18269,8 +20542,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearSql() {
+        
         sql_ = getDefaultInstance().getSql();
-        bitField0_ = (bitField0_ & ~0x00000002);
         onChanged();
         return this;
       }
@@ -18285,10 +20558,12 @@ java.lang.String defaultValue) {
        */
       public Builder setSqlBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         sql_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -18325,18 +20600,7 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        Builder builder = newBuilder();
-        try {
-          builder.mergeFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          throw e.setUnfinishedMessage(builder.buildPartial());
-        } catch (com.google.protobuf.UninitializedMessageException e) {
-          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
-        } catch (java.io.IOException e) {
-          throw new com.google.protobuf.InvalidProtocolBufferException(e)
-              .setUnfinishedMessage(builder.buildPartial());
-        }
-        return builder.buildPartial();
+        return new DbQuery(input, extensionRegistry);
       }
     };
 
@@ -18424,6 +20688,64 @@ java.lang.String defaultValue) {
       return new DbField();
     }
 
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return this.unknownFields;
+    }
+    private DbField(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 8: {
+
+              type_ = input.readInt32();
+              break;
+            }
+            case 18: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              column_ = s;
+              break;
+            }
+            case 26: {
+
+              content_ = input.readBytes();
+              break;
+            }
+            default: {
+              if (!parseUnknownField(
+                  input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e).setUnfinishedMessage(this);
+      } finally {
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return com.iamteer.Wcf.internal_static_wcf_DbField_descriptor;
@@ -18438,7 +20760,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int TYPE_FIELD_NUMBER = 1;
-    private int type_ = 0;
+    private int type_;
     /**
      * 
      * 字段类型
@@ -18453,8 +20775,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int COLUMN_FIELD_NUMBER = 2;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object column_ = "";
+    private volatile java.lang.Object column_;
     /**
      * 
      * 字段名称
@@ -18500,7 +20821,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int CONTENT_FIELD_NUMBER = 3;
-    private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY;
+    private com.google.protobuf.ByteString content_;
     /**
      * 
      * 字段内容
@@ -18537,7 +20858,7 @@ java.lang.String defaultValue) {
       if (!content_.isEmpty()) {
         output.writeBytes(3, content_);
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -18557,7 +20878,7 @@ java.lang.String defaultValue) {
         size += com.google.protobuf.CodedOutputStream
           .computeBytesSize(3, content_);
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -18578,7 +20899,7 @@ java.lang.String defaultValue) {
           .equals(other.getColumn())) return false;
       if (!getContent()
           .equals(other.getContent())) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -18595,7 +20916,7 @@ java.lang.String defaultValue) {
       hash = (53 * hash) + getColumn().hashCode();
       hash = (37 * hash) + CONTENT_FIELD_NUMBER;
       hash = (53 * hash) + getContent().hashCode();
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -18712,21 +21033,28 @@ java.lang.String defaultValue) {
 
       // Construct using com.iamteer.Wcf.DbField.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         type_ = 0;
+
         column_ = "";
+
         content_ = com.google.protobuf.ByteString.EMPTY;
+
         return this;
       }
 
@@ -18753,24 +21081,45 @@ java.lang.String defaultValue) {
       @java.lang.Override
       public com.iamteer.Wcf.DbField buildPartial() {
         com.iamteer.Wcf.DbField result = new com.iamteer.Wcf.DbField(this);
-        if (bitField0_ != 0) { buildPartial0(result); }
+        result.type_ = type_;
+        result.column_ = column_;
+        result.content_ = content_;
         onBuilt();
         return result;
       }
 
-      private void buildPartial0(com.iamteer.Wcf.DbField result) {
-        int from_bitField0_ = bitField0_;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          result.type_ = type_;
-        }
-        if (((from_bitField0_ & 0x00000002) != 0)) {
-          result.column_ = column_;
-        }
-        if (((from_bitField0_ & 0x00000004) != 0)) {
-          result.content_ = content_;
-        }
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
       }
-
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.iamteer.Wcf.DbField) {
@@ -18788,13 +21137,12 @@ java.lang.String defaultValue) {
         }
         if (!other.getColumn().isEmpty()) {
           column_ = other.column_;
-          bitField0_ |= 0x00000002;
           onChanged();
         }
         if (other.getContent() != com.google.protobuf.ByteString.EMPTY) {
           setContent(other.getContent());
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -18809,48 +21157,19 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        com.iamteer.Wcf.DbField parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 8: {
-                type_ = input.readInt32();
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 8
-              case 18: {
-                column_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000002;
-                break;
-              } // case 18
-              case 26: {
-                content_ = input.readBytes();
-                bitField0_ |= 0x00000004;
-                break;
-              } // case 26
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.iamteer.Wcf.DbField) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
-      private int bitField0_;
 
       private int type_ ;
       /**
@@ -18875,9 +21194,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder setType(int value) {
-
+        
         type_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -18890,7 +21208,7 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearType() {
-        bitField0_ = (bitField0_ & ~0x00000001);
+        
         type_ = 0;
         onChanged();
         return this;
@@ -18949,9 +21267,11 @@ java.lang.String defaultValue) {
        */
       public Builder setColumn(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         column_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -18964,8 +21284,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearColumn() {
+        
         column_ = getDefaultInstance().getColumn();
-        bitField0_ = (bitField0_ & ~0x00000002);
         onChanged();
         return this;
       }
@@ -18980,10 +21300,12 @@ java.lang.String defaultValue) {
        */
       public Builder setColumnBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         column_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -19011,9 +21333,11 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder setContent(com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         content_ = value;
-        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -19026,7 +21350,7 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearContent() {
-        bitField0_ = (bitField0_ & ~0x00000004);
+        
         content_ = getDefaultInstance().getContent();
         onChanged();
         return this;
@@ -19064,18 +21388,7 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        Builder builder = newBuilder();
-        try {
-          builder.mergeFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          throw e.setUnfinishedMessage(builder.buildPartial());
-        } catch (com.google.protobuf.UninitializedMessageException e) {
-          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
-        } catch (java.io.IOException e) {
-          throw new com.google.protobuf.InvalidProtocolBufferException(e)
-              .setUnfinishedMessage(builder.buildPartial());
-        }
-        return builder.buildPartial();
+        return new DbField(input, extensionRegistry);
       }
     };
 
@@ -19146,6 +21459,61 @@ java.lang.String defaultValue) {
       return new DbRow();
     }
 
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return this.unknownFields;
+    }
+    private DbRow(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10: {
+              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+                fields_ = new java.util.ArrayList();
+                mutable_bitField0_ |= 0x00000001;
+              }
+              fields_.add(
+                  input.readMessage(com.iamteer.Wcf.DbField.parser(), extensionRegistry));
+              break;
+            }
+            default: {
+              if (!parseUnknownField(
+                  input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e).setUnfinishedMessage(this);
+      } finally {
+        if (((mutable_bitField0_ & 0x00000001) != 0)) {
+          fields_ = java.util.Collections.unmodifiableList(fields_);
+        }
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return com.iamteer.Wcf.internal_static_wcf_DbRow_descriptor;
@@ -19160,7 +21528,6 @@ java.lang.String defaultValue) {
     }
 
     public static final int FIELDS_FIELD_NUMBER = 1;
-    @SuppressWarnings("serial")
     private java.util.List fields_;
     /**
      * repeated .wcf.DbField fields = 1;
@@ -19217,7 +21584,7 @@ java.lang.String defaultValue) {
       for (int i = 0; i < fields_.size(); i++) {
         output.writeMessage(1, fields_.get(i));
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -19230,7 +21597,7 @@ java.lang.String defaultValue) {
         size += com.google.protobuf.CodedOutputStream
           .computeMessageSize(1, fields_.get(i));
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -19247,7 +21614,7 @@ java.lang.String defaultValue) {
 
       if (!getFieldsList()
           .equals(other.getFieldsList())) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -19262,7 +21629,7 @@ java.lang.String defaultValue) {
         hash = (37 * hash) + FIELDS_FIELD_NUMBER;
         hash = (53 * hash) + getFieldsList().hashCode();
       }
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -19379,25 +21746,29 @@ java.lang.String defaultValue) {
 
       // Construct using com.iamteer.Wcf.DbRow.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+          getFieldsFieldBuilder();
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         if (fieldsBuilder_ == null) {
           fields_ = java.util.Collections.emptyList();
+          bitField0_ = (bitField0_ & ~0x00000001);
         } else {
-          fields_ = null;
           fieldsBuilder_.clear();
         }
-        bitField0_ = (bitField0_ & ~0x00000001);
         return this;
       }
 
@@ -19424,13 +21795,7 @@ java.lang.String defaultValue) {
       @java.lang.Override
       public com.iamteer.Wcf.DbRow buildPartial() {
         com.iamteer.Wcf.DbRow result = new com.iamteer.Wcf.DbRow(this);
-        buildPartialRepeatedFields(result);
-        if (bitField0_ != 0) { buildPartial0(result); }
-        onBuilt();
-        return result;
-      }
-
-      private void buildPartialRepeatedFields(com.iamteer.Wcf.DbRow result) {
+        int from_bitField0_ = bitField0_;
         if (fieldsBuilder_ == null) {
           if (((bitField0_ & 0x00000001) != 0)) {
             fields_ = java.util.Collections.unmodifiableList(fields_);
@@ -19440,12 +21805,42 @@ java.lang.String defaultValue) {
         } else {
           result.fields_ = fieldsBuilder_.build();
         }
+        onBuilt();
+        return result;
       }
 
-      private void buildPartial0(com.iamteer.Wcf.DbRow result) {
-        int from_bitField0_ = bitField0_;
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
       }
-
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.iamteer.Wcf.DbRow) {
@@ -19484,7 +21879,7 @@ java.lang.String defaultValue) {
             }
           }
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -19499,43 +21894,17 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        com.iamteer.Wcf.DbRow parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 10: {
-                com.iamteer.Wcf.DbField m =
-                    input.readMessage(
-                        com.iamteer.Wcf.DbField.parser(),
-                        extensionRegistry);
-                if (fieldsBuilder_ == null) {
-                  ensureFieldsIsMutable();
-                  fields_.add(m);
-                } else {
-                  fieldsBuilder_.addMessage(m);
-                }
-                break;
-              } // case 10
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.iamteer.Wcf.DbRow) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
       private int bitField0_;
@@ -19812,18 +22181,7 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        Builder builder = newBuilder();
-        try {
-          builder.mergeFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          throw e.setUnfinishedMessage(builder.buildPartial());
-        } catch (com.google.protobuf.UninitializedMessageException e) {
-          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
-        } catch (java.io.IOException e) {
-          throw new com.google.protobuf.InvalidProtocolBufferException(e)
-              .setUnfinishedMessage(builder.buildPartial());
-        }
-        return builder.buildPartial();
+        return new DbRow(input, extensionRegistry);
       }
     };
 
@@ -19894,6 +22252,61 @@ java.lang.String defaultValue) {
       return new DbRows();
     }
 
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return this.unknownFields;
+    }
+    private DbRows(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10: {
+              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+                rows_ = new java.util.ArrayList();
+                mutable_bitField0_ |= 0x00000001;
+              }
+              rows_.add(
+                  input.readMessage(com.iamteer.Wcf.DbRow.parser(), extensionRegistry));
+              break;
+            }
+            default: {
+              if (!parseUnknownField(
+                  input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e).setUnfinishedMessage(this);
+      } finally {
+        if (((mutable_bitField0_ & 0x00000001) != 0)) {
+          rows_ = java.util.Collections.unmodifiableList(rows_);
+        }
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return com.iamteer.Wcf.internal_static_wcf_DbRows_descriptor;
@@ -19908,7 +22321,6 @@ java.lang.String defaultValue) {
     }
 
     public static final int ROWS_FIELD_NUMBER = 1;
-    @SuppressWarnings("serial")
     private java.util.List rows_;
     /**
      * repeated .wcf.DbRow rows = 1;
@@ -19965,7 +22377,7 @@ java.lang.String defaultValue) {
       for (int i = 0; i < rows_.size(); i++) {
         output.writeMessage(1, rows_.get(i));
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -19978,7 +22390,7 @@ java.lang.String defaultValue) {
         size += com.google.protobuf.CodedOutputStream
           .computeMessageSize(1, rows_.get(i));
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -19995,7 +22407,7 @@ java.lang.String defaultValue) {
 
       if (!getRowsList()
           .equals(other.getRowsList())) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -20010,7 +22422,7 @@ java.lang.String defaultValue) {
         hash = (37 * hash) + ROWS_FIELD_NUMBER;
         hash = (53 * hash) + getRowsList().hashCode();
       }
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -20127,25 +22539,29 @@ java.lang.String defaultValue) {
 
       // Construct using com.iamteer.Wcf.DbRows.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+          getRowsFieldBuilder();
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         if (rowsBuilder_ == null) {
           rows_ = java.util.Collections.emptyList();
+          bitField0_ = (bitField0_ & ~0x00000001);
         } else {
-          rows_ = null;
           rowsBuilder_.clear();
         }
-        bitField0_ = (bitField0_ & ~0x00000001);
         return this;
       }
 
@@ -20172,13 +22588,7 @@ java.lang.String defaultValue) {
       @java.lang.Override
       public com.iamteer.Wcf.DbRows buildPartial() {
         com.iamteer.Wcf.DbRows result = new com.iamteer.Wcf.DbRows(this);
-        buildPartialRepeatedFields(result);
-        if (bitField0_ != 0) { buildPartial0(result); }
-        onBuilt();
-        return result;
-      }
-
-      private void buildPartialRepeatedFields(com.iamteer.Wcf.DbRows result) {
+        int from_bitField0_ = bitField0_;
         if (rowsBuilder_ == null) {
           if (((bitField0_ & 0x00000001) != 0)) {
             rows_ = java.util.Collections.unmodifiableList(rows_);
@@ -20188,12 +22598,42 @@ java.lang.String defaultValue) {
         } else {
           result.rows_ = rowsBuilder_.build();
         }
+        onBuilt();
+        return result;
       }
 
-      private void buildPartial0(com.iamteer.Wcf.DbRows result) {
-        int from_bitField0_ = bitField0_;
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
       }
-
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.iamteer.Wcf.DbRows) {
@@ -20232,7 +22672,7 @@ java.lang.String defaultValue) {
             }
           }
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -20247,43 +22687,17 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        com.iamteer.Wcf.DbRows parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 10: {
-                com.iamteer.Wcf.DbRow m =
-                    input.readMessage(
-                        com.iamteer.Wcf.DbRow.parser(),
-                        extensionRegistry);
-                if (rowsBuilder_ == null) {
-                  ensureRowsIsMutable();
-                  rows_.add(m);
-                } else {
-                  rowsBuilder_.addMessage(m);
-                }
-                break;
-              } // case 10
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.iamteer.Wcf.DbRows) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
       private int bitField0_;
@@ -20560,18 +22974,7 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        Builder builder = newBuilder();
-        try {
-          builder.mergeFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          throw e.setUnfinishedMessage(builder.buildPartial());
-        } catch (com.google.protobuf.UninitializedMessageException e) {
-          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
-        } catch (java.io.IOException e) {
-          throw new com.google.protobuf.InvalidProtocolBufferException(e)
-              .setUnfinishedMessage(builder.buildPartial());
-        }
-        return builder.buildPartial();
+        return new DbRows(input, extensionRegistry);
       }
     };
 
@@ -20669,6 +23072,65 @@ java.lang.String defaultValue) {
       return new Verification();
     }
 
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return this.unknownFields;
+    }
+    private Verification(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              v3_ = s;
+              break;
+            }
+            case 18: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              v4_ = s;
+              break;
+            }
+            case 24: {
+
+              scene_ = input.readInt32();
+              break;
+            }
+            default: {
+              if (!parseUnknownField(
+                  input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e).setUnfinishedMessage(this);
+      } finally {
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return com.iamteer.Wcf.internal_static_wcf_Verification_descriptor;
@@ -20683,8 +23145,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int V3_FIELD_NUMBER = 1;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object v3_ = "";
+    private volatile java.lang.Object v3_;
     /**
      * 
      * 加密的用户名
@@ -20730,8 +23191,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int V4_FIELD_NUMBER = 2;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object v4_ = "";
+    private volatile java.lang.Object v4_;
     /**
      * 
      * Ticket
@@ -20777,7 +23237,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int SCENE_FIELD_NUMBER = 3;
-    private int scene_ = 0;
+    private int scene_;
     /**
      * 
      * 添加方式:17 名片,30 扫码
@@ -20814,7 +23274,7 @@ java.lang.String defaultValue) {
       if (scene_ != 0) {
         output.writeInt32(3, scene_);
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -20833,7 +23293,7 @@ java.lang.String defaultValue) {
         size += com.google.protobuf.CodedOutputStream
           .computeInt32Size(3, scene_);
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -20854,7 +23314,7 @@ java.lang.String defaultValue) {
           .equals(other.getV4())) return false;
       if (getScene()
           != other.getScene()) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -20871,7 +23331,7 @@ java.lang.String defaultValue) {
       hash = (53 * hash) + getV4().hashCode();
       hash = (37 * hash) + SCENE_FIELD_NUMBER;
       hash = (53 * hash) + getScene();
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -20988,21 +23448,28 @@ java.lang.String defaultValue) {
 
       // Construct using com.iamteer.Wcf.Verification.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         v3_ = "";
+
         v4_ = "";
+
         scene_ = 0;
+
         return this;
       }
 
@@ -21029,24 +23496,45 @@ java.lang.String defaultValue) {
       @java.lang.Override
       public com.iamteer.Wcf.Verification buildPartial() {
         com.iamteer.Wcf.Verification result = new com.iamteer.Wcf.Verification(this);
-        if (bitField0_ != 0) { buildPartial0(result); }
+        result.v3_ = v3_;
+        result.v4_ = v4_;
+        result.scene_ = scene_;
         onBuilt();
         return result;
       }
 
-      private void buildPartial0(com.iamteer.Wcf.Verification result) {
-        int from_bitField0_ = bitField0_;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          result.v3_ = v3_;
-        }
-        if (((from_bitField0_ & 0x00000002) != 0)) {
-          result.v4_ = v4_;
-        }
-        if (((from_bitField0_ & 0x00000004) != 0)) {
-          result.scene_ = scene_;
-        }
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
       }
-
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.iamteer.Wcf.Verification) {
@@ -21061,18 +23549,16 @@ java.lang.String defaultValue) {
         if (other == com.iamteer.Wcf.Verification.getDefaultInstance()) return this;
         if (!other.getV3().isEmpty()) {
           v3_ = other.v3_;
-          bitField0_ |= 0x00000001;
           onChanged();
         }
         if (!other.getV4().isEmpty()) {
           v4_ = other.v4_;
-          bitField0_ |= 0x00000002;
           onChanged();
         }
         if (other.getScene() != 0) {
           setScene(other.getScene());
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -21087,48 +23573,19 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        com.iamteer.Wcf.Verification parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 10: {
-                v3_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 10
-              case 18: {
-                v4_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000002;
-                break;
-              } // case 18
-              case 24: {
-                scene_ = input.readInt32();
-                bitField0_ |= 0x00000004;
-                break;
-              } // case 24
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.iamteer.Wcf.Verification) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
-      private int bitField0_;
 
       private java.lang.Object v3_ = "";
       /**
@@ -21183,9 +23640,11 @@ java.lang.String defaultValue) {
        */
       public Builder setV3(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         v3_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -21198,8 +23657,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearV3() {
+        
         v3_ = getDefaultInstance().getV3();
-        bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
@@ -21214,10 +23673,12 @@ java.lang.String defaultValue) {
        */
       public Builder setV3Bytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         v3_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -21275,9 +23736,11 @@ java.lang.String defaultValue) {
        */
       public Builder setV4(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         v4_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -21290,8 +23753,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearV4() {
+        
         v4_ = getDefaultInstance().getV4();
-        bitField0_ = (bitField0_ & ~0x00000002);
         onChanged();
         return this;
       }
@@ -21306,10 +23769,12 @@ java.lang.String defaultValue) {
        */
       public Builder setV4Bytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         v4_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -21337,9 +23802,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder setScene(int value) {
-
+        
         scene_ = value;
-        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -21352,7 +23816,7 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearScene() {
-        bitField0_ = (bitField0_ & ~0x00000004);
+        
         scene_ = 0;
         onChanged();
         return this;
@@ -21390,18 +23854,7 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        Builder builder = newBuilder();
-        try {
-          builder.mergeFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          throw e.setUnfinishedMessage(builder.buildPartial());
-        } catch (com.google.protobuf.UninitializedMessageException e) {
-          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
-        } catch (java.io.IOException e) {
-          throw new com.google.protobuf.InvalidProtocolBufferException(e)
-              .setUnfinishedMessage(builder.buildPartial());
-        }
-        return builder.buildPartial();
+        return new Verification(input, extensionRegistry);
       }
     };
 
@@ -21489,6 +23942,60 @@ java.lang.String defaultValue) {
       return new MemberMgmt();
     }
 
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return this.unknownFields;
+    }
+    private MemberMgmt(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              roomid_ = s;
+              break;
+            }
+            case 18: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              wxids_ = s;
+              break;
+            }
+            default: {
+              if (!parseUnknownField(
+                  input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e).setUnfinishedMessage(this);
+      } finally {
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return com.iamteer.Wcf.internal_static_wcf_MemberMgmt_descriptor;
@@ -21503,8 +24010,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int ROOMID_FIELD_NUMBER = 1;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object roomid_ = "";
+    private volatile java.lang.Object roomid_;
     /**
      * 
      * 要加的群ID
@@ -21550,8 +24056,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int WXIDS_FIELD_NUMBER = 2;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object wxids_ = "";
+    private volatile java.lang.Object wxids_;
     /**
      * 
      * 要加群的人列表,逗号分隔
@@ -21616,7 +24121,7 @@ java.lang.String defaultValue) {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(wxids_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 2, wxids_);
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -21631,7 +24136,7 @@ java.lang.String defaultValue) {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(wxids_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, wxids_);
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -21650,7 +24155,7 @@ java.lang.String defaultValue) {
           .equals(other.getRoomid())) return false;
       if (!getWxids()
           .equals(other.getWxids())) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -21665,7 +24170,7 @@ java.lang.String defaultValue) {
       hash = (53 * hash) + getRoomid().hashCode();
       hash = (37 * hash) + WXIDS_FIELD_NUMBER;
       hash = (53 * hash) + getWxids().hashCode();
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -21782,20 +24287,26 @@ java.lang.String defaultValue) {
 
       // Construct using com.iamteer.Wcf.MemberMgmt.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         roomid_ = "";
+
         wxids_ = "";
+
         return this;
       }
 
@@ -21822,21 +24333,44 @@ java.lang.String defaultValue) {
       @java.lang.Override
       public com.iamteer.Wcf.MemberMgmt buildPartial() {
         com.iamteer.Wcf.MemberMgmt result = new com.iamteer.Wcf.MemberMgmt(this);
-        if (bitField0_ != 0) { buildPartial0(result); }
+        result.roomid_ = roomid_;
+        result.wxids_ = wxids_;
         onBuilt();
         return result;
       }
 
-      private void buildPartial0(com.iamteer.Wcf.MemberMgmt result) {
-        int from_bitField0_ = bitField0_;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          result.roomid_ = roomid_;
-        }
-        if (((from_bitField0_ & 0x00000002) != 0)) {
-          result.wxids_ = wxids_;
-        }
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
       }
-
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.iamteer.Wcf.MemberMgmt) {
@@ -21851,15 +24385,13 @@ java.lang.String defaultValue) {
         if (other == com.iamteer.Wcf.MemberMgmt.getDefaultInstance()) return this;
         if (!other.getRoomid().isEmpty()) {
           roomid_ = other.roomid_;
-          bitField0_ |= 0x00000001;
           onChanged();
         }
         if (!other.getWxids().isEmpty()) {
           wxids_ = other.wxids_;
-          bitField0_ |= 0x00000002;
           onChanged();
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -21874,43 +24406,19 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        com.iamteer.Wcf.MemberMgmt parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 10: {
-                roomid_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 10
-              case 18: {
-                wxids_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000002;
-                break;
-              } // case 18
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.iamteer.Wcf.MemberMgmt) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
-      private int bitField0_;
 
       private java.lang.Object roomid_ = "";
       /**
@@ -21965,9 +24473,11 @@ java.lang.String defaultValue) {
        */
       public Builder setRoomid(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         roomid_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -21980,8 +24490,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearRoomid() {
+        
         roomid_ = getDefaultInstance().getRoomid();
-        bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
@@ -21996,10 +24506,12 @@ java.lang.String defaultValue) {
        */
       public Builder setRoomidBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         roomid_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -22057,9 +24569,11 @@ java.lang.String defaultValue) {
        */
       public Builder setWxids(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         wxids_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -22072,8 +24586,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearWxids() {
+        
         wxids_ = getDefaultInstance().getWxids();
-        bitField0_ = (bitField0_ & ~0x00000002);
         onChanged();
         return this;
       }
@@ -22088,10 +24602,12 @@ java.lang.String defaultValue) {
        */
       public Builder setWxidsBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         wxids_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -22128,18 +24644,7 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        Builder builder = newBuilder();
-        try {
-          builder.mergeFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          throw e.setUnfinishedMessage(builder.buildPartial());
-        } catch (com.google.protobuf.UninitializedMessageException e) {
-          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
-        } catch (java.io.IOException e) {
-          throw new com.google.protobuf.InvalidProtocolBufferException(e)
-              .setUnfinishedMessage(builder.buildPartial());
-        }
-        return builder.buildPartial();
+        return new MemberMgmt(input, extensionRegistry);
       }
     };
 
@@ -22269,6 +24774,72 @@ java.lang.String defaultValue) {
       return new UserInfo();
     }
 
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return this.unknownFields;
+    }
+    private UserInfo(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              wxid_ = s;
+              break;
+            }
+            case 18: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              name_ = s;
+              break;
+            }
+            case 26: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              mobile_ = s;
+              break;
+            }
+            case 34: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              home_ = s;
+              break;
+            }
+            default: {
+              if (!parseUnknownField(
+                  input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e).setUnfinishedMessage(this);
+      } finally {
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return com.iamteer.Wcf.internal_static_wcf_UserInfo_descriptor;
@@ -22283,8 +24854,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int WXID_FIELD_NUMBER = 1;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object wxid_ = "";
+    private volatile java.lang.Object wxid_;
     /**
      * 
      * 微信ID
@@ -22330,8 +24900,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int NAME_FIELD_NUMBER = 2;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object name_ = "";
+    private volatile java.lang.Object name_;
     /**
      * 
      * 昵称
@@ -22377,8 +24946,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int MOBILE_FIELD_NUMBER = 3;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object mobile_ = "";
+    private volatile java.lang.Object mobile_;
     /**
      * 
      * 手机号
@@ -22424,8 +24992,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int HOME_FIELD_NUMBER = 4;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object home_ = "";
+    private volatile java.lang.Object home_;
     /**
      * 
      * 文件/图片等父路径
@@ -22496,7 +25063,7 @@ java.lang.String defaultValue) {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(home_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 4, home_);
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -22517,7 +25084,7 @@ java.lang.String defaultValue) {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(home_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, home_);
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -22540,7 +25107,7 @@ java.lang.String defaultValue) {
           .equals(other.getMobile())) return false;
       if (!getHome()
           .equals(other.getHome())) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -22559,7 +25126,7 @@ java.lang.String defaultValue) {
       hash = (53 * hash) + getMobile().hashCode();
       hash = (37 * hash) + HOME_FIELD_NUMBER;
       hash = (53 * hash) + getHome().hashCode();
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -22676,22 +25243,30 @@ java.lang.String defaultValue) {
 
       // Construct using com.iamteer.Wcf.UserInfo.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         wxid_ = "";
+
         name_ = "";
+
         mobile_ = "";
+
         home_ = "";
+
         return this;
       }
 
@@ -22718,27 +25293,46 @@ java.lang.String defaultValue) {
       @java.lang.Override
       public com.iamteer.Wcf.UserInfo buildPartial() {
         com.iamteer.Wcf.UserInfo result = new com.iamteer.Wcf.UserInfo(this);
-        if (bitField0_ != 0) { buildPartial0(result); }
+        result.wxid_ = wxid_;
+        result.name_ = name_;
+        result.mobile_ = mobile_;
+        result.home_ = home_;
         onBuilt();
         return result;
       }
 
-      private void buildPartial0(com.iamteer.Wcf.UserInfo result) {
-        int from_bitField0_ = bitField0_;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          result.wxid_ = wxid_;
-        }
-        if (((from_bitField0_ & 0x00000002) != 0)) {
-          result.name_ = name_;
-        }
-        if (((from_bitField0_ & 0x00000004) != 0)) {
-          result.mobile_ = mobile_;
-        }
-        if (((from_bitField0_ & 0x00000008) != 0)) {
-          result.home_ = home_;
-        }
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
       }
-
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.iamteer.Wcf.UserInfo) {
@@ -22753,25 +25347,21 @@ java.lang.String defaultValue) {
         if (other == com.iamteer.Wcf.UserInfo.getDefaultInstance()) return this;
         if (!other.getWxid().isEmpty()) {
           wxid_ = other.wxid_;
-          bitField0_ |= 0x00000001;
           onChanged();
         }
         if (!other.getName().isEmpty()) {
           name_ = other.name_;
-          bitField0_ |= 0x00000002;
           onChanged();
         }
         if (!other.getMobile().isEmpty()) {
           mobile_ = other.mobile_;
-          bitField0_ |= 0x00000004;
           onChanged();
         }
         if (!other.getHome().isEmpty()) {
           home_ = other.home_;
-          bitField0_ |= 0x00000008;
           onChanged();
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -22786,53 +25376,19 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        com.iamteer.Wcf.UserInfo parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 10: {
-                wxid_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 10
-              case 18: {
-                name_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000002;
-                break;
-              } // case 18
-              case 26: {
-                mobile_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000004;
-                break;
-              } // case 26
-              case 34: {
-                home_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000008;
-                break;
-              } // case 34
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.iamteer.Wcf.UserInfo) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
-      private int bitField0_;
 
       private java.lang.Object wxid_ = "";
       /**
@@ -22887,9 +25443,11 @@ java.lang.String defaultValue) {
        */
       public Builder setWxid(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         wxid_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -22902,8 +25460,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearWxid() {
+        
         wxid_ = getDefaultInstance().getWxid();
-        bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
@@ -22918,10 +25476,12 @@ java.lang.String defaultValue) {
        */
       public Builder setWxidBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         wxid_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -22979,9 +25539,11 @@ java.lang.String defaultValue) {
        */
       public Builder setName(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         name_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -22994,8 +25556,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearName() {
+        
         name_ = getDefaultInstance().getName();
-        bitField0_ = (bitField0_ & ~0x00000002);
         onChanged();
         return this;
       }
@@ -23010,10 +25572,12 @@ java.lang.String defaultValue) {
        */
       public Builder setNameBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         name_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -23071,9 +25635,11 @@ java.lang.String defaultValue) {
        */
       public Builder setMobile(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         mobile_ = value;
-        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -23086,8 +25652,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearMobile() {
+        
         mobile_ = getDefaultInstance().getMobile();
-        bitField0_ = (bitField0_ & ~0x00000004);
         onChanged();
         return this;
       }
@@ -23102,10 +25668,12 @@ java.lang.String defaultValue) {
        */
       public Builder setMobileBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         mobile_ = value;
-        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -23163,9 +25731,11 @@ java.lang.String defaultValue) {
        */
       public Builder setHome(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         home_ = value;
-        bitField0_ |= 0x00000008;
         onChanged();
         return this;
       }
@@ -23178,8 +25748,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearHome() {
+        
         home_ = getDefaultInstance().getHome();
-        bitField0_ = (bitField0_ & ~0x00000008);
         onChanged();
         return this;
       }
@@ -23194,10 +25764,12 @@ java.lang.String defaultValue) {
        */
       public Builder setHomeBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         home_ = value;
-        bitField0_ |= 0x00000008;
         onChanged();
         return this;
       }
@@ -23234,18 +25806,7 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        Builder builder = newBuilder();
-        try {
-          builder.mergeFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          throw e.setUnfinishedMessage(builder.buildPartial());
-        } catch (com.google.protobuf.UninitializedMessageException e) {
-          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
-        } catch (java.io.IOException e) {
-          throw new com.google.protobuf.InvalidProtocolBufferException(e)
-              .setUnfinishedMessage(builder.buildPartial());
-        }
-        return builder.buildPartial();
+        return new UserInfo(input, extensionRegistry);
       }
     };
 
@@ -23333,6 +25894,60 @@ java.lang.String defaultValue) {
       return new DecPath();
     }
 
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return this.unknownFields;
+    }
+    private DecPath(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              src_ = s;
+              break;
+            }
+            case 18: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              dst_ = s;
+              break;
+            }
+            default: {
+              if (!parseUnknownField(
+                  input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e).setUnfinishedMessage(this);
+      } finally {
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return com.iamteer.Wcf.internal_static_wcf_DecPath_descriptor;
@@ -23347,8 +25962,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int SRC_FIELD_NUMBER = 1;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object src_ = "";
+    private volatile java.lang.Object src_;
     /**
      * 
      * 源路径
@@ -23394,8 +26008,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int DST_FIELD_NUMBER = 2;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object dst_ = "";
+    private volatile java.lang.Object dst_;
     /**
      * 
      * 目标路径
@@ -23460,7 +26073,7 @@ java.lang.String defaultValue) {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dst_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dst_);
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -23475,7 +26088,7 @@ java.lang.String defaultValue) {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dst_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dst_);
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -23494,7 +26107,7 @@ java.lang.String defaultValue) {
           .equals(other.getSrc())) return false;
       if (!getDst()
           .equals(other.getDst())) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -23509,7 +26122,7 @@ java.lang.String defaultValue) {
       hash = (53 * hash) + getSrc().hashCode();
       hash = (37 * hash) + DST_FIELD_NUMBER;
       hash = (53 * hash) + getDst().hashCode();
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -23626,20 +26239,26 @@ java.lang.String defaultValue) {
 
       // Construct using com.iamteer.Wcf.DecPath.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         src_ = "";
+
         dst_ = "";
+
         return this;
       }
 
@@ -23666,21 +26285,44 @@ java.lang.String defaultValue) {
       @java.lang.Override
       public com.iamteer.Wcf.DecPath buildPartial() {
         com.iamteer.Wcf.DecPath result = new com.iamteer.Wcf.DecPath(this);
-        if (bitField0_ != 0) { buildPartial0(result); }
+        result.src_ = src_;
+        result.dst_ = dst_;
         onBuilt();
         return result;
       }
 
-      private void buildPartial0(com.iamteer.Wcf.DecPath result) {
-        int from_bitField0_ = bitField0_;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          result.src_ = src_;
-        }
-        if (((from_bitField0_ & 0x00000002) != 0)) {
-          result.dst_ = dst_;
-        }
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
       }
-
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.iamteer.Wcf.DecPath) {
@@ -23695,15 +26337,13 @@ java.lang.String defaultValue) {
         if (other == com.iamteer.Wcf.DecPath.getDefaultInstance()) return this;
         if (!other.getSrc().isEmpty()) {
           src_ = other.src_;
-          bitField0_ |= 0x00000001;
           onChanged();
         }
         if (!other.getDst().isEmpty()) {
           dst_ = other.dst_;
-          bitField0_ |= 0x00000002;
           onChanged();
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -23718,43 +26358,19 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        com.iamteer.Wcf.DecPath parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 10: {
-                src_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 10
-              case 18: {
-                dst_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000002;
-                break;
-              } // case 18
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.iamteer.Wcf.DecPath) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
-      private int bitField0_;
 
       private java.lang.Object src_ = "";
       /**
@@ -23809,9 +26425,11 @@ java.lang.String defaultValue) {
        */
       public Builder setSrc(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         src_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -23824,8 +26442,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearSrc() {
+        
         src_ = getDefaultInstance().getSrc();
-        bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
@@ -23840,10 +26458,12 @@ java.lang.String defaultValue) {
        */
       public Builder setSrcBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         src_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -23901,9 +26521,11 @@ java.lang.String defaultValue) {
        */
       public Builder setDst(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         dst_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -23916,8 +26538,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearDst() {
+        
         dst_ = getDefaultInstance().getDst();
-        bitField0_ = (bitField0_ & ~0x00000002);
         onChanged();
         return this;
       }
@@ -23932,10 +26554,12 @@ java.lang.String defaultValue) {
        */
       public Builder setDstBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         dst_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -23972,18 +26596,7 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        Builder builder = newBuilder();
-        try {
-          builder.mergeFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          throw e.setUnfinishedMessage(builder.buildPartial());
-        } catch (com.google.protobuf.UninitializedMessageException e) {
-          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
-        } catch (java.io.IOException e) {
-          throw new com.google.protobuf.InvalidProtocolBufferException(e)
-              .setUnfinishedMessage(builder.buildPartial());
-        }
-        return builder.buildPartial();
+        return new DecPath(input, extensionRegistry);
       }
     };
 
@@ -24092,6 +26705,66 @@ java.lang.String defaultValue) {
       return new Transfer();
     }
 
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return this.unknownFields;
+    }
+    private Transfer(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              wxid_ = s;
+              break;
+            }
+            case 18: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              tfid_ = s;
+              break;
+            }
+            case 26: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              taid_ = s;
+              break;
+            }
+            default: {
+              if (!parseUnknownField(
+                  input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e).setUnfinishedMessage(this);
+      } finally {
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return com.iamteer.Wcf.internal_static_wcf_Transfer_descriptor;
@@ -24106,8 +26779,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int WXID_FIELD_NUMBER = 1;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object wxid_ = "";
+    private volatile java.lang.Object wxid_;
     /**
      * 
      * 转账人
@@ -24153,8 +26825,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int TFID_FIELD_NUMBER = 2;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object tfid_ = "";
+    private volatile java.lang.Object tfid_;
     /**
      * 
      * 转账id transferid
@@ -24200,8 +26871,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int TAID_FIELD_NUMBER = 3;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object taid_ = "";
+    private volatile java.lang.Object taid_;
     /**
      * 
      * Transaction id
@@ -24269,7 +26939,7 @@ java.lang.String defaultValue) {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(taid_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 3, taid_);
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -24287,7 +26957,7 @@ java.lang.String defaultValue) {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(taid_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, taid_);
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -24308,7 +26978,7 @@ java.lang.String defaultValue) {
           .equals(other.getTfid())) return false;
       if (!getTaid()
           .equals(other.getTaid())) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -24325,7 +26995,7 @@ java.lang.String defaultValue) {
       hash = (53 * hash) + getTfid().hashCode();
       hash = (37 * hash) + TAID_FIELD_NUMBER;
       hash = (53 * hash) + getTaid().hashCode();
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -24442,21 +27112,28 @@ java.lang.String defaultValue) {
 
       // Construct using com.iamteer.Wcf.Transfer.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         wxid_ = "";
+
         tfid_ = "";
+
         taid_ = "";
+
         return this;
       }
 
@@ -24483,24 +27160,45 @@ java.lang.String defaultValue) {
       @java.lang.Override
       public com.iamteer.Wcf.Transfer buildPartial() {
         com.iamteer.Wcf.Transfer result = new com.iamteer.Wcf.Transfer(this);
-        if (bitField0_ != 0) { buildPartial0(result); }
+        result.wxid_ = wxid_;
+        result.tfid_ = tfid_;
+        result.taid_ = taid_;
         onBuilt();
         return result;
       }
 
-      private void buildPartial0(com.iamteer.Wcf.Transfer result) {
-        int from_bitField0_ = bitField0_;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          result.wxid_ = wxid_;
-        }
-        if (((from_bitField0_ & 0x00000002) != 0)) {
-          result.tfid_ = tfid_;
-        }
-        if (((from_bitField0_ & 0x00000004) != 0)) {
-          result.taid_ = taid_;
-        }
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
       }
-
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.iamteer.Wcf.Transfer) {
@@ -24515,20 +27213,17 @@ java.lang.String defaultValue) {
         if (other == com.iamteer.Wcf.Transfer.getDefaultInstance()) return this;
         if (!other.getWxid().isEmpty()) {
           wxid_ = other.wxid_;
-          bitField0_ |= 0x00000001;
           onChanged();
         }
         if (!other.getTfid().isEmpty()) {
           tfid_ = other.tfid_;
-          bitField0_ |= 0x00000002;
           onChanged();
         }
         if (!other.getTaid().isEmpty()) {
           taid_ = other.taid_;
-          bitField0_ |= 0x00000004;
           onChanged();
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -24543,48 +27238,19 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        com.iamteer.Wcf.Transfer parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 10: {
-                wxid_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 10
-              case 18: {
-                tfid_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000002;
-                break;
-              } // case 18
-              case 26: {
-                taid_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000004;
-                break;
-              } // case 26
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.iamteer.Wcf.Transfer) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
-      private int bitField0_;
 
       private java.lang.Object wxid_ = "";
       /**
@@ -24639,9 +27305,11 @@ java.lang.String defaultValue) {
        */
       public Builder setWxid(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         wxid_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -24654,8 +27322,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearWxid() {
+        
         wxid_ = getDefaultInstance().getWxid();
-        bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
@@ -24670,10 +27338,12 @@ java.lang.String defaultValue) {
        */
       public Builder setWxidBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         wxid_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -24731,9 +27401,11 @@ java.lang.String defaultValue) {
        */
       public Builder setTfid(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         tfid_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -24746,8 +27418,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearTfid() {
+        
         tfid_ = getDefaultInstance().getTfid();
-        bitField0_ = (bitField0_ & ~0x00000002);
         onChanged();
         return this;
       }
@@ -24762,10 +27434,12 @@ java.lang.String defaultValue) {
        */
       public Builder setTfidBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         tfid_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -24823,9 +27497,11 @@ java.lang.String defaultValue) {
        */
       public Builder setTaid(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         taid_ = value;
-        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -24838,8 +27514,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearTaid() {
+        
         taid_ = getDefaultInstance().getTaid();
-        bitField0_ = (bitField0_ & ~0x00000004);
         onChanged();
         return this;
       }
@@ -24854,10 +27530,12 @@ java.lang.String defaultValue) {
        */
       public Builder setTaidBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         taid_ = value;
-        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -24894,18 +27572,7 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        Builder builder = newBuilder();
-        try {
-          builder.mergeFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          throw e.setUnfinishedMessage(builder.buildPartial());
-        } catch (com.google.protobuf.UninitializedMessageException e) {
-          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
-        } catch (java.io.IOException e) {
-          throw new com.google.protobuf.InvalidProtocolBufferException(e)
-              .setUnfinishedMessage(builder.buildPartial());
-        }
-        return builder.buildPartial();
+        return new Transfer(input, extensionRegistry);
       }
     };
 
@@ -24934,7 +27601,7 @@ java.lang.String defaultValue) {
      * 消息 id
      * 
* - * uint64 id = 1; + * uint64 id = 1 [jstype = JS_STRING]; * @return The id. */ long getId(); @@ -25003,6 +27670,65 @@ java.lang.String defaultValue) { return new AttachMsg(); } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AttachMsg( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + id_ = input.readUInt64(); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + thumb_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + extra_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.iamteer.Wcf.internal_static_wcf_AttachMsg_descriptor; @@ -25017,13 +27743,13 @@ java.lang.String defaultValue) { } public static final int ID_FIELD_NUMBER = 1; - private long id_ = 0L; + private long id_; /** *
      * 消息 id
      * 
* - * uint64 id = 1; + * uint64 id = 1 [jstype = JS_STRING]; * @return The id. */ @java.lang.Override @@ -25032,8 +27758,7 @@ java.lang.String defaultValue) { } public static final int THUMB_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object thumb_ = ""; + private volatile java.lang.Object thumb_; /** *
      * 消息中的 thumb
@@ -25079,8 +27804,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int EXTRA_FIELD_NUMBER = 3;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object extra_ = "";
+    private volatile java.lang.Object extra_;
     /**
      * 
      * 消息中的 extra
@@ -25148,7 +27872,7 @@ java.lang.String defaultValue) {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(extra_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 3, extra_);
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -25167,7 +27891,7 @@ java.lang.String defaultValue) {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(extra_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, extra_);
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -25188,7 +27912,7 @@ java.lang.String defaultValue) {
           .equals(other.getThumb())) return false;
       if (!getExtra()
           .equals(other.getExtra())) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -25206,7 +27930,7 @@ java.lang.String defaultValue) {
       hash = (53 * hash) + getThumb().hashCode();
       hash = (37 * hash) + EXTRA_FIELD_NUMBER;
       hash = (53 * hash) + getExtra().hashCode();
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -25323,21 +28047,28 @@ java.lang.String defaultValue) {
 
       // Construct using com.iamteer.Wcf.AttachMsg.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         id_ = 0L;
+
         thumb_ = "";
+
         extra_ = "";
+
         return this;
       }
 
@@ -25364,24 +28095,45 @@ java.lang.String defaultValue) {
       @java.lang.Override
       public com.iamteer.Wcf.AttachMsg buildPartial() {
         com.iamteer.Wcf.AttachMsg result = new com.iamteer.Wcf.AttachMsg(this);
-        if (bitField0_ != 0) { buildPartial0(result); }
+        result.id_ = id_;
+        result.thumb_ = thumb_;
+        result.extra_ = extra_;
         onBuilt();
         return result;
       }
 
-      private void buildPartial0(com.iamteer.Wcf.AttachMsg result) {
-        int from_bitField0_ = bitField0_;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          result.id_ = id_;
-        }
-        if (((from_bitField0_ & 0x00000002) != 0)) {
-          result.thumb_ = thumb_;
-        }
-        if (((from_bitField0_ & 0x00000004) != 0)) {
-          result.extra_ = extra_;
-        }
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
       }
-
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.iamteer.Wcf.AttachMsg) {
@@ -25399,15 +28151,13 @@ java.lang.String defaultValue) {
         }
         if (!other.getThumb().isEmpty()) {
           thumb_ = other.thumb_;
-          bitField0_ |= 0x00000002;
           onChanged();
         }
         if (!other.getExtra().isEmpty()) {
           extra_ = other.extra_;
-          bitField0_ |= 0x00000004;
           onChanged();
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -25422,48 +28172,19 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        com.iamteer.Wcf.AttachMsg parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 8: {
-                id_ = input.readUInt64();
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 8
-              case 18: {
-                thumb_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000002;
-                break;
-              } // case 18
-              case 26: {
-                extra_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000004;
-                break;
-              } // case 26
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.iamteer.Wcf.AttachMsg) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
-      private int bitField0_;
 
       private long id_ ;
       /**
@@ -25471,7 +28192,7 @@ java.lang.String defaultValue) {
        * 消息 id
        * 
* - * uint64 id = 1; + * uint64 id = 1 [jstype = JS_STRING]; * @return The id. */ @java.lang.Override @@ -25483,14 +28204,13 @@ java.lang.String defaultValue) { * 消息 id *
* - * uint64 id = 1; + * uint64 id = 1 [jstype = JS_STRING]; * @param value The id to set. * @return This builder for chaining. */ public Builder setId(long value) { - + id_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } @@ -25499,11 +28219,11 @@ java.lang.String defaultValue) { * 消息 id *
* - * uint64 id = 1; + * uint64 id = 1 [jstype = JS_STRING]; * @return This builder for chaining. */ public Builder clearId() { - bitField0_ = (bitField0_ & ~0x00000001); + id_ = 0L; onChanged(); return this; @@ -25562,9 +28282,11 @@ java.lang.String defaultValue) { */ public Builder setThumb( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + thumb_ = value; - bitField0_ |= 0x00000002; onChanged(); return this; } @@ -25577,8 +28299,8 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearThumb() { + thumb_ = getDefaultInstance().getThumb(); - bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -25593,10 +28315,12 @@ java.lang.String defaultValue) { */ public Builder setThumbBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + thumb_ = value; - bitField0_ |= 0x00000002; onChanged(); return this; } @@ -25654,9 +28378,11 @@ java.lang.String defaultValue) { */ public Builder setExtra( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + extra_ = value; - bitField0_ |= 0x00000004; onChanged(); return this; } @@ -25669,8 +28395,8 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearExtra() { + extra_ = getDefaultInstance().getExtra(); - bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -25685,10 +28411,12 @@ java.lang.String defaultValue) { */ public Builder setExtraBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + extra_ = value; - bitField0_ |= 0x00000004; onChanged(); return this; } @@ -25725,18 +28453,7 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new AttachMsg(input, extensionRegistry); } }; @@ -25765,7 +28482,7 @@ java.lang.String defaultValue) { * 语音消息 id *
* - * uint64 id = 1; + * uint64 id = 1 [jstype = JS_STRING]; * @return The id. */ long getId(); @@ -25813,6 +28530,59 @@ java.lang.String defaultValue) { return new AudioMsg(); } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AudioMsg( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + id_ = input.readUInt64(); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + dir_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.iamteer.Wcf.internal_static_wcf_AudioMsg_descriptor; @@ -25827,13 +28597,13 @@ java.lang.String defaultValue) { } public static final int ID_FIELD_NUMBER = 1; - private long id_ = 0L; + private long id_; /** *
      * 语音消息 id
      * 
* - * uint64 id = 1; + * uint64 id = 1 [jstype = JS_STRING]; * @return The id. */ @java.lang.Override @@ -25842,8 +28612,7 @@ java.lang.String defaultValue) { } public static final int DIR_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object dir_ = ""; + private volatile java.lang.Object dir_; /** *
      * 存放目录
@@ -25908,7 +28677,7 @@ java.lang.String defaultValue) {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dir_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dir_);
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -25924,7 +28693,7 @@ java.lang.String defaultValue) {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dir_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dir_);
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -25943,7 +28712,7 @@ java.lang.String defaultValue) {
           != other.getId()) return false;
       if (!getDir()
           .equals(other.getDir())) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -25959,7 +28728,7 @@ java.lang.String defaultValue) {
           getId());
       hash = (37 * hash) + DIR_FIELD_NUMBER;
       hash = (53 * hash) + getDir().hashCode();
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -26076,20 +28845,26 @@ java.lang.String defaultValue) {
 
       // Construct using com.iamteer.Wcf.AudioMsg.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         id_ = 0L;
+
         dir_ = "";
+
         return this;
       }
 
@@ -26116,21 +28891,44 @@ java.lang.String defaultValue) {
       @java.lang.Override
       public com.iamteer.Wcf.AudioMsg buildPartial() {
         com.iamteer.Wcf.AudioMsg result = new com.iamteer.Wcf.AudioMsg(this);
-        if (bitField0_ != 0) { buildPartial0(result); }
+        result.id_ = id_;
+        result.dir_ = dir_;
         onBuilt();
         return result;
       }
 
-      private void buildPartial0(com.iamteer.Wcf.AudioMsg result) {
-        int from_bitField0_ = bitField0_;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          result.id_ = id_;
-        }
-        if (((from_bitField0_ & 0x00000002) != 0)) {
-          result.dir_ = dir_;
-        }
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
       }
-
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.iamteer.Wcf.AudioMsg) {
@@ -26148,10 +28946,9 @@ java.lang.String defaultValue) {
         }
         if (!other.getDir().isEmpty()) {
           dir_ = other.dir_;
-          bitField0_ |= 0x00000002;
           onChanged();
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -26166,43 +28963,19 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        com.iamteer.Wcf.AudioMsg parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 8: {
-                id_ = input.readUInt64();
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 8
-              case 18: {
-                dir_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000002;
-                break;
-              } // case 18
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.iamteer.Wcf.AudioMsg) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
-      private int bitField0_;
 
       private long id_ ;
       /**
@@ -26210,7 +28983,7 @@ java.lang.String defaultValue) {
        * 语音消息 id
        * 
* - * uint64 id = 1; + * uint64 id = 1 [jstype = JS_STRING]; * @return The id. */ @java.lang.Override @@ -26222,14 +28995,13 @@ java.lang.String defaultValue) { * 语音消息 id *
* - * uint64 id = 1; + * uint64 id = 1 [jstype = JS_STRING]; * @param value The id to set. * @return This builder for chaining. */ public Builder setId(long value) { - + id_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } @@ -26238,11 +29010,11 @@ java.lang.String defaultValue) { * 语音消息 id *
* - * uint64 id = 1; + * uint64 id = 1 [jstype = JS_STRING]; * @return This builder for chaining. */ public Builder clearId() { - bitField0_ = (bitField0_ & ~0x00000001); + id_ = 0L; onChanged(); return this; @@ -26301,9 +29073,11 @@ java.lang.String defaultValue) { */ public Builder setDir( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + dir_ = value; - bitField0_ |= 0x00000002; onChanged(); return this; } @@ -26316,8 +29090,8 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearDir() { + dir_ = getDefaultInstance().getDir(); - bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -26332,10 +29106,12 @@ java.lang.String defaultValue) { */ public Builder setDirBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dir_ = value; - bitField0_ |= 0x00000002; onChanged(); return this; } @@ -26372,18 +29148,7 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new AudioMsg(input, extensionRegistry); } }; @@ -26576,6 +29341,90 @@ java.lang.String defaultValue) { return new RichText(); } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RichText( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + account_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + title_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + digest_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + url_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + thumburl_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + receiver_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.iamteer.Wcf.internal_static_wcf_RichText_descriptor; @@ -26590,8 +29439,7 @@ java.lang.String defaultValue) { } public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; + private volatile java.lang.Object name_; /** *
      * 显示名字
@@ -26637,8 +29485,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int ACCOUNT_FIELD_NUMBER = 2;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object account_ = "";
+    private volatile java.lang.Object account_;
     /**
      * 
      * 公众号 id
@@ -26684,8 +29531,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int TITLE_FIELD_NUMBER = 3;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object title_ = "";
+    private volatile java.lang.Object title_;
     /**
      * 
      * 标题
@@ -26731,8 +29577,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int DIGEST_FIELD_NUMBER = 4;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object digest_ = "";
+    private volatile java.lang.Object digest_;
     /**
      * 
      * 摘要
@@ -26778,8 +29623,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int URL_FIELD_NUMBER = 5;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object url_ = "";
+    private volatile java.lang.Object url_;
     /**
      * 
      * 链接
@@ -26825,8 +29669,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int THUMBURL_FIELD_NUMBER = 6;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object thumburl_ = "";
+    private volatile java.lang.Object thumburl_;
     /**
      * 
      * 缩略图
@@ -26872,8 +29715,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int RECEIVER_FIELD_NUMBER = 7;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object receiver_ = "";
+    private volatile java.lang.Object receiver_;
     /**
      * 
      * 接收人
@@ -26953,7 +29795,7 @@ java.lang.String defaultValue) {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 7, receiver_);
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -26983,7 +29825,7 @@ java.lang.String defaultValue) {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, receiver_);
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -27012,7 +29854,7 @@ java.lang.String defaultValue) {
           .equals(other.getThumburl())) return false;
       if (!getReceiver()
           .equals(other.getReceiver())) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -27037,7 +29879,7 @@ java.lang.String defaultValue) {
       hash = (53 * hash) + getThumburl().hashCode();
       hash = (37 * hash) + RECEIVER_FIELD_NUMBER;
       hash = (53 * hash) + getReceiver().hashCode();
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -27154,25 +29996,36 @@ java.lang.String defaultValue) {
 
       // Construct using com.iamteer.Wcf.RichText.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         name_ = "";
+
         account_ = "";
+
         title_ = "";
+
         digest_ = "";
+
         url_ = "";
+
         thumburl_ = "";
+
         receiver_ = "";
+
         return this;
       }
 
@@ -27199,36 +30052,49 @@ java.lang.String defaultValue) {
       @java.lang.Override
       public com.iamteer.Wcf.RichText buildPartial() {
         com.iamteer.Wcf.RichText result = new com.iamteer.Wcf.RichText(this);
-        if (bitField0_ != 0) { buildPartial0(result); }
+        result.name_ = name_;
+        result.account_ = account_;
+        result.title_ = title_;
+        result.digest_ = digest_;
+        result.url_ = url_;
+        result.thumburl_ = thumburl_;
+        result.receiver_ = receiver_;
         onBuilt();
         return result;
       }
 
-      private void buildPartial0(com.iamteer.Wcf.RichText result) {
-        int from_bitField0_ = bitField0_;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          result.name_ = name_;
-        }
-        if (((from_bitField0_ & 0x00000002) != 0)) {
-          result.account_ = account_;
-        }
-        if (((from_bitField0_ & 0x00000004) != 0)) {
-          result.title_ = title_;
-        }
-        if (((from_bitField0_ & 0x00000008) != 0)) {
-          result.digest_ = digest_;
-        }
-        if (((from_bitField0_ & 0x00000010) != 0)) {
-          result.url_ = url_;
-        }
-        if (((from_bitField0_ & 0x00000020) != 0)) {
-          result.thumburl_ = thumburl_;
-        }
-        if (((from_bitField0_ & 0x00000040) != 0)) {
-          result.receiver_ = receiver_;
-        }
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
       }
-
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.iamteer.Wcf.RichText) {
@@ -27243,40 +30109,33 @@ java.lang.String defaultValue) {
         if (other == com.iamteer.Wcf.RichText.getDefaultInstance()) return this;
         if (!other.getName().isEmpty()) {
           name_ = other.name_;
-          bitField0_ |= 0x00000001;
           onChanged();
         }
         if (!other.getAccount().isEmpty()) {
           account_ = other.account_;
-          bitField0_ |= 0x00000002;
           onChanged();
         }
         if (!other.getTitle().isEmpty()) {
           title_ = other.title_;
-          bitField0_ |= 0x00000004;
           onChanged();
         }
         if (!other.getDigest().isEmpty()) {
           digest_ = other.digest_;
-          bitField0_ |= 0x00000008;
           onChanged();
         }
         if (!other.getUrl().isEmpty()) {
           url_ = other.url_;
-          bitField0_ |= 0x00000010;
           onChanged();
         }
         if (!other.getThumburl().isEmpty()) {
           thumburl_ = other.thumburl_;
-          bitField0_ |= 0x00000020;
           onChanged();
         }
         if (!other.getReceiver().isEmpty()) {
           receiver_ = other.receiver_;
-          bitField0_ |= 0x00000040;
           onChanged();
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -27291,68 +30150,19 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        com.iamteer.Wcf.RichText parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 10: {
-                name_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 10
-              case 18: {
-                account_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000002;
-                break;
-              } // case 18
-              case 26: {
-                title_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000004;
-                break;
-              } // case 26
-              case 34: {
-                digest_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000008;
-                break;
-              } // case 34
-              case 42: {
-                url_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000010;
-                break;
-              } // case 42
-              case 50: {
-                thumburl_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000020;
-                break;
-              } // case 50
-              case 58: {
-                receiver_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000040;
-                break;
-              } // case 58
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.iamteer.Wcf.RichText) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
-      private int bitField0_;
 
       private java.lang.Object name_ = "";
       /**
@@ -27407,9 +30217,11 @@ java.lang.String defaultValue) {
        */
       public Builder setName(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         name_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -27422,8 +30234,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearName() {
+        
         name_ = getDefaultInstance().getName();
-        bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
@@ -27438,10 +30250,12 @@ java.lang.String defaultValue) {
        */
       public Builder setNameBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         name_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -27499,9 +30313,11 @@ java.lang.String defaultValue) {
        */
       public Builder setAccount(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         account_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -27514,8 +30330,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearAccount() {
+        
         account_ = getDefaultInstance().getAccount();
-        bitField0_ = (bitField0_ & ~0x00000002);
         onChanged();
         return this;
       }
@@ -27530,10 +30346,12 @@ java.lang.String defaultValue) {
        */
       public Builder setAccountBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         account_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -27591,9 +30409,11 @@ java.lang.String defaultValue) {
        */
       public Builder setTitle(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         title_ = value;
-        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -27606,8 +30426,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearTitle() {
+        
         title_ = getDefaultInstance().getTitle();
-        bitField0_ = (bitField0_ & ~0x00000004);
         onChanged();
         return this;
       }
@@ -27622,10 +30442,12 @@ java.lang.String defaultValue) {
        */
       public Builder setTitleBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         title_ = value;
-        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -27683,9 +30505,11 @@ java.lang.String defaultValue) {
        */
       public Builder setDigest(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         digest_ = value;
-        bitField0_ |= 0x00000008;
         onChanged();
         return this;
       }
@@ -27698,8 +30522,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearDigest() {
+        
         digest_ = getDefaultInstance().getDigest();
-        bitField0_ = (bitField0_ & ~0x00000008);
         onChanged();
         return this;
       }
@@ -27714,10 +30538,12 @@ java.lang.String defaultValue) {
        */
       public Builder setDigestBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         digest_ = value;
-        bitField0_ |= 0x00000008;
         onChanged();
         return this;
       }
@@ -27775,9 +30601,11 @@ java.lang.String defaultValue) {
        */
       public Builder setUrl(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         url_ = value;
-        bitField0_ |= 0x00000010;
         onChanged();
         return this;
       }
@@ -27790,8 +30618,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearUrl() {
+        
         url_ = getDefaultInstance().getUrl();
-        bitField0_ = (bitField0_ & ~0x00000010);
         onChanged();
         return this;
       }
@@ -27806,10 +30634,12 @@ java.lang.String defaultValue) {
        */
       public Builder setUrlBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         url_ = value;
-        bitField0_ |= 0x00000010;
         onChanged();
         return this;
       }
@@ -27867,9 +30697,11 @@ java.lang.String defaultValue) {
        */
       public Builder setThumburl(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         thumburl_ = value;
-        bitField0_ |= 0x00000020;
         onChanged();
         return this;
       }
@@ -27882,8 +30714,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearThumburl() {
+        
         thumburl_ = getDefaultInstance().getThumburl();
-        bitField0_ = (bitField0_ & ~0x00000020);
         onChanged();
         return this;
       }
@@ -27898,10 +30730,12 @@ java.lang.String defaultValue) {
        */
       public Builder setThumburlBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         thumburl_ = value;
-        bitField0_ |= 0x00000020;
         onChanged();
         return this;
       }
@@ -27959,9 +30793,11 @@ java.lang.String defaultValue) {
        */
       public Builder setReceiver(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         receiver_ = value;
-        bitField0_ |= 0x00000040;
         onChanged();
         return this;
       }
@@ -27974,8 +30810,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearReceiver() {
+        
         receiver_ = getDefaultInstance().getReceiver();
-        bitField0_ = (bitField0_ & ~0x00000040);
         onChanged();
         return this;
       }
@@ -27990,10 +30826,12 @@ java.lang.String defaultValue) {
        */
       public Builder setReceiverBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         receiver_ = value;
-        bitField0_ |= 0x00000040;
         onChanged();
         return this;
       }
@@ -28030,18 +30868,7 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        Builder builder = newBuilder();
-        try {
-          builder.mergeFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          throw e.setUnfinishedMessage(builder.buildPartial());
-        } catch (com.google.protobuf.UninitializedMessageException e) {
-          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
-        } catch (java.io.IOException e) {
-          throw new com.google.protobuf.InvalidProtocolBufferException(e)
-              .setUnfinishedMessage(builder.buildPartial());
-        }
-        return builder.buildPartial();
+        return new RichText(input, extensionRegistry);
       }
     };
 
@@ -28129,6 +30956,60 @@ java.lang.String defaultValue) {
       return new PatMsg();
     }
 
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return this.unknownFields;
+    }
+    private PatMsg(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              roomid_ = s;
+              break;
+            }
+            case 18: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              wxid_ = s;
+              break;
+            }
+            default: {
+              if (!parseUnknownField(
+                  input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e).setUnfinishedMessage(this);
+      } finally {
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return com.iamteer.Wcf.internal_static_wcf_PatMsg_descriptor;
@@ -28143,8 +31024,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int ROOMID_FIELD_NUMBER = 1;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object roomid_ = "";
+    private volatile java.lang.Object roomid_;
     /**
      * 
      * 群 id
@@ -28190,8 +31070,7 @@ java.lang.String defaultValue) {
     }
 
     public static final int WXID_FIELD_NUMBER = 2;
-    @SuppressWarnings("serial")
-    private volatile java.lang.Object wxid_ = "";
+    private volatile java.lang.Object wxid_;
     /**
      * 
      * wxid
@@ -28256,7 +31135,7 @@ java.lang.String defaultValue) {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(wxid_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 2, wxid_);
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -28271,7 +31150,7 @@ java.lang.String defaultValue) {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(wxid_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, wxid_);
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -28290,7 +31169,7 @@ java.lang.String defaultValue) {
           .equals(other.getRoomid())) return false;
       if (!getWxid()
           .equals(other.getWxid())) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -28305,7 +31184,7 @@ java.lang.String defaultValue) {
       hash = (53 * hash) + getRoomid().hashCode();
       hash = (37 * hash) + WXID_FIELD_NUMBER;
       hash = (53 * hash) + getWxid().hashCode();
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -28422,20 +31301,26 @@ java.lang.String defaultValue) {
 
       // Construct using com.iamteer.Wcf.PatMsg.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         roomid_ = "";
+
         wxid_ = "";
+
         return this;
       }
 
@@ -28462,21 +31347,44 @@ java.lang.String defaultValue) {
       @java.lang.Override
       public com.iamteer.Wcf.PatMsg buildPartial() {
         com.iamteer.Wcf.PatMsg result = new com.iamteer.Wcf.PatMsg(this);
-        if (bitField0_ != 0) { buildPartial0(result); }
+        result.roomid_ = roomid_;
+        result.wxid_ = wxid_;
         onBuilt();
         return result;
       }
 
-      private void buildPartial0(com.iamteer.Wcf.PatMsg result) {
-        int from_bitField0_ = bitField0_;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          result.roomid_ = roomid_;
-        }
-        if (((from_bitField0_ & 0x00000002) != 0)) {
-          result.wxid_ = wxid_;
-        }
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
       }
-
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.iamteer.Wcf.PatMsg) {
@@ -28491,15 +31399,13 @@ java.lang.String defaultValue) {
         if (other == com.iamteer.Wcf.PatMsg.getDefaultInstance()) return this;
         if (!other.getRoomid().isEmpty()) {
           roomid_ = other.roomid_;
-          bitField0_ |= 0x00000001;
           onChanged();
         }
         if (!other.getWxid().isEmpty()) {
           wxid_ = other.wxid_;
-          bitField0_ |= 0x00000002;
           onChanged();
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -28514,43 +31420,19 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        com.iamteer.Wcf.PatMsg parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 10: {
-                roomid_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 10
-              case 18: {
-                wxid_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000002;
-                break;
-              } // case 18
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.iamteer.Wcf.PatMsg) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
-      private int bitField0_;
 
       private java.lang.Object roomid_ = "";
       /**
@@ -28605,9 +31487,11 @@ java.lang.String defaultValue) {
        */
       public Builder setRoomid(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         roomid_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -28620,8 +31504,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearRoomid() {
+        
         roomid_ = getDefaultInstance().getRoomid();
-        bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
@@ -28636,10 +31520,12 @@ java.lang.String defaultValue) {
        */
       public Builder setRoomidBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         roomid_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -28697,9 +31583,11 @@ java.lang.String defaultValue) {
        */
       public Builder setWxid(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         wxid_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -28712,8 +31600,8 @@ java.lang.String defaultValue) {
        * @return This builder for chaining.
        */
       public Builder clearWxid() {
+        
         wxid_ = getDefaultInstance().getWxid();
-        bitField0_ = (bitField0_ & ~0x00000002);
         onChanged();
         return this;
       }
@@ -28728,10 +31616,12 @@ java.lang.String defaultValue) {
        */
       public Builder setWxidBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         wxid_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -28768,18 +31658,7 @@ java.lang.String defaultValue) {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        Builder builder = newBuilder();
-        try {
-          builder.mergeFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          throw e.setUnfinishedMessage(builder.buildPartial());
-        } catch (com.google.protobuf.UninitializedMessageException e) {
-          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
-        } catch (java.io.IOException e) {
-          throw new com.google.protobuf.InvalidProtocolBufferException(e)
-              .setUnfinishedMessage(builder.buildPartial());
-        }
-        return builder.buildPartial();
+        return new PatMsg(input, extensionRegistry);
       }
     };
 
@@ -28799,6 +31678,1395 @@ java.lang.String defaultValue) {
 
   }
 
+  public interface OcrMsgOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:wcf.OcrMsg)
+      com.google.protobuf.MessageOrBuilder {
+
+    /**
+     * 
+     * 状态
+     * 
+ * + * int32 status = 1; + * @return The status. + */ + int getStatus(); + + /** + *
+     * 结果
+     * 
+ * + * string result = 2; + * @return The result. + */ + java.lang.String getResult(); + /** + *
+     * 结果
+     * 
+ * + * string result = 2; + * @return The bytes for result. + */ + com.google.protobuf.ByteString + getResultBytes(); + } + /** + * Protobuf type {@code wcf.OcrMsg} + */ + public static final class OcrMsg extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:wcf.OcrMsg) + OcrMsgOrBuilder { + private static final long serialVersionUID = 0L; + // Use OcrMsg.newBuilder() to construct. + private OcrMsg(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OcrMsg() { + result_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OcrMsg(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private OcrMsg( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + status_ = input.readInt32(); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + result_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.iamteer.Wcf.internal_static_wcf_OcrMsg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.iamteer.Wcf.internal_static_wcf_OcrMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.iamteer.Wcf.OcrMsg.class, com.iamteer.Wcf.OcrMsg.Builder.class); + } + + public static final int STATUS_FIELD_NUMBER = 1; + private int status_; + /** + *
+     * 状态
+     * 
+ * + * int32 status = 1; + * @return The status. + */ + @java.lang.Override + public int getStatus() { + return status_; + } + + public static final int RESULT_FIELD_NUMBER = 2; + private volatile java.lang.Object result_; + /** + *
+     * 结果
+     * 
+ * + * string result = 2; + * @return The result. + */ + @java.lang.Override + public java.lang.String getResult() { + java.lang.Object ref = result_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + result_ = s; + return s; + } + } + /** + *
+     * 结果
+     * 
+ * + * string result = 2; + * @return The bytes for result. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResultBytes() { + java.lang.Object ref = result_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + result_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (status_ != 0) { + output.writeInt32(1, status_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(result_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, result_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (status_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, status_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(result_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, result_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.iamteer.Wcf.OcrMsg)) { + return super.equals(obj); + } + com.iamteer.Wcf.OcrMsg other = (com.iamteer.Wcf.OcrMsg) obj; + + if (getStatus() + != other.getStatus()) return false; + if (!getResult() + .equals(other.getResult())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus(); + hash = (37 * hash) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + getResult().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.iamteer.Wcf.OcrMsg parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.iamteer.Wcf.OcrMsg parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.iamteer.Wcf.OcrMsg parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.iamteer.Wcf.OcrMsg parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.iamteer.Wcf.OcrMsg parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.iamteer.Wcf.OcrMsg parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.iamteer.Wcf.OcrMsg parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.iamteer.Wcf.OcrMsg parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.iamteer.Wcf.OcrMsg parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.iamteer.Wcf.OcrMsg parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.iamteer.Wcf.OcrMsg parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.iamteer.Wcf.OcrMsg parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.iamteer.Wcf.OcrMsg prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code wcf.OcrMsg} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:wcf.OcrMsg) + com.iamteer.Wcf.OcrMsgOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.iamteer.Wcf.internal_static_wcf_OcrMsg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.iamteer.Wcf.internal_static_wcf_OcrMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.iamteer.Wcf.OcrMsg.class, com.iamteer.Wcf.OcrMsg.Builder.class); + } + + // Construct using com.iamteer.Wcf.OcrMsg.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + status_ = 0; + + result_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.iamteer.Wcf.internal_static_wcf_OcrMsg_descriptor; + } + + @java.lang.Override + public com.iamteer.Wcf.OcrMsg getDefaultInstanceForType() { + return com.iamteer.Wcf.OcrMsg.getDefaultInstance(); + } + + @java.lang.Override + public com.iamteer.Wcf.OcrMsg build() { + com.iamteer.Wcf.OcrMsg result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.iamteer.Wcf.OcrMsg buildPartial() { + com.iamteer.Wcf.OcrMsg result = new com.iamteer.Wcf.OcrMsg(this); + result.status_ = status_; + result.result_ = result_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.iamteer.Wcf.OcrMsg) { + return mergeFrom((com.iamteer.Wcf.OcrMsg)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.iamteer.Wcf.OcrMsg other) { + if (other == com.iamteer.Wcf.OcrMsg.getDefaultInstance()) return this; + if (other.getStatus() != 0) { + setStatus(other.getStatus()); + } + if (!other.getResult().isEmpty()) { + result_ = other.result_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.iamteer.Wcf.OcrMsg parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.iamteer.Wcf.OcrMsg) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int status_ ; + /** + *
+       * 状态
+       * 
+ * + * int32 status = 1; + * @return The status. + */ + @java.lang.Override + public int getStatus() { + return status_; + } + /** + *
+       * 状态
+       * 
+ * + * int32 status = 1; + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(int value) { + + status_ = value; + onChanged(); + return this; + } + /** + *
+       * 状态
+       * 
+ * + * int32 status = 1; + * @return This builder for chaining. + */ + public Builder clearStatus() { + + status_ = 0; + onChanged(); + return this; + } + + private java.lang.Object result_ = ""; + /** + *
+       * 结果
+       * 
+ * + * string result = 2; + * @return The result. + */ + public java.lang.String getResult() { + java.lang.Object ref = result_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + result_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * 结果
+       * 
+ * + * string result = 2; + * @return The bytes for result. + */ + public com.google.protobuf.ByteString + getResultBytes() { + java.lang.Object ref = result_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + result_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * 结果
+       * 
+ * + * string result = 2; + * @param value The result to set. + * @return This builder for chaining. + */ + public Builder setResult( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + result_ = value; + onChanged(); + return this; + } + /** + *
+       * 结果
+       * 
+ * + * string result = 2; + * @return This builder for chaining. + */ + public Builder clearResult() { + + result_ = getDefaultInstance().getResult(); + onChanged(); + return this; + } + /** + *
+       * 结果
+       * 
+ * + * string result = 2; + * @param value The bytes for result to set. + * @return This builder for chaining. + */ + public Builder setResultBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + result_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:wcf.OcrMsg) + } + + // @@protoc_insertion_point(class_scope:wcf.OcrMsg) + private static final com.iamteer.Wcf.OcrMsg DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.iamteer.Wcf.OcrMsg(); + } + + public static com.iamteer.Wcf.OcrMsg getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OcrMsg parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OcrMsg(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.iamteer.Wcf.OcrMsg getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ForwardMsgOrBuilder extends + // @@protoc_insertion_point(interface_extends:wcf.ForwardMsg) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 待转发消息 ID
+     * 
+ * + * uint64 id = 1 [jstype = JS_STRING]; + * @return The id. + */ + long getId(); + + /** + *
+     * 转发接收目标,群为 roomId,个人为 wxid
+     * 
+ * + * string receiver = 2; + * @return The receiver. + */ + java.lang.String getReceiver(); + /** + *
+     * 转发接收目标,群为 roomId,个人为 wxid
+     * 
+ * + * string receiver = 2; + * @return The bytes for receiver. + */ + com.google.protobuf.ByteString + getReceiverBytes(); + } + /** + * Protobuf type {@code wcf.ForwardMsg} + */ + public static final class ForwardMsg extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:wcf.ForwardMsg) + ForwardMsgOrBuilder { + private static final long serialVersionUID = 0L; + // Use ForwardMsg.newBuilder() to construct. + private ForwardMsg(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ForwardMsg() { + receiver_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ForwardMsg(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ForwardMsg( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + id_ = input.readUInt64(); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + receiver_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.iamteer.Wcf.internal_static_wcf_ForwardMsg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.iamteer.Wcf.internal_static_wcf_ForwardMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.iamteer.Wcf.ForwardMsg.class, com.iamteer.Wcf.ForwardMsg.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private long id_; + /** + *
+     * 待转发消息 ID
+     * 
+ * + * uint64 id = 1 [jstype = JS_STRING]; + * @return The id. + */ + @java.lang.Override + public long getId() { + return id_; + } + + public static final int RECEIVER_FIELD_NUMBER = 2; + private volatile java.lang.Object receiver_; + /** + *
+     * 转发接收目标,群为 roomId,个人为 wxid
+     * 
+ * + * string receiver = 2; + * @return The receiver. + */ + @java.lang.Override + public java.lang.String getReceiver() { + java.lang.Object ref = receiver_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + receiver_ = s; + return s; + } + } + /** + *
+     * 转发接收目标,群为 roomId,个人为 wxid
+     * 
+ * + * string receiver = 2; + * @return The bytes for receiver. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getReceiverBytes() { + java.lang.Object ref = receiver_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + receiver_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (id_ != 0L) { + output.writeUInt64(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, receiver_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (id_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, receiver_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.iamteer.Wcf.ForwardMsg)) { + return super.equals(obj); + } + com.iamteer.Wcf.ForwardMsg other = (com.iamteer.Wcf.ForwardMsg) obj; + + if (getId() + != other.getId()) return false; + if (!getReceiver() + .equals(other.getReceiver())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getId()); + hash = (37 * hash) + RECEIVER_FIELD_NUMBER; + hash = (53 * hash) + getReceiver().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.iamteer.Wcf.ForwardMsg parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.iamteer.Wcf.ForwardMsg parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.iamteer.Wcf.ForwardMsg parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.iamteer.Wcf.ForwardMsg parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.iamteer.Wcf.ForwardMsg parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.iamteer.Wcf.ForwardMsg parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.iamteer.Wcf.ForwardMsg parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.iamteer.Wcf.ForwardMsg parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.iamteer.Wcf.ForwardMsg parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.iamteer.Wcf.ForwardMsg parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.iamteer.Wcf.ForwardMsg parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.iamteer.Wcf.ForwardMsg parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.iamteer.Wcf.ForwardMsg prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code wcf.ForwardMsg} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:wcf.ForwardMsg) + com.iamteer.Wcf.ForwardMsgOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.iamteer.Wcf.internal_static_wcf_ForwardMsg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.iamteer.Wcf.internal_static_wcf_ForwardMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.iamteer.Wcf.ForwardMsg.class, com.iamteer.Wcf.ForwardMsg.Builder.class); + } + + // Construct using com.iamteer.Wcf.ForwardMsg.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + id_ = 0L; + + receiver_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.iamteer.Wcf.internal_static_wcf_ForwardMsg_descriptor; + } + + @java.lang.Override + public com.iamteer.Wcf.ForwardMsg getDefaultInstanceForType() { + return com.iamteer.Wcf.ForwardMsg.getDefaultInstance(); + } + + @java.lang.Override + public com.iamteer.Wcf.ForwardMsg build() { + com.iamteer.Wcf.ForwardMsg result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.iamteer.Wcf.ForwardMsg buildPartial() { + com.iamteer.Wcf.ForwardMsg result = new com.iamteer.Wcf.ForwardMsg(this); + result.id_ = id_; + result.receiver_ = receiver_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.iamteer.Wcf.ForwardMsg) { + return mergeFrom((com.iamteer.Wcf.ForwardMsg)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.iamteer.Wcf.ForwardMsg other) { + if (other == com.iamteer.Wcf.ForwardMsg.getDefaultInstance()) return this; + if (other.getId() != 0L) { + setId(other.getId()); + } + if (!other.getReceiver().isEmpty()) { + receiver_ = other.receiver_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.iamteer.Wcf.ForwardMsg parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.iamteer.Wcf.ForwardMsg) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long id_ ; + /** + *
+       * 待转发消息 ID
+       * 
+ * + * uint64 id = 1 [jstype = JS_STRING]; + * @return The id. + */ + @java.lang.Override + public long getId() { + return id_; + } + /** + *
+       * 待转发消息 ID
+       * 
+ * + * uint64 id = 1 [jstype = JS_STRING]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(long value) { + + id_ = value; + onChanged(); + return this; + } + /** + *
+       * 待转发消息 ID
+       * 
+ * + * uint64 id = 1 [jstype = JS_STRING]; + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object receiver_ = ""; + /** + *
+       * 转发接收目标,群为 roomId,个人为 wxid
+       * 
+ * + * string receiver = 2; + * @return The receiver. + */ + public java.lang.String getReceiver() { + java.lang.Object ref = receiver_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + receiver_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * 转发接收目标,群为 roomId,个人为 wxid
+       * 
+ * + * string receiver = 2; + * @return The bytes for receiver. + */ + public com.google.protobuf.ByteString + getReceiverBytes() { + java.lang.Object ref = receiver_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + receiver_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * 转发接收目标,群为 roomId,个人为 wxid
+       * 
+ * + * string receiver = 2; + * @param value The receiver to set. + * @return This builder for chaining. + */ + public Builder setReceiver( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + receiver_ = value; + onChanged(); + return this; + } + /** + *
+       * 转发接收目标,群为 roomId,个人为 wxid
+       * 
+ * + * string receiver = 2; + * @return This builder for chaining. + */ + public Builder clearReceiver() { + + receiver_ = getDefaultInstance().getReceiver(); + onChanged(); + return this; + } + /** + *
+       * 转发接收目标,群为 roomId,个人为 wxid
+       * 
+ * + * string receiver = 2; + * @param value The bytes for receiver to set. + * @return This builder for chaining. + */ + public Builder setReceiverBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + receiver_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:wcf.ForwardMsg) + } + + // @@protoc_insertion_point(class_scope:wcf.ForwardMsg) + private static final com.iamteer.Wcf.ForwardMsg DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.iamteer.Wcf.ForwardMsg(); + } + + public static com.iamteer.Wcf.ForwardMsg getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ForwardMsg parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ForwardMsg(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.iamteer.Wcf.ForwardMsg getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_wcf_Request_descriptor; private static final @@ -28934,6 +33202,16 @@ java.lang.String defaultValue) { private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_wcf_PatMsg_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_wcf_OcrMsg_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_wcf_OcrMsg_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_wcf_ForwardMsg_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_wcf_ForwardMsg_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -28943,7 +33221,7 @@ java.lang.String defaultValue) { descriptor; static { java.lang.String[] descriptorData = { - "\n\twcf.proto\022\003wcf\"\334\003\n\007Request\022\034\n\004func\030\001 \001" + + "\n\twcf.proto\022\003wcf\"\377\003\n\007Request\022\034\n\004func\030\001 \001" + "(\0162\016.wcf.Functions\022\033\n\005empty\030\002 \001(\0132\n.wcf." + "EmptyH\000\022\r\n\003str\030\003 \001(\tH\000\022\033\n\003txt\030\004 \001(\0132\014.wc" + "f.TextMsgH\000\022\034\n\004file\030\005 \001(\0132\014.wcf.PathMsgH" + @@ -28951,72 +33229,78 @@ java.lang.String defaultValue) { "\001(\0132\021.wcf.VerificationH\000\022\034\n\001m\030\010 \001(\0132\017.wc" + "f.MemberMgmtH\000\022\032\n\003xml\030\t \001(\0132\013.wcf.XmlMsg" + "H\000\022\033\n\003dec\030\n \001(\0132\014.wcf.DecPathH\000\022\033\n\002tf\030\013 " + - "\001(\0132\r.wcf.TransferH\000\022\016\n\004ui64\030\014 \001(\004H\000\022\016\n\004" + - "flag\030\r \001(\010H\000\022\035\n\003att\030\016 \001(\0132\016.wcf.AttachMs" + - "gH\000\022\033\n\002am\030\017 \001(\0132\r.wcf.AudioMsgH\000\022\033\n\002rt\030\020" + - " \001(\0132\r.wcf.RichTextH\000\022\031\n\002pm\030\021 \001(\0132\013.wcf." + - "PatMsgH\000B\005\n\003msg\"\253\002\n\010Response\022\034\n\004func\030\001 \001" + - "(\0162\016.wcf.Functions\022\020\n\006status\030\002 \001(\005H\000\022\r\n\003" + - "str\030\003 \001(\tH\000\022\033\n\005wxmsg\030\004 \001(\0132\n.wcf.WxMsgH\000" + - "\022\036\n\005types\030\005 \001(\0132\r.wcf.MsgTypesH\000\022$\n\010cont" + - "acts\030\006 \001(\0132\020.wcf.RpcContactsH\000\022\033\n\003dbs\030\007 " + - "\001(\0132\014.wcf.DbNamesH\000\022\037\n\006tables\030\010 \001(\0132\r.wc" + - "f.DbTablesH\000\022\033\n\004rows\030\t \001(\0132\013.wcf.DbRowsH" + - "\000\022\033\n\002ui\030\n \001(\0132\r.wcf.UserInfoH\000B\005\n\003msg\"\007\n" + - "\005Empty\"\272\001\n\005WxMsg\022\017\n\007is_self\030\001 \001(\010\022\020\n\010is_" + - "group\030\002 \001(\010\022\n\n\002id\030\003 \001(\004\022\014\n\004type\030\004 \001(\r\022\n\n" + - "\002ts\030\005 \001(\r\022\016\n\006roomid\030\006 \001(\t\022\017\n\007content\030\007 \001" + - "(\t\022\016\n\006sender\030\010 \001(\t\022\014\n\004sign\030\t \001(\t\022\r\n\005thum" + - "b\030\n \001(\t\022\r\n\005extra\030\013 \001(\t\022\013\n\003xml\030\014 \001(\t\"7\n\007T" + - "extMsg\022\013\n\003msg\030\001 \001(\t\022\020\n\010receiver\030\002 \001(\t\022\r\n" + - "\005aters\030\003 \001(\t\")\n\007PathMsg\022\014\n\004path\030\001 \001(\t\022\020\n" + - "\010receiver\030\002 \001(\t\"G\n\006XmlMsg\022\020\n\010receiver\030\001 " + - "\001(\t\022\017\n\007content\030\002 \001(\t\022\014\n\004path\030\003 \001(\t\022\014\n\004ty" + - "pe\030\004 \001(\005\"a\n\010MsgTypes\022\'\n\005types\030\001 \003(\0132\030.wc" + - "f.MsgTypes.TypesEntry\032,\n\nTypesEntry\022\013\n\003k" + - "ey\030\001 \001(\005\022\r\n\005value\030\002 \001(\t:\0028\001\"\207\001\n\nRpcConta" + - "ct\022\014\n\004wxid\030\001 \001(\t\022\014\n\004code\030\002 \001(\t\022\016\n\006remark" + - "\030\003 \001(\t\022\014\n\004name\030\004 \001(\t\022\017\n\007country\030\005 \001(\t\022\020\n" + - "\010province\030\006 \001(\t\022\014\n\004city\030\007 \001(\t\022\016\n\006gender\030" + - "\010 \001(\005\"0\n\013RpcContacts\022!\n\010contacts\030\001 \003(\0132\017" + - ".wcf.RpcContact\"\030\n\007DbNames\022\r\n\005names\030\001 \003(" + - "\t\"$\n\007DbTable\022\014\n\004name\030\001 \001(\t\022\013\n\003sql\030\002 \001(\t\"" + - "(\n\010DbTables\022\034\n\006tables\030\001 \003(\0132\014.wcf.DbTabl" + - "e\"\"\n\007DbQuery\022\n\n\002db\030\001 \001(\t\022\013\n\003sql\030\002 \001(\t\"8\n" + - "\007DbField\022\014\n\004type\030\001 \001(\005\022\016\n\006column\030\002 \001(\t\022\017" + - "\n\007content\030\003 \001(\014\"%\n\005DbRow\022\034\n\006fields\030\001 \003(\013" + - "2\014.wcf.DbField\"\"\n\006DbRows\022\030\n\004rows\030\001 \003(\0132\n" + - ".wcf.DbRow\"5\n\014Verification\022\n\n\002v3\030\001 \001(\t\022\n" + - "\n\002v4\030\002 \001(\t\022\r\n\005scene\030\003 \001(\005\"+\n\nMemberMgmt\022" + - "\016\n\006roomid\030\001 \001(\t\022\r\n\005wxids\030\002 \001(\t\"D\n\010UserIn" + - "fo\022\014\n\004wxid\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022\016\n\006mobile" + - "\030\003 \001(\t\022\014\n\004home\030\004 \001(\t\"#\n\007DecPath\022\013\n\003src\030\001" + - " \001(\t\022\013\n\003dst\030\002 \001(\t\"4\n\010Transfer\022\014\n\004wxid\030\001 " + - "\001(\t\022\014\n\004tfid\030\002 \001(\t\022\014\n\004taid\030\003 \001(\t\"5\n\tAttac" + - "hMsg\022\n\n\002id\030\001 \001(\004\022\r\n\005thumb\030\002 \001(\t\022\r\n\005extra" + - "\030\003 \001(\t\"#\n\010AudioMsg\022\n\n\002id\030\001 \001(\004\022\013\n\003dir\030\002 " + - "\001(\t\"y\n\010RichText\022\014\n\004name\030\001 \001(\t\022\017\n\007account" + - "\030\002 \001(\t\022\r\n\005title\030\003 \001(\t\022\016\n\006digest\030\004 \001(\t\022\013\n" + - "\003url\030\005 \001(\t\022\020\n\010thumburl\030\006 \001(\t\022\020\n\010receiver" + - "\030\007 \001(\t\"&\n\006PatMsg\022\016\n\006roomid\030\001 \001(\t\022\014\n\004wxid" + - "\030\002 \001(\t*\260\005\n\tFunctions\022\021\n\rFUNC_RESERVED\020\000\022" + - "\021\n\rFUNC_IS_LOGIN\020\001\022\026\n\022FUNC_GET_SELF_WXID" + - "\020\020\022\026\n\022FUNC_GET_MSG_TYPES\020\021\022\025\n\021FUNC_GET_C" + - "ONTACTS\020\022\022\025\n\021FUNC_GET_DB_NAMES\020\023\022\026\n\022FUNC" + - "_GET_DB_TABLES\020\024\022\026\n\022FUNC_GET_USER_INFO\020\025" + - "\022\026\n\022FUNC_GET_AUDIO_MSG\020\026\022\021\n\rFUNC_SEND_TX" + - "T\020 \022\021\n\rFUNC_SEND_IMG\020!\022\022\n\016FUNC_SEND_FILE" + - "\020\"\022\021\n\rFUNC_SEND_XML\020#\022\025\n\021FUNC_SEND_EMOTI" + - "ON\020$\022\026\n\022FUNC_SEND_RICH_TXT\020%\022\025\n\021FUNC_SEN" + - "D_PAT_MSG\020&\022\030\n\024FUNC_ENABLE_RECV_TXT\0200\022\031\n" + - "\025FUNC_DISABLE_RECV_TXT\020@\022\026\n\022FUNC_EXEC_DB" + - "_QUERY\020P\022\026\n\022FUNC_ACCEPT_FRIEND\020Q\022\026\n\022FUNC" + - "_RECV_TRANSFER\020R\022\024\n\020FUNC_REFRESH_PYQ\020S\022\030" + - "\n\024FUNC_DOWNLOAD_ATTACH\020T\022\031\n\025FUNC_GET_CON" + - "TACT_INFO\020U\022\023\n\017FUNC_REVOKE_MSG\020V\022\026\n\022FUNC" + - "_DECRYPT_IMAGE\020`\022\031\n\025FUNC_ADD_ROOM_MEMBER" + - "S\020p\022\031\n\025FUNC_DEL_ROOM_MEMBERS\020q\022\031\n\025FUNC_I" + - "NV_ROOM_MEMBERS\020rB\r\n\013com.iamteerb\006proto3" + "\001(\0132\r.wcf.TransferH\000\022\022\n\004ui64\030\014 \001(\004B\0020\001H\000" + + "\022\016\n\004flag\030\r \001(\010H\000\022\035\n\003att\030\016 \001(\0132\016.wcf.Atta" + + "chMsgH\000\022\033\n\002am\030\017 \001(\0132\r.wcf.AudioMsgH\000\022\033\n\002" + + "rt\030\020 \001(\0132\r.wcf.RichTextH\000\022\031\n\002pm\030\021 \001(\0132\013." + + "wcf.PatMsgH\000\022\035\n\002fm\030\022 \001(\0132\017.wcf.ForwardMs" + + "gH\000B\005\n\003msg\"\307\002\n\010Response\022\034\n\004func\030\001 \001(\0162\016." + + "wcf.Functions\022\020\n\006status\030\002 \001(\005H\000\022\r\n\003str\030\003" + + " \001(\tH\000\022\033\n\005wxmsg\030\004 \001(\0132\n.wcf.WxMsgH\000\022\036\n\005t" + + "ypes\030\005 \001(\0132\r.wcf.MsgTypesH\000\022$\n\010contacts\030" + + "\006 \001(\0132\020.wcf.RpcContactsH\000\022\033\n\003dbs\030\007 \001(\0132\014" + + ".wcf.DbNamesH\000\022\037\n\006tables\030\010 \001(\0132\r.wcf.DbT" + + "ablesH\000\022\033\n\004rows\030\t \001(\0132\013.wcf.DbRowsH\000\022\033\n\002" + + "ui\030\n \001(\0132\r.wcf.UserInfoH\000\022\032\n\003ocr\030\013 \001(\0132\013" + + ".wcf.OcrMsgH\000B\005\n\003msg\"\007\n\005Empty\"\276\001\n\005WxMsg\022" + + "\017\n\007is_self\030\001 \001(\010\022\020\n\010is_group\030\002 \001(\010\022\016\n\002id" + + "\030\003 \001(\004B\0020\001\022\014\n\004type\030\004 \001(\r\022\n\n\002ts\030\005 \001(\r\022\016\n\006" + + "roomid\030\006 \001(\t\022\017\n\007content\030\007 \001(\t\022\016\n\006sender\030" + + "\010 \001(\t\022\014\n\004sign\030\t \001(\t\022\r\n\005thumb\030\n \001(\t\022\r\n\005ex" + + "tra\030\013 \001(\t\022\013\n\003xml\030\014 \001(\t\"7\n\007TextMsg\022\013\n\003msg" + + "\030\001 \001(\t\022\020\n\010receiver\030\002 \001(\t\022\r\n\005aters\030\003 \001(\t\"" + + ")\n\007PathMsg\022\014\n\004path\030\001 \001(\t\022\020\n\010receiver\030\002 \001" + + "(\t\"G\n\006XmlMsg\022\020\n\010receiver\030\001 \001(\t\022\017\n\007conten" + + "t\030\002 \001(\t\022\014\n\004path\030\003 \001(\t\022\014\n\004type\030\004 \001(\005\"a\n\010M" + + "sgTypes\022\'\n\005types\030\001 \003(\0132\030.wcf.MsgTypes.Ty" + + "pesEntry\032,\n\nTypesEntry\022\013\n\003key\030\001 \001(\005\022\r\n\005v" + + "alue\030\002 \001(\t:\0028\001\"\207\001\n\nRpcContact\022\014\n\004wxid\030\001 " + + "\001(\t\022\014\n\004code\030\002 \001(\t\022\016\n\006remark\030\003 \001(\t\022\014\n\004nam" + + "e\030\004 \001(\t\022\017\n\007country\030\005 \001(\t\022\020\n\010province\030\006 \001" + + "(\t\022\014\n\004city\030\007 \001(\t\022\016\n\006gender\030\010 \001(\005\"0\n\013RpcC" + + "ontacts\022!\n\010contacts\030\001 \003(\0132\017.wcf.RpcConta" + + "ct\"\030\n\007DbNames\022\r\n\005names\030\001 \003(\t\"$\n\007DbTable\022" + + "\014\n\004name\030\001 \001(\t\022\013\n\003sql\030\002 \001(\t\"(\n\010DbTables\022\034" + + "\n\006tables\030\001 \003(\0132\014.wcf.DbTable\"\"\n\007DbQuery\022" + + "\n\n\002db\030\001 \001(\t\022\013\n\003sql\030\002 \001(\t\"8\n\007DbField\022\014\n\004t" + + "ype\030\001 \001(\005\022\016\n\006column\030\002 \001(\t\022\017\n\007content\030\003 \001" + + "(\014\"%\n\005DbRow\022\034\n\006fields\030\001 \003(\0132\014.wcf.DbFiel" + + "d\"\"\n\006DbRows\022\030\n\004rows\030\001 \003(\0132\n.wcf.DbRow\"5\n" + + "\014Verification\022\n\n\002v3\030\001 \001(\t\022\n\n\002v4\030\002 \001(\t\022\r\n" + + "\005scene\030\003 \001(\005\"+\n\nMemberMgmt\022\016\n\006roomid\030\001 \001" + + "(\t\022\r\n\005wxids\030\002 \001(\t\"D\n\010UserInfo\022\014\n\004wxid\030\001 " + + "\001(\t\022\014\n\004name\030\002 \001(\t\022\016\n\006mobile\030\003 \001(\t\022\014\n\004hom" + + "e\030\004 \001(\t\"#\n\007DecPath\022\013\n\003src\030\001 \001(\t\022\013\n\003dst\030\002" + + " \001(\t\"4\n\010Transfer\022\014\n\004wxid\030\001 \001(\t\022\014\n\004tfid\030\002" + + " \001(\t\022\014\n\004taid\030\003 \001(\t\"9\n\tAttachMsg\022\016\n\002id\030\001 " + + "\001(\004B\0020\001\022\r\n\005thumb\030\002 \001(\t\022\r\n\005extra\030\003 \001(\t\"\'\n" + + "\010AudioMsg\022\016\n\002id\030\001 \001(\004B\0020\001\022\013\n\003dir\030\002 \001(\t\"y" + + "\n\010RichText\022\014\n\004name\030\001 \001(\t\022\017\n\007account\030\002 \001(" + + "\t\022\r\n\005title\030\003 \001(\t\022\016\n\006digest\030\004 \001(\t\022\013\n\003url\030" + + "\005 \001(\t\022\020\n\010thumburl\030\006 \001(\t\022\020\n\010receiver\030\007 \001(" + + "\t\"&\n\006PatMsg\022\016\n\006roomid\030\001 \001(\t\022\014\n\004wxid\030\002 \001(" + + "\t\"(\n\006OcrMsg\022\016\n\006status\030\001 \001(\005\022\016\n\006result\030\002 " + + "\001(\t\".\n\nForwardMsg\022\016\n\002id\030\001 \001(\004B\0020\001\022\020\n\010rec" + + "eiver\030\002 \001(\t*\362\005\n\tFunctions\022\021\n\rFUNC_RESERV" + + "ED\020\000\022\021\n\rFUNC_IS_LOGIN\020\001\022\026\n\022FUNC_GET_SELF" + + "_WXID\020\020\022\026\n\022FUNC_GET_MSG_TYPES\020\021\022\025\n\021FUNC_" + + "GET_CONTACTS\020\022\022\025\n\021FUNC_GET_DB_NAMES\020\023\022\026\n" + + "\022FUNC_GET_DB_TABLES\020\024\022\026\n\022FUNC_GET_USER_I" + + "NFO\020\025\022\026\n\022FUNC_GET_AUDIO_MSG\020\026\022\021\n\rFUNC_SE" + + "ND_TXT\020 \022\021\n\rFUNC_SEND_IMG\020!\022\022\n\016FUNC_SEND" + + "_FILE\020\"\022\021\n\rFUNC_SEND_XML\020#\022\025\n\021FUNC_SEND_" + + "EMOTION\020$\022\026\n\022FUNC_SEND_RICH_TXT\020%\022\025\n\021FUN" + + "C_SEND_PAT_MSG\020&\022\024\n\020FUNC_FORWARD_MSG\020\'\022\030" + + "\n\024FUNC_ENABLE_RECV_TXT\0200\022\031\n\025FUNC_DISABLE" + + "_RECV_TXT\020@\022\026\n\022FUNC_EXEC_DB_QUERY\020P\022\026\n\022F" + + "UNC_ACCEPT_FRIEND\020Q\022\026\n\022FUNC_RECV_TRANSFE" + + "R\020R\022\024\n\020FUNC_REFRESH_PYQ\020S\022\030\n\024FUNC_DOWNLO" + + "AD_ATTACH\020T\022\031\n\025FUNC_GET_CONTACT_INFO\020U\022\023" + + "\n\017FUNC_REVOKE_MSG\020V\022\027\n\023FUNC_REFRESH_QRCO" + + "DE\020W\022\026\n\022FUNC_DECRYPT_IMAGE\020`\022\021\n\rFUNC_EXE" + + "C_OCR\020a\022\031\n\025FUNC_ADD_ROOM_MEMBERS\020p\022\031\n\025FU" + + "NC_DEL_ROOM_MEMBERS\020q\022\031\n\025FUNC_INV_ROOM_M" + + "EMBERS\020rB\r\n\013com.iamteerb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -29027,13 +33311,13 @@ java.lang.String defaultValue) { internal_static_wcf_Request_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_wcf_Request_descriptor, - new java.lang.String[] { "Func", "Empty", "Str", "Txt", "File", "Query", "V", "M", "Xml", "Dec", "Tf", "Ui64", "Flag", "Att", "Am", "Rt", "Pm", "Msg", }); + new java.lang.String[] { "Func", "Empty", "Str", "Txt", "File", "Query", "V", "M", "Xml", "Dec", "Tf", "Ui64", "Flag", "Att", "Am", "Rt", "Pm", "Fm", "Msg", }); internal_static_wcf_Response_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_wcf_Response_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_wcf_Response_descriptor, - new java.lang.String[] { "Func", "Status", "Str", "Wxmsg", "Types", "Contacts", "Dbs", "Tables", "Rows", "Ui", "Msg", }); + new java.lang.String[] { "Func", "Status", "Str", "Wxmsg", "Types", "Contacts", "Dbs", "Tables", "Rows", "Ui", "Ocr", "Msg", }); internal_static_wcf_Empty_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_wcf_Empty_fieldAccessorTable = new @@ -29184,6 +33468,18 @@ java.lang.String defaultValue) { com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_wcf_PatMsg_descriptor, new java.lang.String[] { "Roomid", "Wxid", }); + internal_static_wcf_OcrMsg_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_wcf_OcrMsg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_wcf_OcrMsg_descriptor, + new java.lang.String[] { "Status", "Result", }); + internal_static_wcf_ForwardMsg_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_wcf_ForwardMsg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_wcf_ForwardMsg_descriptor, + new java.lang.String[] { "Id", "Receiver", }); } // @@protoc_insertion_point(outer_class_scope) From 5b75c57b53e24969e24d0202bfcd6ac215092531 Mon Sep 17 00:00:00 2001 From: origin <15806889114@163.com> Date: Thu, 11 Jul 2024 17:02:31 +0800 Subject: [PATCH 55/55] =?UTF-8?q?=E4=BF=AE=E7=90=86=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E4=B8=AD=E7=BC=BA=E5=B0=91=E7=9A=84=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clients/go_wcf_http/app/api.go | 23 +++++++- clients/go_wcf_http/app/robot.go | 59 ++++++++++++++++++- clients/go_wcf_http/go.mod | 1 + clients/go_wcf_http/go.sum | 2 + clients/go_wcf_http/mian.go | 24 ++++++-- .../templates/wechatFerryGoHttp.html | 2 +- clients/go_wcf_http/wcf/wcf.go | 5 +- 7 files changed, 106 insertions(+), 10 deletions(-) diff --git a/clients/go_wcf_http/app/api.go b/clients/go_wcf_http/app/api.go index af34556..473f544 100644 --- a/clients/go_wcf_http/app/api.go +++ b/clients/go_wcf_http/app/api.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/gin-gonic/gin" "net/http" + "time" ) type Result struct { @@ -196,6 +197,7 @@ func SendIMG(c *gin.Context) { var RequestData struct { Path string `json:"path"` Receiver string `json:"receiver"` + Suffix string `json:"suffix"` } if err := c.BindJSON(&RequestData); err != nil { result.Code = 0 @@ -205,6 +207,9 @@ func SendIMG(c *gin.Context) { c.JSON(http.StatusOK, result) return } + if RequestData.Path[0:4] == "http" { + RequestData.Path, _ = DownloadFile(RequestData.Path, "file", RequestData.Suffix) + } result.Code = 1 result.Message = "发送完成" var data = WxClient.SendIMG(RequestData.Path, RequestData.Receiver) @@ -218,6 +223,7 @@ func SendFile(c *gin.Context) { var RequestData struct { Path string `json:"path"` Receiver string `json:"receiver"` + Suffix string `json:"suffix"` } if err := c.BindJSON(&RequestData); err != nil { result.Code = 0 @@ -227,6 +233,9 @@ func SendFile(c *gin.Context) { c.JSON(http.StatusOK, result) return } + if RequestData.Path[0:4] == "http" { + RequestData.Path, _ = DownloadFile(RequestData.Path, "file", RequestData.Suffix) + } result.Code = 1 result.Message = "发送完成" var data = WxClient.SendFile(RequestData.Path, RequestData.Receiver) @@ -444,7 +453,17 @@ func DownloadAttach(c *gin.Context) { } result.Code = 1 result.Message = "下载附件调用成功" - var data = WxClient.DownloadAttach(RequestData.Id, RequestData.Thumb, RequestData.Extra) - result.Data = data + WxClient.DownloadAttach(RequestData.Id, "", RequestData.Extra) + times := 1 + path := "" + for times < 30 { + path = WxClient.DecryptImage(RequestData.Extra, RequestData.Thumb) + if path != "func:FUNC_DECRYPT_IMAGE str:\"\"" && path != "func:FUNC_DECRYPT_IMAGE str:\"\"" { + break + } + time.Sleep(time.Millisecond * 1000) + times += 1 + } + result.Data = map[string]string{"path": path} c.JSON(http.StatusOK, result) } diff --git a/clients/go_wcf_http/app/robot.go b/clients/go_wcf_http/app/robot.go index ec9c6cd..ddb6ee0 100644 --- a/clients/go_wcf_http/app/robot.go +++ b/clients/go_wcf_http/app/robot.go @@ -10,8 +10,15 @@ extern int WxDestroySDK(); */ import "C" import ( + "bytes" "fmt" + "github.com/go-resty/resty/v2" + "github.com/google/uuid" "go_wechatFerry/wcf" + "io" + "os" + "path/filepath" + "strings" "time" ) @@ -19,6 +26,7 @@ var WxClient *wcf.Client // Message 组装成一个结构体展示消息 type Message struct { + IsSelf bool `json:"is_self,omitempty"` IsGroup bool `json:"is_group,omitempty"` MessageId uint64 `json:"message_id,omitempty"` Type uint32 `json:"type,omitempty"` @@ -27,12 +35,13 @@ type Message struct { Content string `json:"content,omitempty"` WxId string `json:"wx_id,omitempty"` Sign string `json:"sign,omitempty"` + Thumb string `json:"thumb,omitempty"` + Extra string `json:"extra,omitempty"` Xml string `json:"xml,omitempty"` } // WechatFerryInit 调用sdk.dll中的WxInitSdk 进行启动微信并注入 func WechatFerryInit() { - // 调试模式 端口 initSuccess := C.WxInitSDK(C.bool(false), C.int(10086)) if initSuccess == 0 { @@ -60,6 +69,13 @@ func WechatFerryInit() { fmt.Println("初始化完成") } +// MessageProcess 在这里可以继续写代码了 +func MessageProcess(msg Message) { + // 方法都在WxClient中 + //WxClient.SendTxt("测试","","") + fmt.Println(msg) +} + // ContactsInit 通讯录初始化 func ContactsInit() { var contactsMap []map[string]string @@ -86,3 +102,44 @@ func ContactsInit() { } WxClient.ContactsMap = contactsMap } + +// DownloadFile 下载文件 +func DownloadFile(url string, fileType string, suffix string) (string, error) { + fmt.Println(url) + // 发送HTTP请求获取文件 + resp, err := resty.New().R().Get(url) + if err != nil { + return "", err + } + + // 获取当前日期 + currentTime := time.Now() + datePath := filepath.Join("./resource/static/"+fileType, currentTime.Format("2006-01-02")) + // 创建目录 + if err := os.MkdirAll(datePath, os.ModePerm); err != nil { + return "", err + } + + // 生成唯一的文件名 + fileName := uuid.New().String() + "." + suffix + filePath := filepath.Join(datePath, fileName) + + // 创建文件 + file, err := os.Create(filePath) + if err != nil { + return "", err + } + defer file.Close() + // 将HTTP响应的Body复制到文件 + _, err = io.Copy(file, bytes.NewBuffer(resp.Body())) + if err != nil { + return "", err + } + currentDir, err := os.Getwd() + if err != nil { + return "", err + } + filePath = currentDir + "/" + filePath + filePath = strings.Replace(filePath, "\\", "/", -1) + return filePath, nil +} diff --git a/clients/go_wcf_http/go.mod b/clients/go_wcf_http/go.mod index a12ae38..cf74752 100644 --- a/clients/go_wcf_http/go.mod +++ b/clients/go_wcf_http/go.mod @@ -6,6 +6,7 @@ require ( github.com/danbai225/go-logs v0.3.2 github.com/gin-gonic/gin v1.10.0 github.com/go-resty/resty/v2 v2.13.1 + github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.0 go.nanomsg.org/mangos/v3 v3.4.2 google.golang.org/protobuf v1.34.2 diff --git a/clients/go_wcf_http/go.sum b/clients/go_wcf_http/go.sum index 648f5c6..686d3b1 100644 --- a/clients/go_wcf_http/go.sum +++ b/clients/go_wcf_http/go.sum @@ -36,6 +36,8 @@ github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MG github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= diff --git a/clients/go_wcf_http/mian.go b/clients/go_wcf_http/mian.go index 40268d9..93f9243 100644 --- a/clients/go_wcf_http/mian.go +++ b/clients/go_wcf_http/mian.go @@ -103,12 +103,13 @@ func httpInit() { // 下载附件 r.POST("/api/DownloadAttach", app.DownloadAttach) - r.Run(":8000") + r.Run("127.0.0.1:8000") } func OnMsg() { err := app.WxClient.OnMSG(func(msg *wcf.WxMsg) { var message app.Message + message.IsSelf = msg.IsSelf message.IsGroup = msg.IsGroup message.MessageId = msg.Id message.Type = msg.Type @@ -117,7 +118,10 @@ func OnMsg() { message.Content = msg.Content message.Sign = msg.Sign message.WxId = msg.Sender + message.Thumb = msg.Thumb + message.Extra = msg.Extra message.Xml = msg.Xml + // 如果你设置了回调链接 那么他就是会传给你 如果你没设置 你可以在else中 添加你的代码 直接删掉 回调的判断即可 if app.WxClient.MessageCallbackUrl != "" { var data = map[string]interface{}{ "code": 0, @@ -177,11 +181,23 @@ func OnMsg() { } } } else { - // 植入我自己的功能接口 - fmt.Println("请设置消息回调的url") + //fmt.Println("消息类型:", message.Type) + //fmt.Println("消息Thumb:", message.Thumb) // 这个可以直接下载 + //fmt.Println("消息Extra:", message.Extra) // 这个要点一下才能下载(自行处理) + //fmt.Println("消息xml:", message.Xml) + //if message.Type == 3 { + // resp, _ := resty.New().R().SetBody(map[string]interface{}{ + // "id": message.MessageId, + // "thumb": "F:/c++/WeChatFerry/clients/go_wcf_http/", //下载到本地的哪里 + // "extra": message.Thumb, // 看上面的 + // }).Post("http://127.0.0.1:8001/api/DownloadAttach") + // fmt.Println(resp.String()) + // fmt.Println(resp.Error()) + // fmt.Println(resp.StatusCode()) + //} + go app.MessageProcess(message) } }) - fmt.Println(err) if err != nil { fmt.Println(err) OnMsg() diff --git a/clients/go_wcf_http/templates/wechatFerryGoHttp.html b/clients/go_wcf_http/templates/wechatFerryGoHttp.html index a653024..01bef45 100644 --- a/clients/go_wcf_http/templates/wechatFerryGoHttp.html +++ b/clients/go_wcf_http/templates/wechatFerryGoHttp.html @@ -203,7 +203,7 @@ var r=n(237),i=n(238),o=n(135);function u(){return a.TYPED_ARRAY_SUPPORT?2147483 window.onload = function() { // Begin Swagger UI call region const ui = SwaggerUIBundle({ - spec:{"openapi":"3.0.1","info":{"title":"wechatFerryGoHttp","description":"","version":"1.0.0"},"tags":[{"name":"这里面的不一定有效"}],"paths":{"/api/GetSelfWXID":{"get":{"summary":"获取登录的wx_id","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188922446-run"}},"/api/GetUserInfo":{"get":{"summary":"获取自己的信息","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188922449-run"}},"/api/GetMsgTypes":{"get":{"summary":"获取消息类型列表","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188922450-run"}},"/api/GetContacts":{"get":{"summary":"获取通讯录","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188922451-run"}},"/api/GetDBNames":{"get":{"summary":"获取数据库","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188922470-run"}},"/api/GetDBTables":{"post":{"summary":"获取表","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"db_name":{"type":"string","description":"数据库名(可通过 获取数据库接口 查询)"}},"required":["db_name"],"x-apifox-orders":["db_name"],"x-apifox-ignore-properties":[]},"example":{"db_name":"MSG0.db"}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188922472-run"}},"/api/ExecDBQuery":{"post":{"summary":"执行sql","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"db":{"type":"string","description":"要查询的数据库"},"sql":{"type":"string","description":"要执行的 SQL"}},"required":["db","sql"],"x-apifox-orders":["db","sql"],"x-apifox-ignore-properties":[]},"example":{"db":"MicroMsg.db","sql":"SELECT UserName, NickName FROM Contact;"}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188922526-run"}},"/api/SendTxt":{"post":{"summary":"发送文本消息","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"msg":{"type":"string","description":"要发送的消息,换行使用 \\n (单杠);如果 @ 人的话,需要带上跟 aters 里数量相同的 @"},"receiver":{"type":"string","description":"消息接收人,wxid 或者 roomid"},"ates":{"type":"array","items":{"type":"string"},"description":"要 @ 的 wxids"}},"required":["msg","receiver","ates"],"x-apifox-orders":["msg","receiver","ates"],"x-apifox-ignore-properties":[]},"example":{"msg":"@阿呆 你是谁","receiver":"39139856094@chatroom","ates":["wxid_k9i0ws42v8bt12"]}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188922646-run"}},"/api/SendIMG":{"post":{"summary":"发送图片","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","description":"本地路径"},"receiver":{"type":"string","description":"消息接收人,wxid 或者 roomid"}},"required":["path","receiver"],"x-apifox-orders":["path","receiver"],"x-apifox-ignore-properties":[]},"example":{"path":"C:/Users/fanruizhe/Desktop/微信图片_20240615112647.jpg","receiver":""}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188922867-run"}},"/api/SendFile":{"post":{"summary":"发送文件","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","description":"本地路径"},"receiver":{"type":"string","description":"消息接收人,wxid 或者 roomid"}},"required":["path","receiver"],"x-apifox-orders":["path","receiver"],"x-apifox-ignore-properties":[]},"example":{"path":"C:/Users/fanruizhe/Desktop/frp_0.41.0_linux_amd64.tar.gz","receiver":"39139856094@chatroom"}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188923312-run"}},"/api/SendRichText":{"post":{"summary":"发送卡片消息","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"左下显示的名字"},"account":{"type":"string","description":"填公众号 id 可以显示对应的头像(gh_ 开头的)"},"title":{"type":"string","description":"标题,最多两行"},"digest":{"type":"string","description":"摘要,三行"},"url":{"type":"string","description":"点击后跳转的链接"},"thumb_url":{"type":"string","description":"缩略图的链接"},"receiver":{"type":"string","description":"接收人, wxid 或者 roomid"}},"required":["name","account","title","digest","url","thumb_url","receiver"],"x-apifox-orders":["name","account","title","digest","url","thumb_url","receiver"],"x-apifox-ignore-properties":[]},"example":{"name":"关注公众号: 一条爱睡觉的咸鱼","account":"gh_0c617dab0f5f","title":"测试","digest":"测试","url":"https://apifox.com/apidoc/shared-edbfcebc-6263-4e87-9813-54520c1b3c19","thumb_url":"https://wx.qlogo.cn/mmopen/r48cSSlr7jgFutEJFpmolCux6WWZsm92KLTOmWITDvqPVIO5kLpTblfqsxuGzaZvGkgHsBOohkWuZlZuF48hRVEIcjRu1wVF/64","receiver":"39139856094@chatroom"}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188923405-run"}},"/api/SetMessageCallbackUrl":{"post":{"summary":"设置消息回调地址","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"callback_url":{"type":"string","description":"这里填写你要接受消息的地址 支持http tcp websockt udp"}},"required":["callback_url"],"x-apifox-orders":["callback_url"],"x-apifox-ignore-properties":[]},"example":{"callback_url":""}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188923505-run"}},"/api/SendPat":{"post":{"summary":"发送拍一拍消息","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"room_id":{"type":"string","description":"群 id"},"wx_id":{"type":"string","description":"要拍的群友的 wxid"}},"required":["room_id","wx_id"],"x-apifox-orders":["room_id","wx_id"],"x-apifox-ignore-properties":[]},"example":{"room_id":"39139856094@chatroom","wx_id":"wxid_k9i0ws42v8bt12"}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188923679-run"}},"/api/GetRoomMembersAll":{"get":{"summary":"获取所有群里面的所有人","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188923926-run"}},"/api/GetRoomMember":{"post":{"summary":"获取指定群成员列表","x-apifox-folder":"","x-apifox-status":"developing","deprecated":false,"description":"没写完 自行实现吧 懒得写了","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"room_id":{"type":"string"}},"required":["room_id"],"x-apifox-orders":["room_id"],"x-apifox-ignore-properties":[]},"example":{"room_id":"39139856094@chatroom"}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188923981-run"}},"/api/SendEmotion":{"post":{"summary":"发送emoji消息","x-apifox-folder":"这里面的不一定有效","x-apifox-status":"released","deprecated":false,"description":"","tags":["这里面的不一定有效"],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","description":"本地文件路径"},"receiver":{"type":"string","description":"消息接收人,wxid 或者 roomid"}},"required":["path","receiver"],"x-apifox-orders":["path","receiver"],"x-apifox-ignore-properties":[]},"example":{"path":".gif","receiver":"39139856094@chatroom"}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188926258-run"}},"/api/AcceptFriend":{"post":{"summary":"接受好友请求","x-apifox-folder":"这里面的不一定有效","x-apifox-status":"released","deprecated":false,"description":"","tags":["这里面的不一定有效"],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"v3":{"type":"string","description":"加密用户名 (好友申请消息里 v3 开头的字符串)"},"v4":{"type":"string","description":"Ticket (好友申请消息里 v4 开头的字符串)"},"scene":{"type":"integer","description":"申请方式 (好友申请消息里的 scene); 为了兼容旧接口,默认为扫码添加 (30)"}},"required":["v3","v4","scene"],"x-apifox-orders":["v3","v4","scene"],"x-apifox-ignore-properties":[]},"example":{"v3":"","v4":"","scene":123}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188926268-run"}},"/api/AddChatroomMembers":{"post":{"summary":"添加群成员","x-apifox-folder":"这里面的不一定有效","x-apifox-status":"released","deprecated":false,"description":"","tags":["这里面的不一定有效"],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"room_id":{"type":"string","description":"群的 id"},"wx_ids":{"type":"array","items":{"type":"string"},"description":"邀请成员的 wxid"}},"required":["room_id","wx_ids"],"x-apifox-orders":["room_id","wx_ids"],"x-apifox-ignore-properties":[]},"example":{"room_id":"","wx_ids":[]}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188926281-run"}},"/api/DelChatRoomMembers":{"post":{"summary":"删除群成员","x-apifox-folder":"这里面的不一定有效","x-apifox-status":"released","deprecated":false,"description":"","tags":["这里面的不一定有效"],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"room_id":{"type":"string","description":"群的 id"},"wx_ids":{"type":"array","items":{"type":"string"},"description":"邀请成员的 wxid"}},"required":["room_id","wx_ids"],"x-apifox-orders":["room_id","wx_ids"],"x-apifox-ignore-properties":[]},"example":{"room_id":"","wx_ids":[]}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188926286-run"}},"/api/InvChatRoomMembers":{"post":{"summary":"邀请群成员","x-apifox-folder":"这里面的不一定有效","x-apifox-status":"released","deprecated":false,"description":"","tags":["这里面的不一定有效"],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"room_id":{"type":"string","description":"群的 id"},"wx_ids":{"type":"array","items":{"type":"string"},"description":"要邀请成员的 wxid"}},"required":["room_id","wx_ids"],"x-apifox-orders":["room_id","wx_ids"],"x-apifox-ignore-properties":[]},"example":{"room_id":"","wx_ids":["a","b"]}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188926437-run"}},"/api/ForwardMsg":{"post":{"summary":"转发消息","x-apifox-folder":"这里面的不一定有效","x-apifox-status":"released","deprecated":false,"description":"","tags":["这里面的不一定有效"],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"待转发消息的 id"},"receiver":{"type":"string","description":"消息接收者,wxid 或者 roomid"}},"required":["id","receiver"],"x-apifox-orders":["id","receiver"],"x-apifox-ignore-properties":[]},"example":{"id":0,"receiver":""}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188926558-run"}},"//api/RefreshPyq":{"post":{"summary":"刷新朋友圈","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-189109366-run"}},"/api/DownloadAttach":{"post":{"summary":"下载附件","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"好理解,消息 id"},"thumb":{"type":"string","description":"图片或者视频的缩略图路径;如果是视频,后缀为 mp4 后就是存在路径了"},"extra":{"type":"string","description":"图片、文件的路径"}},"required":["id","thumb","extra"],"x-apifox-orders":["id","thumb","extra"],"x-apifox-ignore-properties":[]}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-189109926-run"}}},"components":{"schemas":{}},"servers":[{"url":"http://127.0.0.1:8000","description":"开发环境"}]}, + spec:{"openapi":"3.0.1","info":{"title":"wechatFerryGoHttp","description":"","version":"1.0.0"},"tags":[{"name":"这里面的不一定有效"}],"paths":{"/api/GetSelfWXID":{"get":{"summary":"获取登录的wx_id","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188922446-run"}},"/api/GetUserInfo":{"get":{"summary":"获取自己的信息","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188922449-run"}},"/api/GetMsgTypes":{"get":{"summary":"获取消息类型列表","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188922450-run"}},"/api/GetContacts":{"get":{"summary":"获取通讯录","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188922451-run"}},"/api/GetDBNames":{"get":{"summary":"获取数据库","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188922470-run"}},"/api/GetDBTables":{"post":{"summary":"获取表","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"db_name":{"type":"string","description":"数据库名(可通过 获取数据库接口 查询)"}},"required":["db_name"],"x-apifox-orders":["db_name"],"x-apifox-ignore-properties":[]},"example":{"db_name":"MSG0.db"}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188922472-run"}},"/api/ExecDBQuery":{"post":{"summary":"执行sql","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"db":{"type":"string","description":"要查询的数据库"},"sql":{"type":"string","description":"要执行的 SQL"}},"required":["db","sql"],"x-apifox-orders":["db","sql"],"x-apifox-ignore-properties":[]},"example":{"db":"MicroMsg.db","sql":"SELECT UserName, NickName FROM Contact;"}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188922526-run"}},"/api/SendTxt":{"post":{"summary":"发送文本消息","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"msg":{"type":"string","description":"要发送的消息,换行使用 \\n (单杠);如果 @ 人的话,需要带上跟 aters 里数量相同的 @"},"receiver":{"type":"string","description":"消息接收人,wxid 或者 roomid"},"ates":{"type":"array","items":{"type":"string"},"description":"要 @ 的 wxids"}},"required":["msg","receiver","ates"],"x-apifox-orders":["msg","receiver","ates"],"x-apifox-ignore-properties":[]},"example":{"msg":"@阿呆 你是谁","receiver":"39139856094@chatroom","ates":["wxid_k9i0ws42v8bt12"]}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188922646-run"}},"/api/SendIMG":{"post":{"summary":"发送图片","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","description":"本地路径(支持http)"},"receiver":{"type":"string","description":"消息接收人,wxid 或者 roomid"},"suffix":{"type":"string","description":"文件的后缀"}},"required":["path","receiver","suffix"],"x-apifox-orders":["path","receiver","suffix"],"x-apifox-ignore-properties":[]},"example":{"path":"C:/Users/fanruizhe/Desktop/微信图片_20240615112647.jpg","receiver":""}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188922867-run"}},"/api/SendFile":{"post":{"summary":"发送文件","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","description":"本地路径(支持http)"},"receiver":{"type":"string","description":"消息接收人,wxid 或者 roomid"},"suffix":{"type":"string","description":"文件的后缀"}},"required":["path","receiver","suffix"],"x-apifox-orders":["path","receiver","suffix"],"x-apifox-ignore-properties":[]},"example":{"path":"C:/Users/fanruizhe/Desktop/frp_0.41.0_linux_amd64.tar.gz","receiver":"39139856094@chatroom"}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188923312-run"}},"/api/SendRichText":{"post":{"summary":"发送卡片消息","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"左下显示的名字"},"account":{"type":"string","description":"填公众号 id 可以显示对应的头像(gh_ 开头的)"},"title":{"type":"string","description":"标题,最多两行"},"digest":{"type":"string","description":"摘要,三行"},"url":{"type":"string","description":"点击后跳转的链接"},"thumb_url":{"type":"string","description":"缩略图的链接"},"receiver":{"type":"string","description":"接收人, wxid 或者 roomid"}},"required":["name","account","title","digest","url","thumb_url","receiver"],"x-apifox-orders":["name","account","title","digest","url","thumb_url","receiver"],"x-apifox-ignore-properties":[]},"example":{"name":"关注公众号: 一条爱睡觉的咸鱼","account":"gh_0c617dab0f5f","title":"测试","digest":"测试","url":"https://apifox.com/apidoc/shared-edbfcebc-6263-4e87-9813-54520c1b3c19","thumb_url":"https://wx.qlogo.cn/mmopen/r48cSSlr7jgFutEJFpmolCux6WWZsm92KLTOmWITDvqPVIO5kLpTblfqsxuGzaZvGkgHsBOohkWuZlZuF48hRVEIcjRu1wVF/64","receiver":"39139856094@chatroom"}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188923405-run"}},"/api/SetMessageCallbackUrl":{"post":{"summary":"设置消息回调地址","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"callback_url":{"type":"string","description":"这里填写你要接受消息的地址 支持http tcp websockt udp"}},"required":["callback_url"],"x-apifox-orders":["callback_url"],"x-apifox-ignore-properties":[]},"example":{"callback_url":""}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188923505-run"}},"/api/SendPat":{"post":{"summary":"发送拍一拍消息","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"room_id":{"type":"string","description":"群 id"},"wx_id":{"type":"string","description":"要拍的群友的 wxid"}},"required":["room_id","wx_id"],"x-apifox-orders":["room_id","wx_id"],"x-apifox-ignore-properties":[]},"example":{"room_id":"39139856094@chatroom","wx_id":"wxid_k9i0ws42v8bt12"}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188923679-run"}},"/api/GetRoomMembersAll":{"get":{"summary":"获取所有群里面的所有人","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188923926-run"}},"/api/GetRoomMember":{"post":{"summary":"获取指定群成员列表","x-apifox-folder":"","x-apifox-status":"developing","deprecated":false,"description":"没写完 自行实现吧 懒得写了","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"room_id":{"type":"string"}},"required":["room_id"],"x-apifox-orders":["room_id"],"x-apifox-ignore-properties":[]},"example":{"room_id":"39139856094@chatroom"}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188923981-run"}},"/api/SendEmotion":{"post":{"summary":"发送emoji消息","x-apifox-folder":"这里面的不一定有效","x-apifox-status":"released","deprecated":false,"description":"","tags":["这里面的不一定有效"],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","description":"本地文件路径"},"receiver":{"type":"string","description":"消息接收人,wxid 或者 roomid"}},"required":["path","receiver"],"x-apifox-orders":["path","receiver"],"x-apifox-ignore-properties":[]},"example":{"path":".gif","receiver":"39139856094@chatroom"}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188926258-run"}},"/api/AcceptFriend":{"post":{"summary":"接受好友请求","x-apifox-folder":"这里面的不一定有效","x-apifox-status":"released","deprecated":false,"description":"","tags":["这里面的不一定有效"],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"v3":{"type":"string","description":"加密用户名 (好友申请消息里 v3 开头的字符串)"},"v4":{"type":"string","description":"Ticket (好友申请消息里 v4 开头的字符串)"},"scene":{"type":"integer","description":"申请方式 (好友申请消息里的 scene); 为了兼容旧接口,默认为扫码添加 (30)"}},"required":["v3","v4","scene"],"x-apifox-orders":["v3","v4","scene"],"x-apifox-ignore-properties":[]},"example":{"v3":"","v4":"","scene":123}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188926268-run"}},"/api/AddChatroomMembers":{"post":{"summary":"添加群成员","x-apifox-folder":"这里面的不一定有效","x-apifox-status":"released","deprecated":false,"description":"","tags":["这里面的不一定有效"],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"room_id":{"type":"string","description":"群的 id"},"wx_ids":{"type":"array","items":{"type":"string"},"description":"邀请成员的 wxid"}},"required":["room_id","wx_ids"],"x-apifox-orders":["room_id","wx_ids"],"x-apifox-ignore-properties":[]},"example":{"room_id":"","wx_ids":[]}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188926281-run"}},"/api/DelChatRoomMembers":{"post":{"summary":"删除群成员","x-apifox-folder":"这里面的不一定有效","x-apifox-status":"released","deprecated":false,"description":"","tags":["这里面的不一定有效"],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"room_id":{"type":"string","description":"群的 id"},"wx_ids":{"type":"array","items":{"type":"string"},"description":"邀请成员的 wxid"}},"required":["room_id","wx_ids"],"x-apifox-orders":["room_id","wx_ids"],"x-apifox-ignore-properties":[]},"example":{"room_id":"","wx_ids":[]}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188926286-run"}},"/api/InvChatRoomMembers":{"post":{"summary":"邀请群成员","x-apifox-folder":"这里面的不一定有效","x-apifox-status":"released","deprecated":false,"description":"","tags":["这里面的不一定有效"],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"room_id":{"type":"string","description":"群的 id"},"wx_ids":{"type":"array","items":{"type":"string"},"description":"要邀请成员的 wxid"}},"required":["room_id","wx_ids"],"x-apifox-orders":["room_id","wx_ids"],"x-apifox-ignore-properties":[]},"example":{"room_id":"","wx_ids":["a","b"]}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188926437-run"}},"/api/ForwardMsg":{"post":{"summary":"转发消息","x-apifox-folder":"这里面的不一定有效","x-apifox-status":"released","deprecated":false,"description":"","tags":["这里面的不一定有效"],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"待转发消息的 id"},"receiver":{"type":"string","description":"消息接收者,wxid 或者 roomid"}},"required":["id","receiver"],"x-apifox-orders":["id","receiver"],"x-apifox-ignore-properties":[]},"example":{"id":0,"receiver":""}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-188926558-run"}},"//api/RefreshPyq":{"post":{"summary":"刷新朋友圈","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-189109366-run"}},"/api/DownloadAttach":{"post":{"summary":"下载附件(目前仅可下载图片)","x-apifox-folder":"","x-apifox-status":"released","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"好理解,消息 id"},"thumb":{"type":"string","description":"这里填写要下载到本地的路径"},"extra":{"type":"string","description":"这里消息中有一个 Thumb(可以直接下载) 和 Extra(要点一下图片才能下载)"}},"required":["id","thumb","extra"],"x-apifox-orders":["id","thumb","extra"],"x-apifox-ignore-properties":[]}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","properties":{},"x-apifox-ignore-properties":[],"x-apifox-orders":[]}}}}},"x-run-in-apifox":"https://apifox.com/web/project/4740330/apis/api-189109926-run"}}},"components":{"schemas":{}},"servers":[{"url":"http://127.0.0.1:8000","description":"开发环境"}]}, dom_id: '#swagger-ui', deepLinking: true, presets: [ diff --git a/clients/go_wcf_http/wcf/wcf.go b/clients/go_wcf_http/wcf/wcf.go index 76d5ec5..65057cf 100644 --- a/clients/go_wcf_http/wcf/wcf.go +++ b/clients/go_wcf_http/wcf/wcf.go @@ -237,7 +237,7 @@ func (c *Client) RefreshPYQ() int32 { } // DecryptImage 解密图片 加密路径,解密路径 -func (c *Client) DecryptImage(src, dst string) int32 { +func (c *Client) DecryptImage(src, dst string) string { req := genFunReq(Functions_FUNC_DECRYPT_IMAGE) q := Request_Dec{ Dec: &DecPath{Src: src, Dst: dst}, @@ -251,7 +251,8 @@ func (c *Client) DecryptImage(src, dst string) int32 { if err != nil { logs.Err(err) } - return recv.GetStatus() + + return recv.String() } // AddChatRoomMembers 添加群成员