Veil Obfuscator is a commercial obfuscator for your JAVA applications. It provides heavy protection for your programs by manipulating the bytecode and making it almost impossible for humans or automated decompilers to understand.
"In software development, obfuscation is the deliberate act of creating source or machine code that is difficult for humans to understand. Like obfuscation in natural language, it may use needlessly roundabout expressions to compose statements. Programmers may deliberately obfuscate code to conceal its purpose (security through obscurity) or its logic or implicit values embedded in it, primarily, in order to prevent tampering, deter reverse engineering, or even as a puzzle or recreational challenge for someone reading the source code. This can be done manually, or using an automated tool which is the way it is done industrially." ~Wikipedia Obfuscation
ORIGINAL SOURCE CODE
public String readFile(final File file) throws Exception {
if(file == null)
throw new Exception("file is null");
if(!file.exists())
throw new FileNotFoundException();
FileReader fileReader = null;
BufferedReader bufferedReader = null;
try {
fileReader = new FileReader(file);
bufferedReader = new BufferedReader(fileReader);
final StringBuilder builder = new StringBuilder();
String line;
while((line = bufferedReader.readLine()) != null)
builder.append(line).append('\n');
return builder.toString();
} catch(final Exception e) {
e.printStackTrace();
} finally {
try {
if(fileReader != null)
fileReader.close();
if(bufferedReader != null)
bufferedReader.close();
} catch(final Exception ignored) { }
}
return "error";
}
OBFUSCATED SOURCE CODE (Decompiled with CFR)
public String a0(File var1) throws Exception {
if(var1 == null) {
throw new Exception(hVm.decrypt("...", 0x4A1F));
} else if(!var1.exists()) {
throw new FileNotFoundException();
} else {
FileReader var2 = null;
BufferedReader var3 = null;
boolean var14 = false;
String var7;
label208: {
try {
var14 = true;
var2 = new FileReader(var1);
var3 = new BufferedReader(var2);
StringBuilder var4 = new StringBuilder();
if((114 ^ 114) != 0) {
throw null;
}
String var5;
while((var5 = var3.readLine()) != null) {
var4.append(var5).append((char)(83 - 73));
}
var7 = var4.toString();
var14 = false;
break label208;
} catch (Exception var18) {
var18.printStackTrace();
var14 = false;
}
return hVm.decrypt("...", 0x71C2);
}
return var7;
}
}