-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-----2.9.6-----: 05/05/2015 - Fixed a typo in the about window 05/28/2015 - Started importing JD-GUI Decompiler. 05/28/2015 - Compile on refresh and compile on save are now enabled by default. 05/28/2015 - Renamed the File>Save As options to be much more informative. 06/24/2015 - Fixed a logic error with the Field & Method searchers. 06/26/2015 - Updated Procyon & CFR to their latest versions. 07/02/2015 - Added JD-GUI Decompiler. - Huge thanks to the guys behind JD-GUI! <3 (FIVE DECOMPILERS NOW LOL)
- Loading branch information
Showing
30 changed files
with
1,611 additions
and
90 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<launch4jConfig> | ||
<dontWrapJar>false</dontWrapJar> | ||
<headerType>gui</headerType> | ||
<jar>H:\Repo\BCV\bytecode-viewer\BytecodeViewer 2.9.6.jar</jar> | ||
<outfile>H:\Repo\BCV\bytecode-viewer\BytecodeViewer.exe</outfile> | ||
<errTitle></errTitle> | ||
<cmdLine></cmdLine> | ||
<chdir>.</chdir> | ||
<priority>normal</priority> | ||
<downloadUrl>http://java.com/download</downloadUrl> | ||
<supportUrl></supportUrl> | ||
<stayAlive>false</stayAlive> | ||
<restartOnCrash>false</restartOnCrash> | ||
<manifest></manifest> | ||
<icon>H:\Repo\BCV\bytecode-viewer\BCV Icon.ico</icon> | ||
<jre> | ||
<path></path> | ||
<bundledJre64Bit>false</bundledJre64Bit> | ||
<bundledJreAsFallback>false</bundledJreAsFallback> | ||
<minVersion>1.7.0_00</minVersion> | ||
<maxVersion></maxVersion> | ||
<jdkPreference>preferJre</jdkPreference> | ||
<runtimeBits>64/32</runtimeBits> | ||
</jre> | ||
<versionInfo> | ||
<fileVersion>0.2.9.6</fileVersion> | ||
<txtFileVersion>http://the.bytecode.club</txtFileVersion> | ||
<fileDescription>Bytecode Viewer</fileDescription> | ||
<copyright>http://bytecodeviewer.com</copyright> | ||
<productVersion>0.2.9.6</productVersion> | ||
<txtProductVersion>http://the.bytecode.club</txtProductVersion> | ||
<productName>Bytecode Viewer</productName> | ||
<companyName></companyName> | ||
<internalName>BCV</internalName> | ||
<originalFilename>Bytecode_Viewer.exe</originalFilename> | ||
</versionInfo> | ||
</launch4jConfig> |
Binary file not shown.
Binary file renamed
BIN
+1.68 MB
libs/procyon-decompiler-0.5.28.jar → libs/procyon-decompiler-0.5.29.jar
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package jd.cli; | ||
|
||
import java.io.File; | ||
import java.io.PrintStream; | ||
|
||
import jd.cli.loader.DirectoryLoader; | ||
import jd.cli.preferences.CommonPreferences; | ||
import jd.cli.printer.text.PlainTextPrinter; | ||
import jd.cli.util.ClassFileUtil; | ||
import jd.core.Decompiler; | ||
import jd.core.process.DecompilerImpl; | ||
|
||
|
||
public class Main | ||
{ | ||
/** | ||
* @param args Path to java class | ||
*/ | ||
public static void main(String[] args) { | ||
|
||
if (args.length == 0) { | ||
System.out.println("usage: ..."); | ||
} else { | ||
try { | ||
String pathToClass = args[0].replace('/', File.separatorChar).replace('\\', File.separatorChar); | ||
String directoryPath = ClassFileUtil.ExtractDirectoryPath(pathToClass); | ||
|
||
if (directoryPath == null) | ||
return; | ||
|
||
String internalPath = ClassFileUtil.ExtractInternalPath(directoryPath, pathToClass); | ||
|
||
if (internalPath == null) | ||
return; | ||
|
||
CommonPreferences preferences = new CommonPreferences(); | ||
DirectoryLoader loader = new DirectoryLoader(new File(directoryPath)); | ||
|
||
//PrintStream ps = new PrintStream("test.html"); | ||
//HtmlPrinter printer = new HtmlPrinter(ps); | ||
PrintStream ps = new PrintStream("test.txt"); | ||
PlainTextPrinter printer = new PlainTextPrinter(preferences, ps); | ||
|
||
Decompiler decompiler = new DecompilerImpl(); | ||
decompiler.decompile(preferences, loader, printer, internalPath); | ||
|
||
System.out.println("done."); | ||
|
||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package jd.cli.loader; | ||
|
||
import java.io.File; | ||
|
||
import jd.core.loader.Loader; | ||
|
||
public abstract class BaseLoader implements Loader | ||
{ | ||
protected String codebase; | ||
protected long lastModified; | ||
protected boolean isFile; | ||
|
||
public BaseLoader(File file) | ||
{ | ||
this.codebase = file.getAbsolutePath(); | ||
this.lastModified = file.lastModified(); | ||
this.isFile = file.isFile(); | ||
} | ||
|
||
public String getCodebase() | ||
{ | ||
return codebase; | ||
} | ||
|
||
public long getLastModified() | ||
{ | ||
return lastModified; | ||
} | ||
|
||
public boolean isFile() | ||
{ | ||
return isFile; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package jd.cli.loader; | ||
|
||
import java.io.BufferedInputStream; | ||
import java.io.DataInputStream; | ||
import java.io.File; | ||
import java.io.FileInputStream; | ||
import java.io.FileNotFoundException; | ||
|
||
import jd.core.loader.LoaderException; | ||
|
||
|
||
public class DirectoryLoader extends BaseLoader | ||
{ | ||
public DirectoryLoader(File file) throws LoaderException | ||
{ | ||
super(file); | ||
|
||
if (! (file.exists() && file.isDirectory())) | ||
throw new LoaderException("'" + codebase + "' is not a directory"); | ||
} | ||
|
||
public DataInputStream load(String internalPath) | ||
throws LoaderException | ||
{ | ||
File file = new File(this.codebase, internalPath); | ||
|
||
try | ||
{ | ||
return new DataInputStream( | ||
new BufferedInputStream(new FileInputStream(file))); | ||
} | ||
catch (FileNotFoundException e) | ||
{ | ||
throw new LoaderException( | ||
"'" + file.getAbsolutePath() + "' not found."); | ||
} | ||
} | ||
|
||
public boolean canLoad(String internalPath) | ||
{ | ||
File file = new File(this.codebase, internalPath); | ||
return file.exists() && file.isFile(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package jd.cli.loader; | ||
|
||
import java.io.DataInputStream; | ||
import java.io.File; | ||
import java.io.IOException; | ||
import java.util.zip.ZipEntry; | ||
import java.util.zip.ZipFile; | ||
|
||
import jd.core.loader.LoaderException; | ||
|
||
|
||
public class JarLoader extends BaseLoader | ||
{ | ||
private ZipFile zipFile; | ||
|
||
public JarLoader(File file) throws LoaderException | ||
{ | ||
super(file); | ||
|
||
if (! (file.exists() && file.isFile())) | ||
{ | ||
throw new LoaderException("'" + codebase + "' is not a directory"); | ||
} | ||
|
||
try | ||
{ | ||
this.zipFile = new ZipFile(codebase); | ||
} | ||
catch (IOException e) | ||
{ | ||
throw new LoaderException("Error reading from '" + codebase + "'"); | ||
} | ||
} | ||
|
||
public DataInputStream load(String internalPath) | ||
throws LoaderException | ||
{ | ||
ZipEntry zipEntry = this.zipFile.getEntry(internalPath); | ||
|
||
if (zipEntry == null) | ||
{ | ||
throw new LoaderException("Can not read '" + internalPath + "'"); | ||
} | ||
|
||
try | ||
{ | ||
return new DataInputStream(this.zipFile.getInputStream(zipEntry)); | ||
} | ||
catch (IOException e) | ||
{ | ||
throw new LoaderException("Error reading '" + internalPath + "'"); | ||
} | ||
} | ||
|
||
public boolean canLoad(String internalPath) | ||
{ | ||
return this.zipFile.getEntry(internalPath) != null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
package jd.cli.loader; | ||
|
||
import java.io.File; | ||
import java.util.Map; | ||
import java.util.concurrent.ConcurrentHashMap; | ||
|
||
import jd.core.loader.LoaderException; | ||
|
||
public class LoaderManager | ||
{ | ||
protected final static String JAR_SUFFIX = ".jar"; | ||
protected final static String ZIP_SUFFIX = ".zip"; | ||
|
||
protected Map<String, BaseLoader> map; | ||
|
||
public LoaderManager() | ||
{ | ||
this.map = new ConcurrentHashMap<String, BaseLoader>(); | ||
} | ||
|
||
public BaseLoader getLoader(String codebase) throws LoaderException | ||
{ | ||
File file = new File(codebase); | ||
String key = file.getAbsolutePath(); | ||
BaseLoader loader = map.get(key); | ||
|
||
if (loader == null) | ||
{ | ||
if (file.exists()) | ||
{ | ||
loader = newLoader(key, file); | ||
} | ||
} | ||
else | ||
{ | ||
if (file.exists()) | ||
{ | ||
if ((file.lastModified() != loader.getLastModified()) || | ||
(file.isFile() != loader.isFile())) | ||
{ | ||
loader = newLoader(key, file); | ||
} | ||
} | ||
else | ||
{ | ||
map.remove(key); | ||
} | ||
} | ||
|
||
return loader; | ||
} | ||
|
||
protected BaseLoader newLoader(String key, File file) throws LoaderException | ||
{ | ||
BaseLoader loader = null; | ||
|
||
if (file.isFile()) | ||
{ | ||
if (endsWithIgnoreCase(key, JAR_SUFFIX) || | ||
endsWithIgnoreCase(key, ZIP_SUFFIX)) | ||
{ | ||
this.map.put(key, loader = new JarLoader(file)); | ||
} | ||
} | ||
else if (file.isDirectory()) | ||
{ | ||
this.map.put(key, loader = new DirectoryLoader(file)); | ||
} | ||
|
||
return loader; | ||
} | ||
|
||
protected static boolean endsWithIgnoreCase(String s, String suffix) | ||
{ | ||
int suffixLength = suffix.length(); | ||
int index = s.length() - suffixLength; | ||
return (s.regionMatches(true, index, suffix, 0, suffixLength)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package jd.cli.preferences; | ||
|
||
import jd.core.preferences.Preferences; | ||
|
||
public class CommonPreferences extends Preferences | ||
{ | ||
protected boolean showPrefixThis; | ||
protected boolean mergeEmptyLines; | ||
protected boolean unicodeEscape; | ||
protected boolean showLineNumbers; | ||
|
||
public CommonPreferences() | ||
{ | ||
this.showPrefixThis = true; | ||
this.mergeEmptyLines = false; | ||
this.unicodeEscape = false; | ||
this.showLineNumbers = true; | ||
} | ||
|
||
public CommonPreferences( | ||
boolean showDefaultConstructor, boolean realignmentLineNumber, | ||
boolean showPrefixThis, boolean mergeEmptyLines, | ||
boolean unicodeEscape, boolean showLineNumbers) | ||
{ | ||
super(showDefaultConstructor, realignmentLineNumber); | ||
this.showPrefixThis = showPrefixThis; | ||
this.mergeEmptyLines = mergeEmptyLines; | ||
this.unicodeEscape = unicodeEscape; | ||
this.showLineNumbers = showLineNumbers; | ||
} | ||
|
||
public boolean isShowPrefixThis() { return showPrefixThis; } | ||
public boolean isMergeEmptyLines() { return mergeEmptyLines; } | ||
public boolean isUnicodeEscape() { return unicodeEscape; } | ||
public boolean isShowLineNumbers() { return showLineNumbers; } | ||
} |
Oops, something went wrong.