5

iOSのTwitterフレームワークを逆コンパイルしたいのですが、実際には、ARMではなくx86(?)で実行するようにプリコンパイルされたxcodeのシミュレーターからtwitterdファイルを取得します。ツールに関しては、http ://code.google.com/p/i386codedump/を使用します 。手順:

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

これはどういう意味ですか、私は何をする必要がありますか?:)

4

1 に答える 1

4

このファイルには、Objective-Cランタイム情報は含まれていません。

これは、ファイルがクラス、プロトコル、またはカテゴリを定義していないことを意味します。Objective-cを使用する場合がありますが、使用するクラスに関する有用な情報は含まれていません。

CDAssemblyProcessor、22288命令、0関数

これは、ファイルのシンボルが削除されたことを示します。コードが含まれていますが、関数の開始位置または終了位置が示されていないため、逆コンパイルできません。

twitterdフレームワークではなく、フレームワークに含まれているプログラムであるため、これらを取得しています。実際のフレームワークコードはTwitterファイルにあります。代わりにそれを逆コンパイルしようとすると、少なくともいくつかのobjective-cヘッダーが得られます。-Hヘッダーが現在のディレクトリにファイルとして作成されるように、このオプションを使用することをお勧めします。これがないと、ヘッダーが次々に端末に送信され、何かを見つけるのが非常に困難になります。ただし、ほとんどの場合、ほとんどのシンボルも削除されている可能性が高いため、逆コンパイルではあまり効果がありません。

于 2011-12-02T18:00:51.543 に答える