提取 Objective-c 二进制文件 [英] Extract Objective-c binary

查看:23
本文介绍了提取 Objective-c 二进制文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以提取二进制文件以获取二进制文件背后的代码?使用 Class-dump 您可以看到实现地址,但是否也可以看到实现地址中的代码?有什么办法吗?

Is it possible to extract a binary, to get the code that is behind the binary? With Class-dump you can see the implementation addresses, but is it possible to also see the code thats IN the implementation addresses? Is there ANY way to do it?

推荐答案

您的所有代码都编译为单个指令,放置在可执行文件的文本部分中.编译器负责将您的高级语言转换为更简单的处理器特定指令.除非代码非常简单,否则恢复这个过程几乎是不可能的.一些问题是语句的歧义,以及整体的可读性:例如,局部变量将只是一个偏移地址.

All your code compiles to single instructions, placed in the text section of your executable. The compiler is responsible for translating your higher level language to the processor specific instructions, which are simpler. Reverting this process would be nearly impossible, unless the code is quite simple. Some problems are ambiguity of statements, and the overall readability: local variables, for instance, will be nothing but an offset address.

如果您想读取反汇编代码(更高级别代码编译成的指令),请在可执行文件中使用此命令:

If you want to read the disassembled code (the instructions of which the higher level code was compiled to) use this command in an executable:

otool -tV 文件

这篇关于提取 Objective-c 二进制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆