无标题文章

ios逆向之路之一

class-dump下载地址:http://stevenygard.com/projects/class-dump/

升级了OSX 10.11在配置class-dump的时候,会发现书上推荐的class-dump存放目录/usr/bin,class-dump存放不进去,并且bin该文件夹的相关的权限也修改不了。

Paste_Image.png

参考网址:http://blog.csdn.net/majiakun1/article/details/52064435

根据上面网址所说整理一下:

跟着下面的步骤走

1、打开Terminal,输入mkdir ~/bin,在当前用户根目录下创建一个bin目录;

2、把class-dump给拷贝到这个目录里,并赋予其可执行权限:

sudo chmod 777 /usr/local/bin/class-dump

再执行

mv class-dump ~/bin; chmod +x ~/bin/class-dump;

3、打开~/.bash_profile文件:vi ~/.bash_profile,在文件最上方加一行:

export PATH=$HOME/bin/:$PATH,

然后保存并退出(在英文输入法中依次按下esc和:(shift + ;,即冒号),然后输入wq,回车即可);

4、在Terminal中执行source ~/.bash_profile;

5、上面的操作把~/bin路径给加入了环境变量,我们测试一下好不好用;

测试的结果:

localhost:bin zy$ class-dump

class-dump 3.5 (64 bit)

Usage: class-dump [options]

where options are:

-a            show instance variable offsets

-A            show implementation addresses

--arch   choose a specific architecture from a universal binary (ppc, ppc64, i386, x86_64, armv6, armv7, armv7s, arm64)

-C     only display classes matching regular expression

-f       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       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.sdk

--sdk-mac      specify Mac OS X version (will look in /Developer/SDKs/MacOSX.sdk

--sdk-root    specify the full SDK root path (or use --sdk-ios/--sdk-mac for a shortcut)

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • # Cmder[![Join the chat at https://gitter.im/cmderdev/cmd...
    周方朵阅读 344评论 0 0
  • 转至元数据结尾创建: 董潇伟,最新修改于: 十二月 23, 2016 转至元数据起始第一章:isa和Class一....
    40c0490e5268阅读 1,762评论 0 9
  • 人物:谈判专家(1)武警(2)狙击手(1)绑匪(1)受害者(1)警察上校(1) [楼顶上] “别过来,再过来我们就...
    FASHION_e018阅读 188评论 0 0
  • 儿子问:妈妈,什么是采风? 我说:采风就是从外面将风采回来,种在院子里,然后长出一棵树。摘下树叶吹一吹,放在耳边就...
    蓝柿阅读 1,453评论 7 14
  • 深夜收到闺蜜的微信,炸了十多个表情过来,最后发“出来宵夜”四个字。 我回了好。 我们是在健身房认识的,她很拼,基本...
    你的心只是器官阅读 1,085评论 24 16