内容简介:生成随机字符的 Android Proguard 混淆字典
Android 中使用 Proguard 进行混淆后,代码中的类名、方法名、变量名会变成诸如 a b c
这样的字符。
其实我们可以指定混淆后使用哪些字符代替显示,也就是在 proguard-rules.pro
中可以这样配置:
-obfuscationdictionary 字典文件 -classobfuscationdictionary 字典文件 -packageobfuscationdictionary 字典文件
而这里的字典文件就是一个类似于这样的文本文件:
#混淆字典 go O1 VU VN 0f vV HT AU Kd SX
上面的字典中的字符,是从大小写字母以及数字中随机抽取的。如果你也有这样的需求,你可以使用我的 Python 脚本:
import string
import random
def rand_string(length):
return ''.join(random.choice(
string.ascii_lowercase + string.ascii_uppercase + string.digits)
for i in range(length)
)
if __name__ == '__main__':
FILE = open("proguard-dictionary.txt", 'w')
WORD_LINES = 40
FILE.write("#proguard dictionary\n\n")
for i in range(1, WORD_LINES):
FILE.write(rand_string(2)+"\n")
FILE.close()
希望你使用愉快
以上所述就是小编给大家介绍的《生成随机字符的 Android Proguard 混淆字典》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Coding the Matrix
Philip N. Klein / Newtonian Press / 2013-7-26 / $35.00
An engaging introduction to vectors and matrices and the algorithms that operate on them, intended for the student who knows how to program. Mathematical concepts and computational problems are motiva......一起来看看 《Coding the Matrix》 这本书的介绍吧!