2011-12-02 63 views
5

我想反编译iOS Twitter框架,如果事实上我从xcode的模拟器中获取twitterd文件,它预编译为在x86(?)上运行,而不是ARM。 至于工具,我用http://code.google.com/p/i386codedump/ 指令:反编译Obj C框架

Usage: code-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, i386, etc.) 
    -C <regex>  only display classes matching regular expression 
    -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 
    -d    decompile 
    -D <arch>  decompilation architecture 

我有点不明白我需要什么选项拿,那我怎么努力:

iMac:documents $ ./code-dump -d twitterd 
2011-12-02 18:56:35.885 code-dump[1643:707] feedface, ao: 0 
2011-12-02 18:56:35.886 code-dump[1643:707] process: feedface (86000) 
/* 
*  Generated by code-dump 2.0. 
*/ 
This file does not contain any Objective-C runtime information. 
2011-12-02 18:56:35.888 code-dump[1643:707] Building lookup table... 
2011-12-02 18:56:40.308 code-dump[1643:707] Finished lookup table 
/usr/bin/lipo: input file (twitterd) must be a fat file when the -extract option is specified 
2011-12-02 18:56:40.868 code-dump[1643:707] CDAssemblyProcessor, 22288 instructions, 0 functions 
Segmentation fault: 11 

这是什么意思,我需要什么去做? :)

+2

“我想反编译iOS Twitter框架”=>也许你应该问如何去做任何你希望用这个信息做的事情,而不是尝试去反编译框架...... –

回答

4

该文件不包含任何Objective-C运行时信息。

这意味着该文件没有定义任何类,协议或类别。它可能使用objective-c,但它不包含有关它使用的类的任何有用信息。

CDAssemblyProcessor,22288级的指令,0功能

这表明该文件有其象征剥离。它包含代码,但没有指示任何函数开始或结束的位置,因此无法反编译。

你得到这些是因为twitterd不是框架,它是框架中包含的程序。实际框架代码位于Twitter文件中。如果你试图反编译,那么你至少会得到一些Objective-C头文件。我建议使用-H选项,以便将标题创建为当前目录中的文件。没有它,头文件将会陆续发送到您的终端,并且很难找到任何东西。但是,它最有可能已经剥离了大部分符号,所以反编译不会太多。