逆向支付宝学习

作者: 小菜一碟321 | 来源:发表于2019-01-12 19:11 被阅读121次

今天没事研究了一下支付宝,二话不说先建立一个tweak工程,砸壳的支付宝ipa包可以从pp助手上下载,class-dump一下就可以拿到支付宝mach-o文件的header,我想试试能不能自动生成收款二维码,

分析

Flex分析到收款二维码的控制器是PEMainCodeNoticeViewController
我记得一个月之前支付宝的收款二维码的控制器还是PEMainCodeViewController,一转眼就变了,嘿嘿嘿。仔细分析了一下,现在必要的参数是PECollectSettingViewController生成的,也就是说,生成收款码的函数的所需要的参数来源于PECollectSettingViewController中的PECollectCodeController生成,仔细分析了一下PECollectCodeController 发现他其实是一个NSObject对象,😆看来支付宝命名不规范,小小吐槽一下

#if TARGET_OS_SIMULATOR
#error Do not support the simulator, please use the real iPhone Device.
#endif

#import <UIKit/UIKit.h>
#import <FLEX/FLEX.h>
#import <Foundation/Foundation.h>

@interface PECollectCodeController : NSObject

@property(retain, nonatomic) NSString *offlineQRCode; // @synthesize offlineQRCode=_offlineQRCode;
@property(retain, nonatomic) NSString *onlineQRCode; // @synthesize onlineQRCode=_onlineQRCode;
@property(retain, nonatomic) NSString *collectCodeId; // @synthesize collectCodeId=_collectCodeId;
@property(retain, nonatomic) NSString *collectMemo; // @synthesize collectMemo=_collectMemo;
@property(retain, nonatomic) NSString *collectAmount; // @synthesize collectAmount=_collectAmount;
@property(retain, nonatomic) UIImageView *qrcodeImgView; // @synthesize qrcodeImgView=_qrcodeImgView;
@end


@interface PECollectSettingViewController

@property(retain, nonatomic) UITextField *activeTextField;
@property(nonatomic) _Bool needAddMemo; // @synthesize needAddMemo=_needAddMemo;
@property(retain, nonatomic) NSString *sessionId;
- (void)confirmSetAmount;
@end


@interface PEMainCodeNoticeViewController


@end

%hook AllAppDelegate


- (void)applicationDidFinishLaunching:(id)arg1{
    
    %orig;
    UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"支付宝逆向" message:@"越狱系统级别注入支付宝😁😁😁😁🤣🤣😂😂😂😂😂😂😡😡🤠🤠" delegate:self cancelButtonTitle:@"确定" otherButtonTitles:@"取消", nil];
    [alert show];
    
     [[FLEXManager sharedManager] showExplorer];
    
}

%end


%hook PEMainCodeNoticeViewController

- (void)collectCodeControllerDidFinishSetAmount:(id)arg1 isFromSetting:(_Bool)arg2{
    
        UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"支付宝逆向" message:[NSString stringWithFormat:@"%@-%@-%d-----在线%@-----离线%@",arg1,((PECollectCodeController *)arg1).collectAmount,arg2,((PECollectCodeController *)arg1).onlineQRCode,((PECollectCodeController *)arg1).offlineQRCode] delegate:self cancelButtonTitle:@"确定" otherButtonTitles:@"取消", nil];
        [alert show];
    UIView *view = [[UIView alloc]initWithFrame:CGRectMake(70, 70, 100, 100)];
    view.backgroundColor = [UIColor redColor];
    UIImageView *imagev = [[UIImageView alloc]initWithFrame:CGRectMake(5, 5, 90, 90)];
    imagev.image = ((PECollectCodeController *)arg1).qrcodeImgView.image;
    [view addSubview:imagev];
    [[UIApplication sharedApplication].keyWindow addSubview:view];
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(20 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [view removeFromSuperview];
    });
    
       %orig;
}


- (void)viewDidLoad{
    
     %orig;
    
    
}

- (void)collectCodeControllerDidStartSetAmount:(id)arg1{
    
         %orig;
    
}

%end

%hook PECollectSettingViewController

- (void)viewDidAppear:(_Bool)arg1{
         %orig;
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        self.activeTextField.text = @"2";
    });
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [self confirmSetAmount];
    });

}

%end
x

相关文章

  • 逆向支付宝学习

    今天没事研究了一下支付宝,二话不说先建立一个tweak工程,砸壳的支付宝ipa包可以从pp助手上下载,class-...

  • iOS逆向-手把手教你写支付宝蚂蚁森林收集能量助手

    原文:iOS逆向-支付宝蚂蚁森林 前言 发现iOS支付宝逆向的分析并不多,蚂蚁森林基于H5应用 套着UIWebVi...

  • 大概念教学:撰写单元目标

    1.单元目标的构成 (1)单元目标是预期学习结果 逆向设计:逆向设计中的逆向指的是首先要明确预期学习结果,“我们的...

  • 初识汇编

    逆向课程随堂笔记 001--初识汇编 我们在学习逆向开发之前,我们要了解一个基本的逆向原理.首先我们是逆向iOS系...

  • 《可见的学习》120-129页

    今天主要学习逆向设计、学习的两种主要技能、如何以学生的视角来看待学习。 首先逆向设计,就是从成果出发,回归到学习目...

  • 初识汇编(一)

    前言 我们在学习逆向开发之前,我们要了解一个基本的逆向原理.首先我们是逆向 iOS 系统上面的 APP .那么我们...

  • iOS逆向工程:安装工具

    之前也接触过一下逆向工程的概念,但是一直没有时间系统的学习一下逆向工程。从今天起开始学习一下逆向工程的知识。...

  • 初识汇编(1)

    摘要: 我们在学习逆向开发之前,我们要了解一个基本的逆向原理.首先我们是逆向iOS系统上面的APP.那么我们知道,...

  • iOS安全攻防笔记(一)

    # 001--初识汇编 我们在学习逆向开发之前,我们要了解一个基本的逆向原理.首先我们是逆向iOS系统上面的APP...

  • 逆向思考

    学习逆向思考,一些常见的逆向思考方式: 成功<->失败 《大败局》企业失败的原因是什么,学习失败,而不是成功,避免...

网友评论

    本文标题:逆向支付宝学习

    本文链接:https://www.haomeiwen.com/subject/xvbcdqtx.html