Mac系统10.11(10.12)之后/usr/bin 不能拷贝进去class-dump该怎么办

最近在研究class-dump 反编译软件,发现安装的时候有些问题.
/us/bin 没有权限 . 但文档说明需要把class-dump文件放进去

但是可以在~/.bash_profile 环境配置文件下添加 “指引”路径.

  1. 在终端下,新建一个文件夹把 class-dump 放进去
    如终端创建: $mkdir ~/bin

    2.打开~/.bash_profile文件,配置环境变量 (双击打开就可以) 把export PATH= HOME/bin/: PATH 放到第一行中

    3.在Terminal中执行source命令 $ source ~/.bash_profile

完成以上步骤,在terminal中执行class-dump实验一下,应该就可以了。

class-dump 3.5 (64 bit)
Usage: class-dump [options] <mach-o-file>

  where options are:
        -a             show instance variable offsets
        -A             show implementation addresses
        --arch <arch>  choose a specific architecture from a universal binary (ppc, ppc64, i386, x86_64, armv6, armv7, armv7s, arm64)
        -C <regex>     only display classes matching regular expression
        -f <str>       find string in method name
        -H             generate header files in current directory, or directory specified with -o
        -I             sort classes, categories, and protocols by inheritance (overrides -s)
        -o <dir>       output directory used for -H
        -r             recursively expand frameworks and fixed VM shared libraries
        -s             sort classes and categories by name
        -S             sort methods by name
        -t             suppress header in output, for testing
        --list-arches  list the arches in the file, then exit
        --sdk-ios      specify iOS SDK version (will look in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS<version>.sdk
        --sdk-mac      specify Mac OS X version (will look in /Developer/SDKs/MacOSX<version>.sdk
        --sdk-root     specify the full SDK root path (or use --sdk-ios/--sdk-mac for a shortcut)

使用 :
命令如下:class-dump -H /iPhone.app -o /Users/apple/Desktop/heads

解释:
/iPhone.app 是app的路径
/Users/apple/Desktop/heads 是存放dump出来头文件的文件夹路径

注意: 后缀不是ipa文件 是app(选择打开方式 解压 后有app文件)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值