狗神 SMSNinja源码中的短信拦截

@snakeninny
狗神 我照着你的源码中 做IOS8.3的短信拦截

%group SNIncomingMessageHook_5_6_7_8
%hook IMDServiceSession

  • (void)didReceiveMessage:(id)message forChat:(NSString *)arg2 style:(unsigned char)arg3 // incoming iMessage_5/message_6_7_8
    {
    %log;
    %orig;
    NSLog(@“zenmebannnnnn”);
    }
    %end
    %end

%hook IMDaemon

  • (void)_loadServices
    {
    %orig;
    %init(SNIncomingMessageHook_5_6_7_8);
    }
    %end

结果却报错 error: non-initialized hook group: _ungrouped
查遍了 一头雾水啊 跪请狗神解答··

没有好好看书啊

%group SNIncomingMessageHook_5_6_7_8

%hook IMDServiceSession

  • (void)didReceiveMessage:(id)message forChat:(NSString *)arg2 style:(unsigned char)arg3 // incoming iMessage_5/message_6_7_8
    {
    %log;
    %init;
    NSLog(@“the message is coming”);
    }
    %end

%end

%hook IMDaemon

  • (void)_loadServices
    {
    %orig;
    %init(SNIncomingMessageHook_5_6_7_8);
    }
    %end

我这样就没有报错了 但是还是无效??
NSLog(@“SMSNinja: IMDServiceSession | didReceiveMessage:forChat:style: | address = “%@”, text = “%@”, with %lu attachments”, sender, text, (unsigned long)[pictureArray count]);
你源码里 这条在syslog中打印出来了 但是为什么我这样做就无效
请狗神教我··

我是在IOS8.3的机器上跑的···