diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/api/ExceptionUI.java b/src/main/java/the/bytecode/club/bytecodeviewer/api/ExceptionUI.java index c63f4a69..0d9d98dd 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/api/ExceptionUI.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/api/ExceptionUI.java @@ -40,6 +40,9 @@ import static the.bytecode.club.bytecodeviewer.Constants.*; public class ExceptionUI extends JFrame { + public static final String SEND_STACKTRACE_TO = "Send the stacktrace to https://github.com/Konloch/bytecode-viewer/issues or Konloch at https://the.bytcode.club or konloch@gmail.com" + + "\nIf you hold appropriate legal rights to the relevant class/jar/apk file please include that as well."; + /** * @param e The exception to be shown */ @@ -104,9 +107,8 @@ public class ExceptionUI extends JFrame textArea.setText( "Please send this error log to " + author + - "\nIf you " + - "\nIif you hold appropriate legal rights the relevant class file." + - "Bytecode Viewer Version: " + VERSION + + "\nIf you hold appropriate legal rights to the relevant class/jar/apk file please include that as well." + + "\nBytecode Viewer Version: " + VERSION + ", Preview Copy: " + PREVIEW_COPY + ", Fat Jar: " + FAT_JAR + ", OS: " + System.getProperty("os.name") + diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/CFRDecompiler.java b/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/CFRDecompiler.java index 63b7d410..150c7e4d 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/CFRDecompiler.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/CFRDecompiler.java @@ -18,6 +18,7 @@ import java.util.zip.ZipOutputStream; import me.konloch.kontainer.io.DiskReader; import org.objectweb.asm.tree.ClassNode; import the.bytecode.club.bytecodeviewer.BytecodeViewer; +import the.bytecode.club.bytecodeviewer.api.ExceptionUI; import the.bytecode.club.bytecodeviewer.decompilers.InternalDecompiler; import the.bytecode.club.bytecodeviewer.util.MiscUtils; @@ -142,7 +143,8 @@ public class CFRDecompiler extends InternalDecompiler if (file.exists()) return findFile(Objects.requireNonNull(file.listFiles())); - return "CFR error! Send the stacktrace to Konloch at https://the.bytecode.club or konloch@gmail.com" + nl + nl + "Suggested Fix: Click refresh class, if it fails again try another decompiler." + nl + nl + exception; + return "CFR error! " + ExceptionUI.SEND_STACKTRACE_TO + + nl + nl + "Suggested Fix: Click refresh class, if it fails again try another decompiler." + nl + nl + exception; } Random r = new Random(); @@ -171,15 +173,17 @@ public class CFRDecompiler extends InternalDecompiler String exception = "Bytecode Viewer Version: " + VERSION + nl + nl + sw; - return "CFR error! Send the stacktrace to Konloch at https://the.bytecode.club or konloch@gmail" - + ".com" + nl + nl + "Suggested Fix: Click refresh class, " - + "if it fails again try another decompiler." + nl + nl + exception; + return "CFR error! " + ExceptionUI.SEND_STACKTRACE_TO + + nl + nl + "Suggested Fix: Click refresh class, if it fails again try another decompiler." + + nl + nl + exception; } + return s; } } - return "CFR error!" + nl + nl + "Suggested Fix: Click refresh class, if it " - + "fails again try another decompiler."; + + return "CFR error!" + + nl + nl + "Suggested Fix: Click refresh class, if it fails again try another decompiler."; } public String[] generateMainMethod(String filePath, String outputPath) { diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/FernFlowerDecompiler.java b/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/FernFlowerDecompiler.java index 121c45e6..f7421a1d 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/FernFlowerDecompiler.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/FernFlowerDecompiler.java @@ -10,6 +10,7 @@ import org.apache.commons.lang3.ArrayUtils; import org.objectweb.asm.tree.ClassNode; import the.bytecode.club.bytecodeviewer.BytecodeViewer; import the.bytecode.club.bytecodeviewer.Resources; +import the.bytecode.club.bytecodeviewer.api.ExceptionUI; import the.bytecode.club.bytecodeviewer.decompilers.InternalDecompiler; import the.bytecode.club.bytecodeviewer.util.MiscUtils; @@ -129,7 +130,7 @@ public class FernFlowerDecompiler extends InternalDecompiler exception += nl + nl + sw; } } - return "FernFlower error! Send the stacktrace to Konloch at https://the.bytecode.club or konloch@gmail.com" + return "FernFlower error! " + ExceptionUI.SEND_STACKTRACE_TO + nl + nl + "Suggested Fix: Click refresh class, if it fails again try another decompiler." + nl + nl + exception; } diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/JADXDecompiler.java b/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/JADXDecompiler.java index e0311264..51872f62 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/JADXDecompiler.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/JADXDecompiler.java @@ -11,6 +11,7 @@ import java.util.Objects; import java.util.Random; import me.konloch.kontainer.io.DiskReader; import org.objectweb.asm.tree.ClassNode; +import the.bytecode.club.bytecodeviewer.api.ExceptionUI; import the.bytecode.club.bytecodeviewer.decompilers.InternalDecompiler; import the.bytecode.club.bytecodeviewer.util.MiscUtils; @@ -84,7 +85,7 @@ public class JADXDecompiler extends InternalDecompiler if(exception.isEmpty()) exception = "Decompiled source file not found!"; - return "JADX error! Send the stacktrace to Konloch at https://the.bytecode.club or konloch@gmail.com" + return "JADX error! " + ExceptionUI.SEND_STACKTRACE_TO + nl + nl + "Suggested Fix: Click refresh class, if it fails again try another decompiler." + nl + nl + exception; } @@ -114,9 +115,9 @@ public class JADXDecompiler extends InternalDecompiler e.printStackTrace(); String exception = "Bytecode Viewer Version: " + VERSION + nl + nl + sw; - return "JADX error! Send the stacktrace to Konloch at https://the.bytecode.club or konloch@gmail" - + ".com" + nl + nl + "Suggested Fix: Click refresh class, " - + "if it fails again try another decompiler." + nl + nl + exception; + return "JADX error! " + ExceptionUI.SEND_STACKTRACE_TO + + nl + nl + "Suggested Fix: Click refresh class, " + + "if it fails again try another decompiler." + nl + nl + exception; } return s; } diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/JDGUIDecompiler.java b/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/JDGUIDecompiler.java index 8e9fda90..b6d179a2 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/JDGUIDecompiler.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/JDGUIDecompiler.java @@ -7,6 +7,7 @@ import java.io.PrintStream; import java.io.PrintWriter; import java.io.StringWriter; +import the.bytecode.club.bytecodeviewer.api.ExceptionUI; import the.bytecode.club.bytecodeviewer.decompilers.InternalDecompiler; import the.bytecode.club.bytecodeviewer.decompilers.jdgui.DirectoryLoader; import the.bytecode.club.bytecodeviewer.decompilers.jdgui.CommonPreferences; @@ -116,7 +117,7 @@ public class JDGUIDecompiler extends InternalDecompiler "Bytecode Viewer Version: " + VERSION + nl + nl + sw; } - return "JD-GUI error! Send the stacktrace to Konloch at https://the.bytecode.club or konloch@gmail.com" + return "JD-GUI error! " + ExceptionUI.SEND_STACKTRACE_TO + nl + nl + "Suggested Fix: Click refresh class, if it fails again try another decompiler." + nl + nl + exception; } diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/ProcyonDecompiler.java b/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/ProcyonDecompiler.java index 2f895884..48975954 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/ProcyonDecompiler.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/ProcyonDecompiler.java @@ -32,6 +32,7 @@ import java.util.zip.ZipException; import java.util.zip.ZipOutputStream; import org.objectweb.asm.tree.ClassNode; import the.bytecode.club.bytecodeviewer.BytecodeViewer; +import the.bytecode.club.bytecodeviewer.api.ExceptionUI; import the.bytecode.club.bytecodeviewer.decompilers.InternalDecompiler; import the.bytecode.club.bytecodeviewer.util.EncodeUtils; import the.bytecode.club.bytecodeviewer.util.MiscUtils; @@ -129,7 +130,7 @@ public class ProcyonDecompiler extends InternalDecompiler exception = "Bytecode Viewer Version: " + VERSION + nl + nl + sw; } - return "Procyon error! Send the stacktrace to Konloch at https://the.bytecode.club or konloch@gmail.com" + return "Procyon error! " + ExceptionUI.SEND_STACKTRACE_TO + nl + nl + "Suggested Fix: Click refresh class, if it fails again try another decompiler." + nl + nl + exception; } diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/SmaliDisassembler.java b/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/SmaliDisassembler.java index 002549b6..2e2fb17e 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/SmaliDisassembler.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/impl/SmaliDisassembler.java @@ -9,6 +9,7 @@ import java.util.Objects; import me.konloch.kontainer.io.DiskReader; import org.apache.commons.io.FileUtils; import org.objectweb.asm.tree.ClassNode; +import the.bytecode.club.bytecodeviewer.api.ExceptionUI; import the.bytecode.club.bytecodeviewer.decompilers.InternalDecompiler; import the.bytecode.club.bytecodeviewer.util.Dex2Jar; import the.bytecode.club.bytecodeviewer.util.FileContainer; @@ -114,7 +115,7 @@ public class SmaliDisassembler extends InternalDecompiler exception += "Bytecode Viewer Version: " + VERSION + nl + nl + sw; } - return "Smali Disassembler error! Send the stacktrace to Konloch at https://the.bytecode.club or konloch@gmail.com" + return "Smali Disassembler error! " + ExceptionUI.SEND_STACKTRACE_TO + nl + nl + "Suggested Fix: Click refresh class, if it fails again try another decompiler." + nl + nl + exception; }