mirror of
https://github.com/SuspiciousActivity/ByteEdit.git
synced 2026-08-13 17:56:17 +00:00
added deobfuscation: noop remover
This commit is contained in:
1 parent
ad975e67db
commit
08af91a3f7
2 files changed
+7
-1
No files matched your search
@@ -311,6 +311,7 @@ public class Disassembler implements IDecompiler {
|
|||||||
|
|
||||||
InsnList insnList = mn.instructions;
|
InsnList insnList = mn.instructions;
|
||||||
boolean deobfNumbers = Main.INSTANCE.mntmNumbers.isSelected();
|
boolean deobfNumbers = Main.INSTANCE.mntmNumbers.isSelected();
|
||||||
|
boolean deobfNops = Main.INSTANCE.mntmNops.isSelected();
|
||||||
|
|
||||||
ArrayList<Label> labelsReversed = deobfNumbers ? new ArrayList<>() : null;
|
ArrayList<Label> labelsReversed = deobfNumbers ? new ArrayList<>() : null;
|
||||||
|
|
||||||
@@ -362,6 +363,8 @@ public class Disassembler implements IDecompiler {
|
|||||||
|
|
||||||
StringContext ctx = new StringContext(insnList.size());
|
StringContext ctx = new StringContext(insnList.size());
|
||||||
for (AbstractInsnNode n = insnList.getFirst(); n != null; n = n.getNext()) {
|
for (AbstractInsnNode n = insnList.getFirst(); n != null; n = n.getNext()) {
|
||||||
|
if (deobfNops && n.getOpcode() == Opcodes.NOP)
|
||||||
|
continue;
|
||||||
ctx.next(disassembleInstruction(n, labels, hs));
|
ctx.next(disassembleInstruction(n, labels, hs));
|
||||||
}
|
}
|
||||||
return new String[] { ctx.finish(), localVarTable, tryCatchTable };
|
return new String[] { ctx.finish(), localVarTable, tryCatchTable };
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ public class Main extends JFrame {
|
|||||||
private JMenuItem rdbtnmntm10000;
|
private JMenuItem rdbtnmntm10000;
|
||||||
public JCheckBoxMenuItem mntmMultithreaded;
|
public JCheckBoxMenuItem mntmMultithreaded;
|
||||||
private JMenu mnDeobfuscation;
|
private JMenu mnDeobfuscation;
|
||||||
public JCheckBoxMenuItem mntmNumbers;
|
public JCheckBoxMenuItem mntmNumbers, mntmNops;
|
||||||
|
|
||||||
public static final Object treeLock = new Object();
|
public static final Object treeLock = new Object();
|
||||||
|
|
||||||
@@ -424,6 +424,9 @@ public class Main extends JFrame {
|
|||||||
|
|
||||||
mntmNumbers = new JCheckBoxMenuItem("Numbers");
|
mntmNumbers = new JCheckBoxMenuItem("Numbers");
|
||||||
mnDeobfuscation.add(mntmNumbers);
|
mnDeobfuscation.add(mntmNumbers);
|
||||||
|
|
||||||
|
mntmNops = new JCheckBoxMenuItem("Nops");
|
||||||
|
mnDeobfuscation.add(mntmNops);
|
||||||
|
|
||||||
contentPane = new JPanel();
|
contentPane = new JPanel();
|
||||||
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
|
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
|
||||||
|
|||||||
Reference in new issue
Block a user