Thursday Mar 29, 2007

Java Obfuscator

I needed to obfuscate some code for a project I'm working on. A quick search came up with yGUARD which is surprisingly well-suited for my purposes.

For one thing you can specify the granularity of obfuscation, right down to the method and field level. So for example you can tell it to obfuscate a single field in a single class (and all references to it, obviously), up to every field and method in every class in a jarfile, or anything in between.

Another nice feature is that it operates seamlessly with ant, and therefore, with NetBeans. Add a new target to build.xml, then invoke it with with the -post-jar target provided by NetBeans, and the generated jar is now obfuscated automatically at every build. Very slick.

yGuard's method of obfuscation is to rename methods and variables with obscure, sometimes unprintable, names. It also has a code shrinking option which according to their specs removes code entities that can not be reached from a set of given code entry points.

Two thumbs up.

About

john

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today