mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-23 23:41:52 +08:00
fix: rename struct2 -> struts2
This commit is contained in:
@@ -16,7 +16,7 @@ public class ContainerTool {
|
||||
public static final MountableFile warExpressionFile = MountableFile.forHostPath(Path.of("..", "vul", "vul-webapp-expression", "build", "libs", "vul-webapp-expression.war").toAbsolutePath());
|
||||
public static final MountableFile warDeserializeFile = MountableFile.forHostPath(Path.of("..", "vul", "vul-webapp-deserialize", "build", "libs", "vul-webapp-deserialize.war").toAbsolutePath());
|
||||
public static final MountableFile warFile = MountableFile.forHostPath(Path.of("..", "vul", "vul-webapp", "build", "libs", "vul-webapp.war").toAbsolutePath(), 0666);
|
||||
public static final MountableFile struct2WarFile = MountableFile.forHostPath(Path.of("..", "vul", "vul-struct2", "build", "libs", "vul-struct2.war").toAbsolutePath());
|
||||
public static final MountableFile struts2WarFile = MountableFile.forHostPath(Path.of("..", "vul", "vul-struts2", "build", "libs", "vul-struts2.war").toAbsolutePath());
|
||||
public static final MountableFile springBoot2WarFile = MountableFile.forHostPath(Path.of("..", "vul", "vul-springboot2", "build", "libs", "vul-springboot2.war").toAbsolutePath());
|
||||
|
||||
public static final MountableFile springBoot1JarFile = MountableFile.forHostPath(Path.of("..", "vul", "vul-springboot1", "build", "libs", "vul-springboot1.jar").toAbsolutePath());
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
package com.reajason.javaweb.integration.memshell.struct2;
|
||||
package com.reajason.javaweb.integration.memshell.struts2;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.AbstractContainerTest;
|
||||
@@ -19,11 +19,11 @@ import java.util.List;
|
||||
* @since 2024/12/4
|
||||
*/
|
||||
@Testcontainers
|
||||
public class Struct2ContainerTest extends AbstractContainerTest {
|
||||
public class Struts2ContainerTest extends AbstractContainerTest {
|
||||
private static final ContainerTestConfig CONFIG = ContainerTestConfig.builder()
|
||||
.imageName("tomcat:8-jre8")
|
||||
.server(Server.Struct2)
|
||||
.warFile(ContainerTool.struct2WarFile)
|
||||
.server(Server.Struts2)
|
||||
.warFile(ContainerTool.struts2WarFile)
|
||||
.warDeployPath("/usr/local/tomcat/webapps/app.war")
|
||||
.pidScript(ContainerTool.tomcatPid)
|
||||
.enableJspPackerTest(false)
|
||||
+6
-6
@@ -1,4 +1,4 @@
|
||||
package com.reajason.javaweb.integration.probe.struct2;
|
||||
package com.reajason.javaweb.integration.probe.struts2;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
@@ -11,17 +11,17 @@ import org.testcontainers.containers.GenericContainer;
|
||||
import org.testcontainers.junit.jupiter.Container;
|
||||
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.struct2WarFile;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.struts2WarFile;
|
||||
|
||||
/**
|
||||
* @author ReaJason
|
||||
* @since 2024/12/4
|
||||
*/
|
||||
@Testcontainers
|
||||
public class Struct2ContainerTest extends AbstractProbeContainerTest {
|
||||
public class Struts2ContainerTest extends AbstractProbeContainerTest {
|
||||
|
||||
private static final ProbeTestConfig CONFIG = ProbeTestConfig.tomcat("tomcat:8-jre8")
|
||||
.warFile(struct2WarFile)
|
||||
.warFile(struts2WarFile)
|
||||
.expectedJdkVersion("JRE|1.8.0_402|52")
|
||||
.targetJdkVersion(Opcodes.V1_8)
|
||||
.supportsBytecode(false)
|
||||
@@ -47,7 +47,7 @@ public class Struct2ContainerTest extends AbstractProbeContainerTest {
|
||||
@SneakyThrows
|
||||
protected void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl();
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.Struct2, Opcodes.V1_8);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.Struts2, Opcodes.V1_8);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -55,6 +55,6 @@ public class Struct2ContainerTest extends AbstractProbeContainerTest {
|
||||
@SneakyThrows
|
||||
protected void testScriptEngineReqHeaderResponseBody() {
|
||||
String url = getUrl();
|
||||
ProbeAssertion.responseScriptEngineIsOk(url, Server.Struct2, Opcodes.V1_8);
|
||||
ProbeAssertion.responseScriptEngineIsOk(url, Server.Struts2, Opcodes.V1_8);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user