开启邀请确认 type===2

Nov 13 16:40:58 iPhone WeChat[17909] <Warning>: KNHooklog :-(c)ChangeChatRoomAccessType:type:(have 2 value)
    return:0
    value1:__NSCFString-->558026@chatroom
    value2:__NSCFNumber-->2
    object:<CGroupMgr: 0x17234dd0>
     ##########################################

关闭邀请确认 type===0 默认方式

Nov 13 16:47:15 iPhone WeChat[17909] <Warning>: KNHooklog :-(c)ChangeChatRoomAccessType:type:(have 2 value)
    return:0
    value1:__NSCFString-->5587300026@chatroom
    value2:__NSCFNumber-->0
    object:<CGroupMgr: 0x17234dd0>
     ##########################################

自动确认 进群

Nov 13 17:01:06 iPhone WeChat[18048] <Warning>: KNHooklog :-(c)ApproveGroupMember:withInviterName:withInviteeList:withTicket:withUserData:(have 5 value)
    return:0
    value1:__NSCFString-->5587326@chatroom
    value2:__NSCFString-->z9291967
    value3:__NSArrayM-->(
        "wxid_h3qont4r812"
    )
    value4:__NSCFString-->AQAAAAEAAADmmQ49OnhUvQ7EySJ3aK5jfn8utlyAMy4/O0OVq+Wuf4Mb2PbCw3uOMqT0qGhRE935goBuxxE++7Idr9CppmqdTB5Myw==
    value5:(null)-->(null)
    object:<CGroupMgr: 0x1650a6f0>
     ##########################################
Nov 13 17:03:52 iPhone WeChat[18048] <Warning>: KNHooklog :-(c)ApproveGroupMember:withInviterName:withInviteeList:withTicket:withUserData:(have 5 value)
    return:0
    value1:__NSCFString-->558730026@chatroom
    value2:__NSCFString-->z9298967
    value3:__NSArrayM-->(
        "wxid_v6ycf1zm0412",
        "wxid_s90quokry022"
    )
    value4:__NSCFString-->AQAAAAEAAADfouacOnhUvQ7EySJ3aK5jfn8uttzEFU55/qMcS61qJm2vireaAgXPXy/SOu5dnELCXDYpZPljrL9E9g+OGvczUl43kQ==
    value5:(null)-->(null)
    object:<CGroupMgr: 0x1650a6f0>
     ##########################################
                <ticket><![CDATA[AQAAAAEAAACuIk1MOnhUvQ7EySJ3aK5jfn8utsSig6+QKmh2OWkrGL7ziLkvOrl5ddGXPLO5s63zjER8RzOXLyvwWxqgjaGoDy8x6A==]]></ticket>

解析XML

  -xmlDict:{
        NewXmlChatRoomAccessVerifyApplication =     {
            RoomName = "55800026@chatroom";
            link =         {
                inviterusername = z9298967;
                memberlist =             {
                    member =                 {
                        headimgurl = "http://wx.qlogo.cn/mmhead/ver_1/h4sO1QpZ9ZicGdWhibmlkC29fhmuZmIwElg6ALUgLmZr4icia1y5NlKRKXVujhMTeta46TibUFQPianqVJ7xRGaKSsbVe8FGMq8tcdk4ubZ34pMow/132";
                        nickname = "\U7701\U94b1\U5c0f\U52a9\U624b";
                        username = "wxid_xpq0n031so22";
                    };
                    memberlistsize = 1;
                };
                scene = "roomaccessapplycheck_approve";
                text = "\U53bb\U786e\U8ba4";
                ticket = "AQAAAAEAAAClvWDeOnhUvQ7EySJ3aK5jfn8utsSig6+QKmh2OWkrGL7ziLlIugENSlC0/Gm+vlFlni0rTibyPwCWtoBxmQcoarLffw==";
            };
            text = "\"Kevin\"\U60f3\U9080\U8bf71\U4f4d\U670b\U53cb\U52a0\U5165\U7fa4\U804a";
        };
        "__name" = sysmsg;
        "_type" = NewXmlChatRoomAccessVerifyApplication;
    }

邀请2个人的字典字段

:{
        NewXmlChatRoomAccessVerifyApplication =     {
            RoomName = "42990672@chatroom";
            link =         {
                invitationreason = hi;
                inviterusername = z9298967;
                memberlist =             {
                    member =                 (
                                            {
                            headimgurl = "http://wx.qlogo.cn/mmhead/ver_1/zvuphLN46AiaNC58IctticooVibiby4ic4skKzpY9SwtF9KvtbmyT3YeK1mDdvEJGW7adolWickTNM9Jn0TOWU9FpH3nhAfy0jIibJ85LicianeX6RjU/132";
                            nickname = "\U7701\U94b1\U5c0f\U52a9\U624b";
                            username = "wxid_h3qtytg4r812";
                        },
                                            {
                            headimgurl = "http://wx.qlogo.cn/mmhead/ver_1/dNw0O4qtiayY9N2iciaMhhMGrPPl364oB6seQwh9sohfYMQ1GklvPhXGdDAPF6lR7j99zKKDCzZ7xT9SUGQ0lGNzHhEVrpaia0AFmD1UlCAtuaU/132";
                            nickname = "\U7701\U94b1\U5c0f\U52a9\U624b";
                            username = "wxid_s90qukry022";
                        }
                    );
                    memberlistsize = 2;
                };
                scene = "roomaccessapplycheck_approve";
                text = "\U53bb\U786e\U8ba4";
                ticket = "AQAAAAEAAABVtgzKJCPb+IQnAbVJFw2xB+ZuILZrL0ibRW/QEtoEHc5SxKVsUSt9kemQoKN8deW7ODSDyLC19dPVVcMyJv6oWQINpg==";
            };
            text = "\"Kevin\"\U60f3\U9080\U8bf72\U4f4d\U670b\U53cb\U52a0\U5165\U7fa4\U804a";
        };
        "__name" = sysmsg;
        "_type" = NewXmlChatRoomAccessVerifyApplication;
    }

最终代码

#pragma mark - ******** 自动确认进群邀请
%new
- (BOOL)ApproveGroupMember:(NSString*)chatroom withInviterName:(NSString*)withInviterName withInviteeList:(NSMutableArray*)withInviteeList withTicket:(NSString*)withTicket{
    //调用自动通过的方法 - (BOOL)ApproveGroupMember:(id)arg1 withInviterName:(id)arg2 withInviteeList:(id)arg3 withTicket:(id)arg4 withUserData:(id)arg5;
    CGroupMgr *groupMgr = [[objc_getClass("MMServiceCenter") defaultCenter] getService:objc_getClass("CGroupMgr")];
    
    return  [groupMgr ApproveGroupMember:chatroom withInviterName:withInviterName withInviteeList:withInviteeList withTicket:withTicket withUserData:nil];
    
}

iOS逆向
44 声望15 粉丝