From 563bc6b79e89a01d36e7c5376f0dadf2a45c9767 Mon Sep 17 00:00:00 2001 From: Konloch Date: Sun, 27 Jun 2021 21:31:24 -0700 Subject: [PATCH] Re-Added Szperak's Allatori String Decrypter --- .../bytecodeviewer/gui/MainViewerGUI.java | 2 +- .../preinstalled/AllatoriStringDecrypter.java | 54 ++++++++++++ .../AllatoriStringDecrypterOptions.java | 85 ------------------- 3 files changed, 55 insertions(+), 86 deletions(-) delete mode 100644 src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/AllatoriStringDecrypterOptions.java diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/gui/MainViewerGUI.java b/src/main/java/the/bytecode/club/bytecodeviewer/gui/MainViewerGUI.java index 6ba67294..d6e59e4e 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/gui/MainViewerGUI.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/gui/MainViewerGUI.java @@ -571,7 +571,7 @@ public class MainViewerGUI extends JFrame showAllStrings.addActionListener(e -> PluginManager.runPlugin(new ShowAllStrings())); replaceStrings.addActionListener(arg0 -> ReplaceStringsOptions.open()); stackFramesRemover.addActionListener(e -> PluginManager.runPlugin(new StackFramesRemover())); - allatoriStringDecrypter.addActionListener(e -> PluginManager.runPlugin(new AllatoriStringDecrypterOptions())); + allatoriStringDecrypter.addActionListener(e -> PluginManager.runPlugin(new AllatoriStringDecrypter.AllatoriStringDecrypterOptions())); ZKMStringDecrypter.addActionListener(e -> PluginManager.runPlugin(new ZKMStringDecrypter())); zStringArrayDecrypter.addActionListener(arg0 -> PluginManager.runPlugin(new ZStringArrayDecrypter())); } diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/AllatoriStringDecrypter.java b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/AllatoriStringDecrypter.java index 6bb17eb9..7da24b49 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/AllatoriStringDecrypter.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/AllatoriStringDecrypter.java @@ -1,5 +1,6 @@ package the.bytecode.club.bytecodeviewer.plugin.preinstalled; +import java.awt.*; import java.io.IOException; import java.lang.reflect.Method; import java.util.ArrayList; @@ -7,11 +8,15 @@ import java.util.ArrayList; import org.objectweb.asm.tree.*; import the.bytecode.club.bytecodeviewer.BytecodeViewer; import the.bytecode.club.bytecodeviewer.Constants; +import the.bytecode.club.bytecodeviewer.Resources; import the.bytecode.club.bytecodeviewer.api.ASMUtil; import the.bytecode.club.bytecodeviewer.api.ExceptionUI; import the.bytecode.club.bytecodeviewer.api.Plugin; import the.bytecode.club.bytecodeviewer.api.PluginConsole; import the.bytecode.club.bytecodeviewer.gui.components.MultipleChoiceDialogue; +import the.bytecode.club.bytecodeviewer.plugin.PluginManager; + +import javax.swing.*; import static the.bytecode.club.bytecodeviewer.Constants.nl; @@ -280,4 +285,53 @@ public class AllatoriStringDecrypter extends Plugin throw e; } } + + public static class AllatoriStringDecrypterOptions extends Plugin + { + @Override + public void execute(ArrayList classNodeList) + { + new AllatoriStringDecrypterOptionsFrame().setVisible(true); + } + } + + public static class AllatoriStringDecrypterOptionsFrame extends JFrame + { + private JTextField textField; + + public AllatoriStringDecrypterOptionsFrame() + { + this.setIconImages(Resources.iconList); + setSize(new Dimension(250, 120)); + setResizable(false); + setTitle("Allatori String Decrypter"); + getContentPane().setLayout(null); + + JButton btnNewButton = new JButton("Decrypt"); + btnNewButton.setBounds(6, 56, 232, 23); + getContentPane().add(btnNewButton); + + + JLabel lblNewLabel = new JLabel("Class:"); + lblNewLabel.setBounds(6, 20, 67, 14); + getContentPane().add(lblNewLabel); + + textField = new JTextField(); + textField.setToolTipText("* will search all classes"); + textField.setText("*"); + textField.setBounds(80, 17, 158, 20); + getContentPane().add(textField); + textField.setColumns(10); + + btnNewButton.addActionListener(arg0 -> + { + PluginManager.runPlugin(new the.bytecode.club.bytecodeviewer.plugin.preinstalled.AllatoriStringDecrypter(textField.getText())); + dispose(); + }); + + this.setLocationRelativeTo(null); + } + + private static final long serialVersionUID = -2662514582647810868L; + } } diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/AllatoriStringDecrypterOptions.java b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/AllatoriStringDecrypterOptions.java deleted file mode 100644 index 680cfd2a..00000000 --- a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/AllatoriStringDecrypterOptions.java +++ /dev/null @@ -1,85 +0,0 @@ -package the.bytecode.club.bytecodeviewer.plugin.preinstalled; - -import org.objectweb.asm.tree.*; -import the.bytecode.club.bytecodeviewer.Resources; -import the.bytecode.club.bytecodeviewer.api.Plugin; -import the.bytecode.club.bytecodeviewer.plugin.PluginManager; - -import javax.swing.*; -import java.awt.*; -import java.util.ArrayList; - -/*************************************************************************** - * Bytecode Viewer (BCV) - Java & Android Reverse Engineering Suite * - * Copyright (C) 2014 Kalen 'Konloch' Kinloch - http://bytecodeviewer.com * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program. If not, see . * - ***************************************************************************/ - -/** - * An Allatori String Decrypter, targets an unknown version. - * - * @author Konloch - * @author Szperak - * @since 08/15/2015 - */ - -public class AllatoriStringDecrypterOptions extends Plugin -{ - @Override - public void execute(ArrayList classNodeList) - { - new AllatoriStringDecrypterOptionsFrame().setVisible(true); - } - - public static class AllatoriStringDecrypterOptionsFrame extends JFrame - { - private JTextField textField; - - public AllatoriStringDecrypterOptionsFrame() - { - this.setIconImages(Resources.iconList); - setSize(new Dimension(250, 120)); - setResizable(false); - setTitle("Allatori String Decrypter"); - getContentPane().setLayout(null); - - JButton btnNewButton = new JButton("Decrypt"); - btnNewButton.setBounds(6, 56, 232, 23); - getContentPane().add(btnNewButton); - - - JLabel lblNewLabel = new JLabel("Class:"); - lblNewLabel.setBounds(6, 20, 67, 14); - getContentPane().add(lblNewLabel); - - textField = new JTextField(); - textField.setToolTipText("* will search all classes"); - textField.setText("*"); - textField.setBounds(80, 17, 158, 20); - getContentPane().add(textField); - textField.setColumns(10); - - btnNewButton.addActionListener(arg0 -> - { - PluginManager.runPlugin(new the.bytecode.club.bytecodeviewer.plugin.preinstalled.AllatoriStringDecrypter(textField.getText())); - dispose(); - }); - - this.setLocationRelativeTo(null); - } - - private static final long serialVersionUID = -2662514582647810868L; - } -}