diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 0000000..2b63946 --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 4d9d9c9..b05e945 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.example narumi-deobf-gui - 1.0.0 + 1.1.0 narumi-deobf-gui @@ -64,7 +64,7 @@ com.github.pandaninjas Deobfuscator - 3724606 + edd277a diff --git a/src/main/java/gq/malwarefight/narumiideobfgui/DeobfuscatorGUIApp.java b/src/main/java/gq/malwarefight/narumiideobfgui/DeobfuscatorGUIApp.java index 816e300..a902cb1 100644 --- a/src/main/java/gq/malwarefight/narumiideobfgui/DeobfuscatorGUIApp.java +++ b/src/main/java/gq/malwarefight/narumiideobfgui/DeobfuscatorGUIApp.java @@ -9,18 +9,21 @@ public class DeobfuscatorGUIApp extends Application { public static Stage stage; - + public static boolean useRaw = false; @Override public void start(Stage stage) throws IOException { DeobfuscatorGUIApp.stage = stage; - FXMLLoader fxmlLoader = new FXMLLoader(DeobfuscatorGUIApp.class.getResource("deobfuscator-gui-view.fxml")); + FXMLLoader fxmlLoader = new FXMLLoader(DeobfuscatorGUIApp.class.getResource((useRaw) ? "deobfuscator-gui-advanced-view.fxml": "deobfuscator-gui-view.fxml")); Scene scene = new Scene(fxmlLoader.load(), 320, 240); - stage.setTitle("Deobfuscator GUI"); + stage.setTitle("Narumii Deobfuscator"); stage.setScene(scene); stage.show(); } public static void main(String[] args) { + if (args.length > 0 && args[0].equalsIgnoreCase("useraw")) { + useRaw = true; + } launch(); } } \ No newline at end of file diff --git a/src/main/java/gq/malwarefight/narumiideobfgui/DeobfuscatorGUIController.java b/src/main/java/gq/malwarefight/narumiideobfgui/DeobfuscatorGUIController.java index e15487a..4e28dc7 100644 --- a/src/main/java/gq/malwarefight/narumiideobfgui/DeobfuscatorGUIController.java +++ b/src/main/java/gq/malwarefight/narumiideobfgui/DeobfuscatorGUIController.java @@ -2,8 +2,10 @@ import gq.malwarefight.narumiideobfgui.deobfuscatorutils.DeobfuscatorRegistry; import javafx.fxml.FXML; +import javafx.geometry.Pos; import javafx.scene.control.CheckBox; import javafx.scene.control.Label; +import javafx.scene.control.ScrollPane; import javafx.scene.control.TextField; import javafx.scene.layout.VBox; import javafx.stage.FileChooser; @@ -31,10 +33,12 @@ public class DeobfuscatorGUIController { public VBox buttonContainer; @FXML public Label result; - + @FXML + public ScrollPane test; // only for advanced mode @FXML protected void chooseInputFile() { FileChooser fileChooser = new FileChooser(); + fileChooser.setInitialDirectory(new File(System.getProperty("user.dir"))); File input = fileChooser.showOpenDialog(DeobfuscatorGUIApp.stage); if (input == null) { return; @@ -46,6 +50,7 @@ protected void chooseInputFile() { @FXML protected void chooseOutputFile() { FileChooser fileChooser = new FileChooser(); + fileChooser.setInitialDirectory(new File(System.getProperty("user.dir"))); File output = fileChooser.showSaveDialog(DeobfuscatorGUIApp.stage); if (output == null) { return; @@ -57,10 +62,18 @@ protected void chooseOutputFile() { @FXML public void initialize() { - for (ComposedTransformer composedTransformer : DeobfuscatorRegistry.composedTransformers) { - CheckBox box = new CheckBox(composedTransformer.name()); - buttonContainer.getChildren().add(box); - deobfuscatorHashMap.put(box, composedTransformer); + if (!DeobfuscatorGUIApp.useRaw) { + for (ComposedTransformer composedTransformer : DeobfuscatorRegistry.composedTransformers) { + CheckBox box = new CheckBox(composedTransformer.name()); + buttonContainer.getChildren().add(box); + deobfuscatorHashMap.put(box, composedTransformer); + } + } else { + for (Transformer transformer: DeobfuscatorRegistry.rawDeobfuscators) { + CheckBox box = new CheckBox(transformer.name()); + buttonContainer.getChildren().add(box); + deobfuscatorHashMap.put(box, transformer); + } } } diff --git a/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/DeobfuscatorRegistry.java b/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/DeobfuscatorRegistry.java index 4abbabb..14ba744 100644 --- a/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/DeobfuscatorRegistry.java +++ b/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/DeobfuscatorRegistry.java @@ -1,5 +1,7 @@ package gq.malwarefight.narumiideobfgui.deobfuscatorutils; +import gq.malwarefight.narumiideobfgui.deobfuscatorutils.subclasses.latest_qProtectFlowTransformer; +import gq.malwarefight.narumiideobfgui.deobfuscatorutils.subclasses.latest_qProtectInvokeDynamicTransformer; import uwu.narumi.deobfuscator.transformer.ComposedTransformer; import uwu.narumi.deobfuscator.transformer.Transformer; @@ -73,11 +75,11 @@ public class DeobfuscatorRegistry { new ParamorphismKurwaNaChujTaKlasaRemoveTransformer(), new ParamorphismPackerTransformer(), new ParamorphismStringTransformer(), - new b3_0_qProtectFlowTransformer(), - new b3_0_qProtectInvokeDynamicTransformer(), + new qProtectFlowTransformer_b_3_0(), + new qProtectInvokeDynamicTransformer_b_3_0(), new qProtectStackOperationTransformer(), - new b3_0_qProtectStringTransformer(), - new b31_qProtectStringTransformer(), + new qProtectStringTransformer_b3_0(), + new qProtectStringTransformer_b31(), new qProtectTrashInvokeTransformer(), new idk_qProtectFlowTransformer(), new qProtectFieldFlowTransformer(), @@ -128,7 +130,7 @@ public class DeobfuscatorRegistry { public static ComposedTransformer[] composedTransformers = new ComposedTransformer[] { new latest_qProtectTransformer(), - new v1_7_2_qProtectTransformer(), + new qProtectTransformer_v1_7_2(), new StackAnalyzerBinsecureTransformer(), new NoStackAnalyzerBinsecureTransformer(), new BozoriuszTransformer(), diff --git a/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/latest_qProtectFlowTransformer.java b/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/latest_qProtectFlowTransformer.java index 8fe9f20..a2d531c 100644 --- a/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/latest_qProtectFlowTransformer.java +++ b/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/latest_qProtectFlowTransformer.java @@ -1,5 +1,3 @@ package gq.malwarefight.narumiideobfgui.deobfuscatorutils.subclasses; -import uwu.narumi.deobfuscator.transformer.impl.qprotect.latest.qProtectFlowTransformer; - -public class latest_qProtectFlowTransformer extends qProtectFlowTransformer {} +public class latest_qProtectFlowTransformer extends uwu.narumi.deobfuscator.transformer.impl.qprotect.latest.qProtectFlowTransformer {} diff --git a/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/latest_qProtectTransformer.java b/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/latest_qProtectTransformer.java index 51d06ad..d4cac78 100644 --- a/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/latest_qProtectTransformer.java +++ b/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/latest_qProtectTransformer.java @@ -1,5 +1,3 @@ package gq.malwarefight.narumiideobfgui.deobfuscatorutils.subclasses; -import uwu.narumi.deobfuscator.transformer.composed.qprotect.latest.qProtectTransformer; - -public class latest_qProtectTransformer extends qProtectTransformer {} +public class latest_qProtectTransformer extends uwu.narumi.deobfuscator.transformer.composed.qprotect.latest.qProtectTransformer {} diff --git a/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/b3_0_qProtectFlowTransformer.java b/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/qProtectFlowTransformer_b_3_0.java similarity index 67% rename from src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/b3_0_qProtectFlowTransformer.java rename to src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/qProtectFlowTransformer_b_3_0.java index 590de10..e4b0287 100644 --- a/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/b3_0_qProtectFlowTransformer.java +++ b/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/qProtectFlowTransformer_b_3_0.java @@ -2,4 +2,4 @@ import uwu.narumi.deobfuscator.transformer.impl.qprotect.b3_0.qProtectFlowTransformer; -public class b3_0_qProtectFlowTransformer extends qProtectFlowTransformer {} +public class qProtectFlowTransformer_b_3_0 extends qProtectFlowTransformer {} diff --git a/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/b3_0_qProtectInvokeDynamicTransformer.java b/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/qProtectInvokeDynamicTransformer_b_3_0.java similarity index 58% rename from src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/b3_0_qProtectInvokeDynamicTransformer.java rename to src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/qProtectInvokeDynamicTransformer_b_3_0.java index 0c455d8..3fd03b9 100644 --- a/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/b3_0_qProtectInvokeDynamicTransformer.java +++ b/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/qProtectInvokeDynamicTransformer_b_3_0.java @@ -2,4 +2,4 @@ import uwu.narumi.deobfuscator.transformer.impl.qprotect.b3_0.*; -public class b3_0_qProtectInvokeDynamicTransformer extends qProtectInvokeDynamicTransformer {} +public class qProtectInvokeDynamicTransformer_b_3_0 extends qProtectInvokeDynamicTransformer {} diff --git a/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/b31_qProtectStringTransformer.java b/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/qProtectStringTransformer_b31.java similarity index 73% rename from src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/b31_qProtectStringTransformer.java rename to src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/qProtectStringTransformer_b31.java index 32907d4..e7471b8 100644 --- a/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/b31_qProtectStringTransformer.java +++ b/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/qProtectStringTransformer_b31.java @@ -1,4 +1,4 @@ package gq.malwarefight.narumiideobfgui.deobfuscatorutils.subclasses; import uwu.narumi.deobfuscator.transformer.impl.qprotect.b31.qProtectStringTransformer; -public class b31_qProtectStringTransformer extends qProtectStringTransformer {} +public class qProtectStringTransformer_b31 extends qProtectStringTransformer {} diff --git a/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/b3_0_qProtectStringTransformer.java b/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/qProtectStringTransformer_b3_0.java similarity index 73% rename from src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/b3_0_qProtectStringTransformer.java rename to src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/qProtectStringTransformer_b3_0.java index 8f1539c..e4b9d85 100644 --- a/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/b3_0_qProtectStringTransformer.java +++ b/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/qProtectStringTransformer_b3_0.java @@ -2,4 +2,4 @@ import uwu.narumi.deobfuscator.transformer.impl.qprotect.b3_0.qProtectFlowTransformer; -public class b3_0_qProtectStringTransformer extends qProtectFlowTransformer {} +public class qProtectStringTransformer_b3_0 extends qProtectFlowTransformer {} diff --git a/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/v1_7_2_qProtectTransformer.java b/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/qProtectTransformer_v1_7_2.java similarity index 72% rename from src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/v1_7_2_qProtectTransformer.java rename to src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/qProtectTransformer_v1_7_2.java index 0519d54..e35eb3f 100644 --- a/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/v1_7_2_qProtectTransformer.java +++ b/src/main/java/gq/malwarefight/narumiideobfgui/deobfuscatorutils/subclasses/qProtectTransformer_v1_7_2.java @@ -2,4 +2,4 @@ import uwu.narumi.deobfuscator.transformer.composed.qprotect.v1_7_2.qProtectTransformer; -public class v1_7_2_qProtectTransformer extends qProtectTransformer {} +public class qProtectTransformer_v1_7_2 extends qProtectTransformer {} diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java index 124ce38..bd85f75 100644 --- a/src/main/java/module-info.java +++ b/src/main/java/module-info.java @@ -2,7 +2,9 @@ requires javafx.fxml; requires javafx.graphics; requires javafx.controls; - requires Deobfuscator; +// requires Deobfuscator; requires org.objectweb.asm; + requires Deobfuscator.edd277a; opens gq.malwarefight.narumiideobfgui to javafx.fxml; + exports gq.malwarefight.narumiideobfgui to javafx.graphics; } \ No newline at end of file diff --git a/src/main/resources/gq/malwarefight/narumiideobfgui/deobfuscator-gui-advanced-view.fxml b/src/main/resources/gq/malwarefight/narumiideobfgui/deobfuscator-gui-advanced-view.fxml new file mode 100644 index 0000000..2e8738e --- /dev/null +++ b/src/main/resources/gq/malwarefight/narumiideobfgui/deobfuscator-gui-advanced-view.fxml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + +