摘要
由于Java语言自身的一些特点,使得Java字节码的反编译变得非常容易,Java代码的安全问题成了困扰开发人员的一大难题。因此,为了保护Java源代码安全,通过对源代码进行预处理、词法分析、语法分析以及语义分析,对自定义类名、方法名和变量名用"I"和"l"组成的编码进行替换,并在源码文件适当位置加入干扰代码,从而设计并实现了一种基于源代码的Java代码混淆器。实验结果表明,该混淆器具有过程不可逆、混淆方法简单、混淆结果理想等特点,能够实现对Java源代码的保护,为Java代码开发人员提供了一种有效的源代码保护工具。该混淆器还可与字节码加密软件结合使用,进一步保护Java源代码。
Because of the simple decompilation of Java bytecode,Java code security has been a difficult problem for developers.For the protection of Java source code safety,a Java code obfuscator was designed and implemented through the addition of interference source code to the source code file and the replacement of the custom class names,custom method names and custom variable names by the code composed of‘I'and‘l'after preprocessing,lexical analysis,parsing analysis and semantic analysis of the source code.The result showed that the obfuscator had several marked characteristics,such as irreversible process,simple confusion method,ideal confusion result etc.,which provided an effective tool for the protection of the source code.In addition,the obfuscator could be used in conjunction with the bytecode encryption software to further protect the Java source code.
出处
《甘肃科学学报》
2015年第2期28-32,共5页
Journal of Gansu Sciences
基金
甘肃省重点实验室专项项目(145RTSA009)
甘肃省科技支撑计划项目(1204GKCA046)
兰州市科技发展计划项目(2013-4-13)
甘肃省科学院青年科技创新基金项目(2014QN-19)