mirror of
https://github.com/SuspiciousActivity/ByteEdit.git
synced 2026-08-13 17:56:17 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a73814a81 | ||
|
|
08af91a3f7 | ||
|
|
ad975e67db | ||
|
|
4beaab1283 | ||
|
|
cfa278cd3b |
No files matched your search
@@ -4,6 +4,7 @@ import java.io.BufferedReader;
|
|||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -573,7 +574,9 @@ public class Assembler {
|
|||||||
String value = split2[1];
|
String value = split2[1];
|
||||||
if (value.endsWith("]"))
|
if (value.endsWith("]"))
|
||||||
value = value.substring(0, value.length() - 1);
|
value = value.substring(0, value.length() - 1);
|
||||||
if (value.startsWith("{ ")) {
|
if (value.equals("{ }")) {
|
||||||
|
node.values.add(Collections.EMPTY_LIST);
|
||||||
|
} else if (value.startsWith("{ ")) {
|
||||||
String split3[] = splitWithStrings(value.substring(2, value.length() - 2));
|
String split3[] = splitWithStrings(value.substring(2, value.length() - 2));
|
||||||
List<Object> list = new ArrayList<>();
|
List<Object> list = new ArrayList<>();
|
||||||
for (String rofl : split3) {
|
for (String rofl : split3) {
|
||||||
|
|||||||
@@ -202,8 +202,12 @@ public class Disassembler implements IDecompiler {
|
|||||||
}
|
}
|
||||||
s += ", ";
|
s += ", ";
|
||||||
}
|
}
|
||||||
s = s.substring(0, s.length() - 2);
|
if (s.endsWith(", ")) {
|
||||||
s += " }], ";
|
s = s.substring(0, s.length() - 2);
|
||||||
|
s += " }], ";
|
||||||
|
} else {
|
||||||
|
s += "}], ";
|
||||||
|
}
|
||||||
} else if (o instanceof String) {
|
} else if (o instanceof String) {
|
||||||
s += "\"" + UnicodeUtils.escapeWithSpaces(hs, (String) o) + "\"], ";
|
s += "\"" + UnicodeUtils.escapeWithSpaces(hs, (String) o) + "\"], ";
|
||||||
} else {
|
} else {
|
||||||
@@ -307,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;
|
||||||
|
|
||||||
@@ -358,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 };
|
||||||
|
|||||||
@@ -580,8 +580,10 @@ public class StackBasedCalculator implements Opcodes, Runnable {
|
|||||||
change(node);
|
change(node);
|
||||||
return false;
|
return false;
|
||||||
case POP2:
|
case POP2:
|
||||||
stack.pop();
|
Number val = stack.pop();
|
||||||
stack.pop();
|
if (!(val instanceof Long) && !(val instanceof Double)) {
|
||||||
|
stack.pop();
|
||||||
|
}
|
||||||
change(node);
|
change(node);
|
||||||
return false;
|
return false;
|
||||||
case SWAP: {
|
case SWAP: {
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ import me.ByteEdit.utils.ClassUtil;
|
|||||||
import me.ByteEdit.utils.OpcodesReverse;
|
import me.ByteEdit.utils.OpcodesReverse;
|
||||||
import me.ByteEdit.utils.UnicodeUtils;
|
import me.ByteEdit.utils.UnicodeUtils;
|
||||||
|
|
||||||
|
// ASM 9.2
|
||||||
public class Main extends JFrame {
|
public class Main extends JFrame {
|
||||||
|
|
||||||
public static Main INSTANCE;
|
public static Main INSTANCE;
|
||||||
@@ -142,7 +143,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();
|
||||||
|
|
||||||
@@ -425,6 +426,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));
|
||||||
setContentPane(contentPane);
|
setContentPane(contentPane);
|
||||||
|
|||||||
Reference in new issue
Block a user