Skip to content

Commit 77552b1

Browse files
Janmm14ItzSomebody
authored andcommitted
Fix custom bsm args for radon indy
1 parent 2b8949d commit 77552b1

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

src/main/java/com/javadeobfuscator/deobfuscator/transformers/special/RadonTransformer.java

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,11 @@ public boolean canCheckEquality(JavaValue first, JavaValue second, Context conte
548548
args.add(JavaValue.valueOf(dyn.name)); //dyn method name
549549
args.add(new JavaObject(null, "java/lang/invoke/MethodType")); //dyn method type
550550
for (Object o : dyn.bsmArgs) {
551-
args.add(JavaValue.valueOf(o));
551+
if (o instanceof Integer) {
552+
args.add(new JavaInteger((Integer) o));
553+
} else {
554+
args.add(JavaValue.valueOf(o));
555+
}
552556
}
553557
try {
554558
MethodInsnNode replacement = null;
@@ -614,7 +618,11 @@ public boolean canCheckEquality(JavaValue first, JavaValue second, Context conte
614618
args.add(JavaValue.valueOf(dyn.name)); //dyn method name
615619
args.add(new JavaObject(null, "java/lang/invoke/MethodType")); //dyn method type
616620
for (Object o : dyn.bsmArgs) {
617-
args.add(JavaValue.valueOf(o));
621+
if (o instanceof Integer) {
622+
args.add(new JavaInteger((Integer) o));
623+
} else {
624+
args.add(JavaValue.valueOf(o));
625+
}
618626
}
619627
try {
620628
context.clearStackTrace();
@@ -720,13 +728,13 @@ public boolean canCheckEquality(JavaValue first, JavaValue second, Context conte
720728
}
721729
}
722730
}
723-
indyBootstrap.entrySet().forEach(e -> e.getValue().forEach(m -> e.getKey().methods.remove(m)));
724-
indyBootstrap1.entrySet().forEach(e -> {
725-
classes.remove(e.getKey().name);
726-
classpath.remove(e.getKey().name);
731+
indyBootstrap.forEach((key, value) -> value.forEach(m -> key.methods.remove(m)));
732+
indyBootstrap1.forEach((key, value) -> {
733+
classes.remove(key.name);
734+
classpath.remove(key.name);
727735
});
728-
stringDecrypt.entrySet().forEach(e -> e.getValue().forEach(m -> e.getKey().methods.remove(m)));
729-
stringDecryptField.entrySet().forEach(e -> e.getValue().forEach(m -> e.getKey().fields.remove(m)));
736+
stringDecrypt.forEach((key, value) -> value.forEach(m -> key.methods.remove(m)));
737+
stringDecryptField.forEach((key, value) -> value.forEach(m -> key.fields.remove(m)));
730738
stringDecryptClass.forEach(e -> {
731739
classes.remove(e.name);
732740
classpath.remove(e.name);

0 commit comments

Comments
 (0)