public static string extractJarIntoTempFolder(this API_Jad jad, string jarFile) { if (jarFile.extension(".jar")) { var targetFolder = jad.JadDecompilations; var extractFolder = targetFolder.pathCombine(jarFile.fileName().safeFileName().replace(".", "_")).createDir(); if (extractFolder.folderExists().isFalse() || extractFolder.files(true).empty()) { "Extracting Classes from Jar: {0}".info(jarFile); jarFile.unzip(extractFolder); } jad.LastJadExtraction = extractFolder; return(extractFolder); } return(null); }
public static string getClassFile_From_JavaSignature(this API_Jad jad, string javaSignature) { return(javaSignature.valid() ? jad.LastJadExtraction.pathCombine(javaSignature.replace(".", @"\").add(".class")) : ""); }
public static string decompile(this API_Jad jad, string classFile) { return(classFile.valid() && classFile.fileExists() ? jad.execute("-p \"{0}\"".format(classFile)) : ""); }
public static string decompile_From_JavaSignature(this API_Jad jad, string javaSignature) { return(jad.decompile(jad.getClassFile_From_JavaSignature(javaSignature))); }
public static string help(this API_Jad jad) { return(jad.execute("")); }