-
获取iOS iPhone 上微信bundle的路径 ps -e | grep WeChat
-
iPhone 微信程序拷贝到 Mac scp /var/mobile/Containers/Bundle/Application/BA5B36D0-E801-4B5A-80EB-9306A8438D0A/WeChat.app/WeChat liudefu@10.0.105.143:/tmp
-
otool -L WeChat 查看微信用的框架依赖库
-
是否加壳 otool -l WeChat | grep crypt
- crypt 表示0或者没有crypt字段表示没有加密,crypt为1表示加密了,为什么crypt有2个呢,因为微信是个集合包,包含了arm64,和arm7,所以微信是加壳的,加壳是用class-dump拿 不出来
- cycript -p WeChat
-
class-dump WeChat 砸壳
如果没有加密的应用用class-dump 砸壳,可以看到一切文件
- 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 -s -S -H weChat
搜索SpringBoard头文件
class-dump -s -S -H SpringBoard -o ./SBHeaders
- 查看头文件的个数
- ls -lR|grep "^-"|wc -l