mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-23 23:41:52 +08:00
refactor: simplify code
This commit is contained in:
+1
-3
@@ -41,6 +41,7 @@ public class CommandGenerator {
|
|||||||
DynamicType.Builder<?> builder = new ByteBuddy()
|
DynamicType.Builder<?> builder = new ByteBuddy()
|
||||||
.redefine(commandConfig.getShellClass())
|
.redefine(commandConfig.getShellClass())
|
||||||
.name(commandConfig.getShellClassName())
|
.name(commandConfig.getShellClassName())
|
||||||
|
.field(named("paramName")).value(commandConfig.getParamName())
|
||||||
.visit(new TargetJreVersionVisitorWrapper(shellConfig.getTargetJreVersion()));
|
.visit(new TargetJreVersionVisitorWrapper(shellConfig.getTargetJreVersion()));
|
||||||
|
|
||||||
if (shellConfig.isJakarta()) {
|
if (shellConfig.isJakarta()) {
|
||||||
@@ -59,9 +60,6 @@ public class CommandGenerator {
|
|||||||
put("paramName", commandConfig.getParamName());
|
put("paramName", commandConfig.getParamName());
|
||||||
}})
|
}})
|
||||||
);
|
);
|
||||||
} else if (!ShellType.WEBSOCKET.equals(shellType)) {
|
|
||||||
builder = builder.field(named("paramName"))
|
|
||||||
.value(commandConfig.getParamName());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CommandConfig.Encryptor.DOUBLE_BASE64.equals(commandConfig.getEncryptor())) {
|
if (CommandConfig.Encryptor.DOUBLE_BASE64.equals(commandConfig.getEncryptor())) {
|
||||||
|
|||||||
Reference in New Issue
Block a user