反编译别人的app
2019獨角獸企業重金招聘Python工程師標準>>>
一:這里會介紹兩個工具class-dump和Hopper Disassembler。
在Terminal中執行 class-dump
如果報錯就安裝,class-dump下載地址:http://stevenygard.com/projects/class-dump/
?
chmod +x ~/bin/class-dump
vim ~/.bash_profile
按下 i 鍵進入編輯狀態,在最下方加一行
export PATH=$HOME/bin/:$PATH
按下esc鍵,再按shift+: 輸入 wq進行保存退出編輯
測試結果為:
ZSY-Air:~ zhangshiyu$ 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) ZSY-Air:~ zhangshiyu$到了這里 class-dump的安裝基本完成了^ ^
二:安裝Hopper Disassembler ?安裝地址?http://www.9553.com/mac/mac_7981.html 步驟不再細說。
?
三:Xcode打開一個工程run一下
找到如圖的app圖標,顯示包內容,拿到二進制文件
我把二進制文件放在桌面文件夾,執行以下命令
得到下述結果,我們看看拿到的很多.h文件,能拿到方法
下一步我們要做的就是看看能不能拿到這兩個方法的具體實現了,接下來我們用Hopper Disassembler來試試。
Hopper Disassembler的用法很簡單,只要將二進制文件拖進去就行了??纯赐线M去之后的結果。
至此,方法都被反編譯出來了!!
~~~~~~是不是很簡單,分分鐘就破解別人的app
轉載于:https://my.oschina.net/zsyzone/blog/1502869
《新程序員》:云原生和全面數字化實踐50位技術專家共同創作,文字、視頻、音頻交互閱讀總結
- 上一篇: 记录string的妙用
- 下一篇: lucene修改索引——(六)