Objective-C代码混淆 [英] Objective-C Code Obfuscation

查看:91
本文介绍了Objective-C代码混淆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以混淆Objective-C代码吗?

Is there any way to obfuscate Objective-C Code ?

谢谢

推荐答案

选择器仍然是纯文本-otool -o将转储所有对象及其定义的方法.您还可以使用后面的单行代码转储代码中访问的所有内部和外部选择器.在源代码级别混淆方法和参数名称可能是最简单的,尽管在对象级别进行混淆也将以与语言无关的方式进行混淆,但会浪费一些链接器表操作.

The selectors are still plaintext - otool -o will dump out all your objects and the methods they define. You can also dump out all internal and external selectors accessed in the code with a one-liner that follows. Obfuscating method and parameter names at the source level would probably be easiest, though doing it at the object level will also obfuscate in a language-independent way at the expense of some linker table manipulation.

otool -s __TEXT __objc_methname yourapp.app/executable_file |expand -8 | cut -c17- | sed -n '3,$p' | perl -n -e 'print join("\n",split(/\x00/,scalar reverse (reverse unpack("(a4)*",pack("(H8)*",split(/\s/,$_))))))'|less

这篇关于Objective-C代码混淆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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