mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-23 23:41:52 +08:00
fix: keyword is not allowed for classname
This commit is contained in:
@@ -31,7 +31,7 @@ public class AntSwordManager {
|
||||
@SneakyThrows
|
||||
public String getInfo() {
|
||||
byte[] bytes = new ByteBuddy(ClassFileVersion.JAVA_V6).redefine(Info.class)
|
||||
.name(Utils.getRandomClassName(Info.class.getName()))
|
||||
.name(Utils.getRandomClassName())
|
||||
.visit(new TargetJreVersionVisitorWrapper(Opcodes.V1_6))
|
||||
.make().getBytes();
|
||||
String base64String = Base64.getEncoder().encodeToString(bytes);
|
||||
|
||||
@@ -20,7 +20,7 @@ public class Utils {
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public static String getRandomClassName(String sourceName) {
|
||||
public static String getRandomClassName() {
|
||||
String[] domainAs = new String[]{"com", "net", "org", "sun"};
|
||||
String domainB = getRandomAlpha((new Random()).nextInt(5) + 3).toLowerCase();
|
||||
String domainC = getRandomAlpha((new Random()).nextInt(5) + 3).toLowerCase();
|
||||
|
||||
Reference in New Issue
Block a user