tomsj
V2EX  ›  问与答

请教一个 ios hook 的问题。在 isoer 逆都没人理。关于 apns 的 payload hook 问题

  •  
  •   tomsj · Dec 14, 2020 · 1354 views
    This topic created in 1983 days ago, the information mentioned may be changed or developed.

    最近在研究 push notification 的 hook 。网上找到了一个私有方法可以不过只能 hook 到 title message 。

    %hook BBServer
    -(void)_publishBulletinRequest:(id)arg1 forSectionID:(id)arg2 forDestinations:(unsigned long long)arg3 alwaysToLockScreen:(BOOL)arg4 {
        BBBulletinRequest* request = ((BBBulletinRequest*)arg1);
        NSString* appId = (NSString*)arg2;
        NSLog(@"NOTIFICATION RECEIVED: %@ - %@, %@, %@, %@", appId, request.title, request.subtitle, request.message, request.summaryArgument);
        %orig;
    }
    %end
    

    不知道老铁们有木有思路。能把 aps 以外到整个 apns 发送到整个 payload 也 hook 到

    {
    	"aps":{
    		"alert":"哈哈哈 1111234",
    		"sound":"default",
    		"badge":1
    	},
    	"rc":{
                 "cType":"PR",
                 "fId":"2121",
                 "oName":"RC:TxtMsg",
                 "tId":"3232",
                 "id":"5FSClm2gQ9V9BZ-kUZn58B",
                 "rc-dlt-identifier":"2FSClm2gQ9Q9BZ-kUZn54B"
         }
    	
    }
    
    
    2 replies    2020-12-14 18:16:32 +08:00
    MAKF
        1
    MAKF  
       Dec 14, 2020
    额,你在吹水论坛问这么高端的问题,只能沉帖了。。。
    我也不会,我看看有没有别人会
    tomsj
        2
    tomsj  
    OP
       Dec 14, 2020
    @MAKF 期待群里的大佬来个 tips
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1203 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 23:30 · PVG 07:30 · LAX 16:30 · JFK 19:30
    ♥ Do have faith in what you're doing.