sample AS2 deobfuscator plugin

This commit is contained in:
honfika
2014-08-18 23:52:12 +02:00
parent 8fae73cec3
commit 7d4fbe5075
15 changed files with 724 additions and 22 deletions
@@ -327,7 +327,7 @@ public class AdvancedSettingsDialog extends AppDialog implements ActionListener
// Reflection exceptions. This should never happen
throw new Error(ex.getMessage());
}
if (item.get() != null && !item.get().equals(value)) {
if (item.get() == null || !item.get().equals(value)) {
item.set(value);
modified = true;
}
@@ -29,6 +29,7 @@ import com.jpexs.decompiler.flash.configuration.Configuration;
import com.jpexs.decompiler.flash.console.CommandLineArgumentParser;
import com.jpexs.decompiler.flash.console.ContextMenuTools;
import com.jpexs.decompiler.flash.gui.proxy.ProxyFrame;
import com.jpexs.decompiler.flash.helpers.SWFDecompilerPlugin;
import com.jpexs.decompiler.flash.tags.base.FontTag;
import com.jpexs.decompiler.flash.treeitems.SWFList;
import com.jpexs.helpers.Cache;
@@ -877,6 +878,16 @@ public class Main {
* @throws IOException
*/
public static void main(String[] args) throws IOException {
String pluginPath = Configuration.pluginPath.get();
if (pluginPath != null) {
try {
SWFDecompilerPlugin.loadPlugin(pluginPath);
} catch (Throwable e) {
View.showMessageDialog(null, "Failed to load plugin: " + pluginPath);
}
}
AppStrings.setResourceClass(MainFrame.class);
initLogging(Configuration.debugMode.get());
initLang();
@@ -259,3 +259,7 @@ config.description.textExportExportFontFace = Embed font files in SVG using font
config.name.lzmaFastBytes = LZMA fast bytes (valid values: 5-255)
config.description.lzmaFastBytes = Fast bytes parameter of the LZMA encoder
#temporary setting, do not translate it
config.name.pluginPath = Plugin Path
config.description.pluginPath = -