无标题文章

ios逆向之路之一

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

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

无标题文章_第1张图片

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)

你可能感兴趣的:(无标题文章)