feat: add tomcat servlet shell (#2) (#3)

* feat: support tomcat servlet shell

* test: glassfish 3 and 4 not work

* ci: update badge

---------

Co-authored-by: ReaJason <[email protected]>
This commit is contained in:
ReaJason
2024-12-15 16:02:22 +08:00
committed by GitHub
co-authored by ReaJason
parent 58045d0bb3
commit 0972d714d7
16 changed files with 531 additions and 13 deletions
@@ -14,7 +14,14 @@ import java.util.Base64;
@Slf4j
public class ShellAssertionTool {
public static void testShellInjectAssertOk(String url, Server server, String shellType, ShellTool shellTool, int targetJdkVersion, Packer.INSTANCE packer) {
String shellUrl = url + "/test";
InjectorConfig injectorConfig = new InjectorConfig();
if (shellType.endsWith(Constants.SERVLET)) {
String urlPattern = "/" + shellTool + shellType + packer.name();
shellUrl = url + urlPattern;
injectorConfig.setUrlPattern(urlPattern);
}
ShellConfig shellConfig = ShellConfig.builder()
.server(server)
@@ -24,7 +31,7 @@ public class ShellAssertionTool {
.debug(true)
.build();
String shellUrl = url + "/test";
switch (shellTool) {
case Godzilla:
String pass = "pass";