寫在前面的話 羅列下本次逆向要使用的幾個工具php
最近個人朋友圈充滿了世界盃!幾乎每一個僞球迷都在刷直播世界盃!還有熱心的朋友發出了世界盃直播的App(央視影音 iOS)連接!點進去看了一下,可是看直播以前須要先看長達60秒的廣告。做爲iOS逆向愛好者,決定爲廣大球迷作點兒力所能及的事情----那就是去掉廣告
git
帶60廣告的證據圖github
void objc_msgSend_pre_call(RegState *rs, ThreadStackPublic *ts, CallStackPublic *cs, const HookEntryInfo *info) {
char *selector = (char *)rs->ZREG(1);
id tmpObject = (id)rs->ZREG(0);
Class tmpClass = object_getClass(tmpObject);
if (!tmpClass)
return;
const char *className = class_getName(tmpClass);
if (!strstr(className, "Ad") && !strstr(className, "Home")) {
return;
}
memset(decollators, '-', 512);
if (ts->size * 3 >= 512)
return;
decollators[ts->size * 3] = '\0';
printf("[OCMethodMonitor|%ld] %s [%s %s]\n", ts->thread_id, decollators, className, selector);
}
複製代碼
[OCMethodMonitor|7341845312] --- [CNAdPlayerView beatHandleForTime:]
[OCMethodMonitor|7341845312] ------ [CNAdPlayerView adTime]
[OCMethodMonitor|7341845312] ------ [CNAdPlayerView setSurplusSec:]
[OCMethodMonitor|7341845312] --------- [CNAdPlayerView adPlayerUIKit]
[OCMethodMonitor|7341845312] ------ [CNAdPlayerView queuePlayer]
[OCMethodMonitor|7341845312] ------ [CNAdPlayerView indexForPlayerItem:]
[OCMethodMonitor|7341845312] --------- [CNAdPlayerView playItems]
[OCMethodMonitor|7341845312] --------- [CNAdPlayerView playItems]
[OCMethodMonitor|7341845312] ------ [CNAdPlayerView playerEventType:value:]
[OCMethodMonitor|7341845312] --------- [CNAdPlayerView delegate]
[OCMethodMonitor|7341845312] --------- [CNAdPlayerView delegate]
[OCMethodMonitor|7341845312] --------- [CNAdPlayerView delegate]
[OCMethodMonitor|7341845312] ------ [CNAdPlayerView playDelayTime]
[OCMethodMonitor|7341845312] --------- [CNAdPlayerView adPlaying]
[OCMethodMonitor|7341845312] --------- [CNAdPlayerView adTimeout]
複製代碼
[OCMethodMonitor|7341845312] ------------ [AdsameBannerView alloc]
[OCMethodMonitor|7341845312] ------------ [AdsameBannerView initWithFrame:]
[OCMethodMonitor|7341845312] --------------- [AdsameBannerView setClipsToBounds:]
[OCMethodMonitor|7341845312] --------------- [AdsameBannerView setSlotStr:]
[OCMethodMonitor|7341845312] --------------- [AdsameCubeMaxSDK sharedSDK]
[OCMethodMonitor|7341845312] --------------- [AdsameCubeMaxSDK def_volume]
[OCMethodMonitor|7341845312] --------------- [AdsameCubeMaxSDK sharedSDK]
[OCMethodMonitor|7341845312] --------------- [AdsameCubeMaxSDK m_isMute]
[OCMethodMonitor|7341845312] --------------- [AdsameBannerView setIsOrderedBannerPaused:]
[OCMethodMonitor|7341845312] ------------ [AdsameBannerView setIsUsingCache:]
[OCMethodMonitor|7341845312] ------------ [AdsameBannerView setCId:]
[OCMethodMonitor|7341845312] ------------ [AdsameBannerView setSlotStr:]
[OCMethodMonitor|7341845312] ------------ [AdsameBannerView setIsUserExposure:]
[OCMethodMonitor|7341845312] ------------ [AdsameBannerView setParentSDK:]
[OCMethodMonitor|7341845312] ------------ [AdsameBannerView setDelegateBanner:]
[OCMethodMonitor|7341845312] ------------ [AdsameBannerView setIsRetina:]
複製代碼
// See http://iphonedevwiki.net/index.php/Logos
#import <UIKit/UIKit.h>
//AdsameBannerView
%hook AdsameBannerView
- (AdsameBannerView*)initWithFrame:(id)arg1{
return nil;
}
%end
%hook CNAdPlayerView
-(CNAdPlayerView*)initWithFrame:(id)arg1{
return nil;
}
%end
%hook CNADPlayerUIKit
-(CNADPlayerUIKit *)initWithFrame:(id)arg1{
return nil;
}
%end
%hook AdMasterMobileTracking
+(id)sharedInstance{
return nil;
}
-(AdMasterMobileTracking*)init
{
%log;
return nil;
}
%end
複製代碼
yuzhouheike.0a6j.cn/YSYY.ipabash
git源碼 https://github.com/yuzhouheike/HookZz-Learniphone