fix: tomcat6 jsp LinkageError

This commit is contained in:
ReaJason
2024-12-14 20:40:18 +08:00
parent 63207195a2
commit 28a34cbf89
6 changed files with 24 additions and 8 deletions
@@ -50,7 +50,6 @@ public class ShellAssertionTool {
}
public static void assertInjectIsOk(String url, String shellType, ShellTool shellTool, byte[] content, Packer.INSTANCE packer) {
log.info(new String(content));
switch (packer) {
case JSP -> {
String uploadEntry = url + "/upload";
@@ -50,7 +50,7 @@ public class VulTool {
.url(uploadUrl).post(requestBody)
.build();
try (Response response = new OkHttpClient().newCall(request).execute()) {
log.info(response.body().string());
// log.info(response.body().string());
Assertions.assertNotEquals(404, response.code());
}
}
@@ -58,6 +58,7 @@ public class Tomcat6ContainerTest {
@AfterAll
static void tearDown() {
String logs = container.getLogs();
log.info(logs);
assertThat("Logs should not contain any exceptions", logs, doesNotContainException());
}