mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-24 07:51:52 +08:00
fix: compile error
This commit is contained in:
@@ -20,22 +20,24 @@ public class GeneratorMain {
|
|||||||
|
|
||||||
public static void main(String[] args) throws IOException {
|
public static void main(String[] args) throws IOException {
|
||||||
ShellConfig shellConfig = ShellConfig.builder()
|
ShellConfig shellConfig = ShellConfig.builder()
|
||||||
.server(Server.TOMCAT)
|
.server(Server.Resin)
|
||||||
.shellTool(ShellTool.Godzilla)
|
.shellTool(ShellTool.Command)
|
||||||
.shellType(Constants.FILTER).build();
|
.shellType(Constants.FILTER)
|
||||||
|
.targetJreVersion(Opcodes.V11)
|
||||||
|
.build();
|
||||||
GodzillaConfig godzillaConfig = GodzillaConfig.builder()
|
GodzillaConfig godzillaConfig = GodzillaConfig.builder()
|
||||||
.pass("pass")
|
.pass("pass")
|
||||||
.key("key")
|
.key("key")
|
||||||
.headerName("User-Agent")
|
.headerName("User-Agent")
|
||||||
.headerValue("test123")
|
.headerValue("test123").build();
|
||||||
.build();
|
CommandConfig commandConfig = CommandConfig.builder().paramName("cmd").build();
|
||||||
InjectorConfig injectorConfig = new InjectorConfig();
|
InjectorConfig injectorConfig = new InjectorConfig();
|
||||||
GenerateResult generateResult = generate(shellConfig, injectorConfig, godzillaConfig);
|
GenerateResult generateResult = generate(shellConfig, injectorConfig, commandConfig);
|
||||||
if (generateResult != null) {
|
if (generateResult != null) {
|
||||||
Files.write(Paths.get(generateResult.getInjectorClassName() + ".class"), generateResult.getInjectorBytes(), StandardOpenOption.CREATE_NEW);
|
Files.write(Paths.get(generateResult.getInjectorClassName() + ".class"), generateResult.getInjectorBytes(), StandardOpenOption.CREATE_NEW);
|
||||||
Files.write(Paths.get(generateResult.getShellClassName() + ".class"), generateResult.getShellBytes(), StandardOpenOption.CREATE_NEW);
|
Files.write(Paths.get(generateResult.getShellClassName() + ".class"), generateResult.getShellBytes(), StandardOpenOption.CREATE_NEW);
|
||||||
System.out.println(Base64.encodeBase64String(generateResult.getInjectorBytes()));
|
System.out.println(Base64.encodeBase64String(generateResult.getInjectorBytes()));
|
||||||
Packer.INSTANCE.JSP.getPacker().pack(generateResult);
|
System.out.println(Base64.encodeBase64String(Packer.INSTANCE.JSP.getPacker().pack(generateResult)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user