Tweak.x文件
#define PREFERENCE_FILE @"/var/mobile/Library/Preferences/apt.abcdl.cn.appboxprefer.plist"
#define PREFERENCE_KEY @"didiEnable"

// 读取配置文件apt.abcdl.cn.appboxprefer
static BOOL shouldHookFromPreference(NSString *preferenceSetting) {

    BOOL didiEnable = NO;
    NSMutableDictionary *plist = [[NSMutableDictionary alloc] initWithContentsOfFile:PREFERENCE_FILE];

    if (plist) {
        didiEnable = [[plist objectForKey:preferenceSetting] boolValue];
    
    } else {
  
    }

    return didiEnable;
}

// Hook 函数
%group hook


%hook FLPatch
- (id)apiVersion {
    return @"2";
}
%end

%hook XPControlViewController
- (void)setOperatingURLStr:(id)arg1 {
}
%end

%hook ONEPreheatViewController
- (void)viewDidLoad {
}
%end

%hook XPDomesticPanelViewController
- (void)setConfiguration:(id)arg1 {
}
%end

%hook DSLHomeViewController
- (void)configViewManager {
}
%end

%hook SCarHomeViewController
- (void)setContentFrame:(CGRect)arg1 {
}
%end

%hook CCHomeView
- (void)setTopBackgoundImageView:(id)arg1 {
}
%end

%hook DPSPopupView
- (void)show {
}
%end

%hook ONEAppDelegateHelper
- (void)launchingAD {
}
%end

%hook ONEWebProductViewController
- (void)setContentFrame:(CGRect)arg1 {
}
%end

%hook DSGNZShieldPassengerView
- (void)updateViewsWithModel:(id)arg1 {
}
%end

%hook SRDTabInfoFlowView
- (void)configViews {
}
%end

%hook DCHomeOPSubObject
- (void)setBannerArray:(id)arg1 {
}
%end

%hook DCHomeDecorationReusableView
- (void)layoutSubviews {
}
%end

%hook DCHomeOPMainObject
- (void)setMainBanner:(id)arg1 {
}
%end

%hook DCHomeCTRObject
- (void)setList:(id)arg1 {
}
%end

%hook DCHomeFuncObject
- (void)setOp_func_list:(id)arg1 {
}
%end

%hook DCHomeTopBackView
- (void)bindData:(id)arg1 andRole:(unsigned long long)arg2 {
}
%end


%hook DDIMPushIMMessageModel
- (double)messageHeight {
    return 0;
}
%end

%hook DDIMPushIMMessageView
- (void)setPushModel:(id)arg1 {
}
%end

%hook DNAdManager
- (void)requestBannersWithBlock:(id)arg1 {
}
%end

%hook FACarpoolHomeViewController
- (void)setContainerView:(id)arg1 {
}
%end

%hook FINHomeViewController
- (void)setContentFrame:(CGRect)arg1 {
}
%end

%hook MMNotificationWindow
- (id)initWithFrame:(CGRect)arg1 {
    return NULL;
}
%end

%hook ONENavAndTabBgView
- (void)updateBgImageWithUrl:(id)arg1 {
}
%end

%hook ONEHomeLocalizedViewController
- (void)setMessageCenterButton:(id)arg1 {
}
%end

%hook ONEARWidgetView
- (void)setupUI {
}
%end

%hook DMKDolphinOperateView
- (void)configUI {
}
%end

%hook DNPopupActivityView
- (void)setupSubviews {
}
%end

%hook DMKDolphinTextChainView
- (void)configUI {
}
%end

%hook DMKDolphinActivityEntranceView
- (void)buildUI {
}
%end

%hook DADForceShowActivityCenterView
- (id)initWithFrame:(struct CGRect)arg1 {
    return NULL;
}
%end

%hook DMKDolphinPanelContainerCom
- (long long)numberOfSectionsInTableView:(id)arg1 {
    return 1;
}
%end

%hook CXThanosFeedView
- (id)initWithFrame:(struct CGRect)arg1 {
    return NULL;
}
%end

%hook CXHomeGoodsCollectionViewCell
- (id)initWithFrame:(struct CGRect)arg1 {
    return %orig;
}
%end

%hook MJRefreshGifHeader
- (void)setState:(long long)arg1 {
}
%end

%hook CXGoodsClassicMutipleView
- (void)createUI {
}
%end

%hook FAFloatingBannerView
- (void)setupUI {
}
%end

%hook CXGoodsClassicHeaderView
- (void)setIsToTop:(bool)arg1 {
}
%end

%hook CXHomePageViewController
- (void)setBottomBarView:(id)arg1 {
}
%end

%hook TFAlertViewManager
- (void)showAlertViewWithData:(id)arg1 cancelBlock:(id)arg2 confirm:(id)arg3 {
}
%end

%hook FASpringBoardSmallHelperView
- (void)setupUI {
}
%end

%hook FASpringFeedRouter
- (long long)getFeedCellCount {
    return 0;
}
%end

%hook FAFeedWelfaresView
- (id)init{
    return nil;
}
%end

%hook FASpringActivityViewController
- (id)init{
    return nil;
}
%end

%hook FINSpringBoardWidget
- (id)initWithData:(id)arg1{
    return nil;
}
%end

%hook FAFeedGamesView
- (id)init{
    return nil;
}
%end

%end

// 主函数调用
%ctor {
    if (shouldHookFromPreference(PREFERENCE_KEY)) {
        %init(hook);
    } else {

    }

}
最后修改:2022 年 04 月 05 日
如果觉得我的文章对你有用,请随意赞赏
END
本文作者:
文章标题:Theos 逆向之 《滴滴出行》去广告源码
本文地址:https://blog.abcdl.cn/index.php/archives/12/
版权说明:若无注明,本文皆iStar Blog原创,转载请保留文章出处。