mirror of
https://github.com/SuspiciousActivity/ByteEdit.git
synced 2026-08-13 17:56:17 +00:00
Fixed variable/method names with / in them
This commit is contained in:
1 parent
89f9753d8b
commit
30c6a7a69d
2 files changed
+13
-12
No files matched your search
@@ -323,7 +323,6 @@ public class Assembler {
|
|||||||
.add(new TryCatchBlockNode(_start, _end, _handler, sp[0].equals("null") ? null : UnicodeUtils.unescape(sp[0])));
|
.add(new TryCatchBlockNode(_start, _end, _handler, sp[0].equals("null") ? null : UnicodeUtils.unescape(sp[0])));
|
||||||
}
|
}
|
||||||
clazz.methods.add(node);
|
clazz.methods.add(node);
|
||||||
// signature = null;
|
|
||||||
} else if (!s.startsWith("\t")) {
|
} else if (!s.startsWith("\t")) {
|
||||||
s = s.substring(0, s.length() - 2);
|
s = s.substring(0, s.length() - 2);
|
||||||
if (s.contains(" throws ")) {
|
if (s.contains(" throws ")) {
|
||||||
@@ -460,7 +459,7 @@ public class Assembler {
|
|||||||
} else if (!rofl.startsWith("(")) {
|
} else if (!rofl.startsWith("(")) {
|
||||||
int index = rofl.indexOf(";");
|
int index = rofl.indexOf(";");
|
||||||
list.add(new String[] { rofl.substring(0, index) + ";", rofl.substring(index).substring(2) });
|
list.add(new String[] { rofl.substring(0, index) + ";", rofl.substring(index).substring(2) });
|
||||||
} else { // other type with casting
|
} else {
|
||||||
list.add(ClassUtil.getCastedValue(rofl.split(" ")[1], rofl.split("\\) ")[0].substring(1)));
|
list.add(ClassUtil.getCastedValue(rofl.split(" ")[1], rofl.split("\\) ")[0].substring(1)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -473,7 +472,7 @@ public class Assembler {
|
|||||||
} else if (!value.startsWith("(")) {
|
} else if (!value.startsWith("(")) {
|
||||||
int index = value.indexOf(";");
|
int index = value.indexOf(";");
|
||||||
node.values.add(new String[] { value.substring(0, index) + ";", value.substring(index).substring(2) });
|
node.values.add(new String[] { value.substring(0, index) + ";", value.substring(index).substring(2) });
|
||||||
} else { // other type with casting
|
} else {
|
||||||
node.values.add(ClassUtil.getCastedValue(value.split(" ")[1], value.split("\\) ")[0].substring(1)));
|
node.values.add(ClassUtil.getCastedValue(value.split(" ")[1], value.split("\\) ")[0].substring(1)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -575,7 +574,7 @@ public class Assembler {
|
|||||||
for (String asd : l.split(", ")) {
|
for (String asd : l.split(", ")) {
|
||||||
if (!asd.startsWith("(")) {
|
if (!asd.startsWith("(")) {
|
||||||
arr.add(UnicodeUtils.unescape(asd));
|
arr.add(UnicodeUtils.unescape(asd));
|
||||||
} else { // other type with casting
|
} else {
|
||||||
if (asd.startsWith("(label) ")) {
|
if (asd.startsWith("(label) ")) {
|
||||||
int labelNr = Integer.parseInt(asd.split(" ")[1]);
|
int labelNr = Integer.parseInt(asd.split(" ")[1]);
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
@@ -614,7 +613,7 @@ public class Assembler {
|
|||||||
for (String asd : st.split(", ")) {
|
for (String asd : st.split(", ")) {
|
||||||
if (!asd.startsWith("(")) {
|
if (!asd.startsWith("(")) {
|
||||||
arr.add(UnicodeUtils.unescape(asd));
|
arr.add(UnicodeUtils.unescape(asd));
|
||||||
} else { // other type with casting
|
} else {
|
||||||
if (asd.startsWith("(label) ")) {
|
if (asd.startsWith("(label) ")) {
|
||||||
int labelNr = Integer.parseInt(asd.split(" ")[1]);
|
int labelNr = Integer.parseInt(asd.split(" ")[1]);
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
|
|||||||
@@ -371,7 +371,7 @@ public class Disassembler {
|
|||||||
case "FieldInsnNode": {
|
case "FieldInsnNode": {
|
||||||
FieldInsnNode node = (FieldInsnNode) n;
|
FieldInsnNode node = (FieldInsnNode) n;
|
||||||
return "\t\t" + OpcodesReverse.reverseOpcode(node.getOpcode()) + " " + UnicodeUtils.escapeWithSpaces(node.desc) + " "
|
return "\t\t" + OpcodesReverse.reverseOpcode(node.getOpcode()) + " " + UnicodeUtils.escapeWithSpaces(node.desc) + " "
|
||||||
+ UnicodeUtils.escapeWithSpaces(node.owner) + "/" + UnicodeUtils.escapeWithSpaces(node.name) + "\n";
|
+ UnicodeUtils.escapeWithSpaces(node.owner) + "/" + UnicodeUtils.escapeWithSpaces(node.name).replace("/", "\\u002F") + "\n";
|
||||||
}
|
}
|
||||||
case "LabelNode": {
|
case "LabelNode": {
|
||||||
LabelNode node = (LabelNode) n;
|
LabelNode node = (LabelNode) n;
|
||||||
@@ -428,8 +428,9 @@ public class Disassembler {
|
|||||||
}
|
}
|
||||||
case "InvokeDynamicInsnNode": {
|
case "InvokeDynamicInsnNode": {
|
||||||
InvokeDynamicInsnNode node = (InvokeDynamicInsnNode) n;
|
InvokeDynamicInsnNode node = (InvokeDynamicInsnNode) n;
|
||||||
String s = "\t\t" + OpcodesReverse.reverseOpcode(node.getOpcode()) + " [\n\t\t\tname: " + UnicodeUtils.escapeWithSpaces(node.name)
|
String s = "\t\t" + OpcodesReverse.reverseOpcode(node.getOpcode()) + " [\n\t\t\tname: "
|
||||||
+ "\n\t\t\tdesc: " + UnicodeUtils.escapeWithSpaces(node.desc) + "\n\t\t\tHandle: [\n\t\t\t\tname: "
|
+ UnicodeUtils.escapeWithSpaces(node.name).replace("/", "\\u002F") + "\n\t\t\tdesc: "
|
||||||
|
+ UnicodeUtils.escapeWithSpaces(node.desc) + "\n\t\t\tHandle: [\n\t\t\t\tname: "
|
||||||
+ UnicodeUtils.escapeWithSpaces(node.bsm.getName()) + "\n\t\t\t\towner: " + UnicodeUtils.escapeWithSpaces(node.bsm.getOwner())
|
+ UnicodeUtils.escapeWithSpaces(node.bsm.getName()) + "\n\t\t\t\towner: " + UnicodeUtils.escapeWithSpaces(node.bsm.getOwner())
|
||||||
+ "\n\t\t\t\tdesc: " + UnicodeUtils.escapeWithSpaces(node.bsm.getDesc()) + "\n\t\t\t\tisInterface: " + node.bsm.isInterface()
|
+ "\n\t\t\t\tdesc: " + UnicodeUtils.escapeWithSpaces(node.bsm.getDesc()) + "\n\t\t\t\tisInterface: " + node.bsm.isInterface()
|
||||||
+ "\n\t\t\t\ttag: " + node.bsm.getTag() + "\n\t\t\t]\n\t\t\targs: [\n";
|
+ "\n\t\t\t\ttag: " + node.bsm.getTag() + "\n\t\t\t]\n\t\t\targs: [\n";
|
||||||
@@ -455,9 +456,10 @@ public class Disassembler {
|
|||||||
s += "\n\t\t\t\t]\n";
|
s += "\n\t\t\t\t]\n";
|
||||||
} else if (l.getClass().getName().equals("org.objectweb.asm.Handle")) {
|
} else if (l.getClass().getName().equals("org.objectweb.asm.Handle")) {
|
||||||
Handle h = (Handle) l;
|
Handle h = (Handle) l;
|
||||||
s += "\t\t\t\tHandle: [\n\t\t\t\t\tname: " + UnicodeUtils.escapeWithSpaces(h.getName()) + "\n\t\t\t\t\towner: "
|
s += "\t\t\t\tHandle: [\n\t\t\t\t\tname: " + UnicodeUtils.escapeWithSpaces(h.getName()).replace("/", "\\u002F")
|
||||||
+ UnicodeUtils.escapeWithSpaces(h.getOwner()) + "\n\t\t\t\t\tdesc: " + UnicodeUtils.escapeWithSpaces(h.getDesc())
|
+ "\n\t\t\t\t\towner: " + UnicodeUtils.escapeWithSpaces(h.getOwner()) + "\n\t\t\t\t\tdesc: "
|
||||||
+ "\n\t\t\t\t\tisInterface: " + h.isInterface() + "\n\t\t\t\t\ttag: " + h.getTag();
|
+ UnicodeUtils.escapeWithSpaces(h.getDesc()) + "\n\t\t\t\t\tisInterface: " + h.isInterface() + "\n\t\t\t\t\ttag: "
|
||||||
|
+ h.getTag();
|
||||||
s += "\n\t\t\t\t]\n";
|
s += "\n\t\t\t\t]\n";
|
||||||
} else {
|
} else {
|
||||||
s += "\t\t\t\t" + ClassUtil.getDecompiledValue(l, "") + "\n";
|
s += "\t\t\t\t" + ClassUtil.getDecompiledValue(l, "") + "\n";
|
||||||
@@ -469,7 +471,7 @@ public class Disassembler {
|
|||||||
case "MethodInsnNode": {
|
case "MethodInsnNode": {
|
||||||
MethodInsnNode node = (MethodInsnNode) n;
|
MethodInsnNode node = (MethodInsnNode) n;
|
||||||
return "\t\t" + OpcodesReverse.reverseOpcode(node.getOpcode()) + " " + UnicodeUtils.escapeWithSpaces(node.desc) + " "
|
return "\t\t" + OpcodesReverse.reverseOpcode(node.getOpcode()) + " " + UnicodeUtils.escapeWithSpaces(node.desc) + " "
|
||||||
+ UnicodeUtils.escapeWithSpaces(node.owner) + "/" + UnicodeUtils.escapeWithSpaces(node.name) + "\n";
|
+ UnicodeUtils.escapeWithSpaces(node.owner) + "/" + UnicodeUtils.escapeWithSpaces(node.name).replace("/", "\\u002F") + "\n";
|
||||||
}
|
}
|
||||||
case "TypeInsnNode": {
|
case "TypeInsnNode": {
|
||||||
TypeInsnNode node = (TypeInsnNode) n;
|
TypeInsnNode node = (TypeInsnNode) n;
|
||||||
|
|||||||
Reference in new issue
Block a user