Skip to content

Commit

Permalink
Stable 2.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
ThisTestUser committed Oct 8, 2017
1 parent e3a2409 commit 55bc5ea
Showing 1 changed file with 34 additions and 2 deletions.
36 changes: 34 additions & 2 deletions src/io/github/thistestuser/DeobfuscatorFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintStream;
import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
Expand All @@ -33,7 +34,7 @@

public class DeobfuscatorFrame
{
private static final String VERSION = "2.0-BETA";
private static final String VERSION = "2.0";

/**
* New - Latest API
Expand Down Expand Up @@ -592,13 +593,44 @@ public void run()
invoke(configuration, libraries);
Object deobfuscator =
loadClasses[0].getDeclaredConstructor(loadClasses[1]).newInstance(configuration);
loadClasses[0].getDeclaredMethod("start").invoke(deobfuscator);
try
{
loadClasses[0].getDeclaredMethod("start").invoke(deobfuscator);
}catch(InvocationTargetException e)
{
if(e.getTargetException().getClass().getName().
equals("com.javadeobfuscator.deobfuscator.exceptions.NoClassInPathException"))
{
for(int i = 0; i < 5; i++)
System.out.println();
System.out.println("** DO NOT OPEN AN ISSUE ON GITHUB **");
System.out.println("Could not locate a class file.");
System.out.println("Have you added the necessary files to the -path argument?");
System.out.println("The error was:");
}else if(e.getTargetException().getClass().getName().
equals("com.javadeobfuscator.deobfuscator.exceptions.PreventableStackOverflowError"))
{
for(int i = 0; i < 5; i++)
System.out.println();
System.out.println("** DO NOT OPEN AN ISSUE ON GITHUB **");
System.out.println("A StackOverflowError occurred during deobfuscation, but it is preventable");
System.out.println("Try increasing your stack size using the -Xss flag");
System.out.println("The error was:");
}else
{
for(int i = 0; i < 5; i++)
System.out.println();
System.out.println("Deobfuscation failed. Please open a ticket on GitHub and provide the following error:");
}
e.getTargetException().printStackTrace();
}
}catch(Exception e)
{
e.printStackTrace();
}
}
});
thread.setContextClassLoader(loader);
thread.start();
newFrame.addWindowListener(new WindowAdapter()
{
Expand Down

0 comments on commit 55bc5ea

Please sign in to comment.