refactor: simplify memshell generate map register

This commit is contained in:
ReaJason
2025-02-23 02:33:09 +08:00
parent bba2b2d211
commit d9e3e03def
177 changed files with 3761 additions and 10859 deletions
@@ -1,10 +1,10 @@
package com.reajason.javaweb.integration.weblogic;
import com.reajason.javaweb.memshell.WebLogicShell;
import com.reajason.javaweb.memshell.config.Constants;
import com.reajason.javaweb.memshell.config.Server;
import com.reajason.javaweb.memshell.config.ShellTool;
import com.reajason.javaweb.memshell.packer.Packers;
import com.reajason.javaweb.memshell.server.WebLogicShell;
import com.reajason.javaweb.memshell.ShellType;
import com.reajason.javaweb.memshell.Server;
import com.reajason.javaweb.memshell.ShellTool;
import com.reajason.javaweb.memshell.Packers;
import lombok.extern.slf4j.Slf4j;
import net.bytebuddy.jar.asm.Opcodes;
import org.junit.jupiter.api.AfterAll;
@@ -41,20 +41,20 @@ public class WebLogic1036ContainerTest {
static Stream<Arguments> casesProvider() {
return Stream.of(
// arguments(imageName, Constants.SERVLET, ShellTool.Behinder, Packer.INSTANCE.Base64), // java.net.SocketTimeoutException
arguments(imageName, Constants.SERVLET, ShellTool.Godzilla, Packers.Base64),
arguments(imageName, Constants.SERVLET, ShellTool.Command, Packers.Base64),
arguments(imageName, Constants.SERVLET, ShellTool.Suo5, Packers.Base64),
arguments(imageName, Constants.SERVLET, ShellTool.AntSword, Packers.Base64),
arguments(imageName, ShellType.SERVLET, ShellTool.Godzilla, Packers.Base64),
arguments(imageName, ShellType.SERVLET, ShellTool.Command, Packers.Base64),
arguments(imageName, ShellType.SERVLET, ShellTool.Suo5, Packers.Base64),
arguments(imageName, ShellType.SERVLET, ShellTool.AntSword, Packers.Base64),
// arguments(imageName, Constants.FILTER, ShellTool.Behinder, Packer.INSTANCE.Base64), // java.net.SocketTimeoutException
arguments(imageName, Constants.FILTER, ShellTool.Godzilla, Packers.Base64),
arguments(imageName, Constants.FILTER, ShellTool.Command, Packers.Base64),
arguments(imageName, Constants.FILTER, ShellTool.Suo5, Packers.Base64),
arguments(imageName, Constants.FILTER, ShellTool.AntSword, Packers.Base64),
arguments(imageName, Constants.LISTENER, ShellTool.Behinder, Packers.Base64),
arguments(imageName, Constants.LISTENER, ShellTool.Godzilla, Packers.Base64),
arguments(imageName, Constants.LISTENER, ShellTool.Command, Packers.Base64),
arguments(imageName, Constants.LISTENER, ShellTool.Suo5, Packers.Base64),
arguments(imageName, Constants.LISTENER, ShellTool.AntSword, Packers.Base64),
arguments(imageName, ShellType.FILTER, ShellTool.Godzilla, Packers.Base64),
arguments(imageName, ShellType.FILTER, ShellTool.Command, Packers.Base64),
arguments(imageName, ShellType.FILTER, ShellTool.Suo5, Packers.Base64),
arguments(imageName, ShellType.FILTER, ShellTool.AntSword, Packers.Base64),
arguments(imageName, ShellType.LISTENER, ShellTool.Behinder, Packers.Base64),
arguments(imageName, ShellType.LISTENER, ShellTool.Godzilla, Packers.Base64),
arguments(imageName, ShellType.LISTENER, ShellTool.Command, Packers.Base64),
arguments(imageName, ShellType.LISTENER, ShellTool.Suo5, Packers.Base64),
arguments(imageName, ShellType.LISTENER, ShellTool.AntSword, Packers.Base64),
arguments(imageName, WebLogicShell.AGENT_SERVLET_CONTEXT, ShellTool.AntSword, Packers.AgentJar),
arguments(imageName, WebLogicShell.AGENT_SERVLET_CONTEXT, ShellTool.Command, Packers.AgentJar),
arguments(imageName, WebLogicShell.AGENT_SERVLET_CONTEXT, ShellTool.Behinder, Packers.AgentJar),
@@ -1,10 +1,10 @@
package com.reajason.javaweb.integration.weblogic;
import com.reajason.javaweb.memshell.WebLogicShell;
import com.reajason.javaweb.memshell.config.Constants;
import com.reajason.javaweb.memshell.config.Server;
import com.reajason.javaweb.memshell.config.ShellTool;
import com.reajason.javaweb.memshell.packer.Packers;
import com.reajason.javaweb.memshell.server.WebLogicShell;
import com.reajason.javaweb.memshell.ShellType;
import com.reajason.javaweb.memshell.Server;
import com.reajason.javaweb.memshell.ShellTool;
import com.reajason.javaweb.memshell.Packers;
import lombok.extern.slf4j.Slf4j;
import net.bytebuddy.jar.asm.Opcodes;
import org.junit.jupiter.api.AfterAll;
@@ -42,21 +42,21 @@ public class WebLogic12214ContainerTest {
static Stream<Arguments> casesProvider() {
return Stream.of(
arguments(imageName, Constants.SERVLET, ShellTool.Behinder, Packers.Base64),
arguments(imageName, Constants.SERVLET, ShellTool.Godzilla, Packers.Base64),
arguments(imageName, Constants.SERVLET, ShellTool.Command, Packers.Base64),
arguments(imageName, Constants.SERVLET, ShellTool.Suo5, Packers.Base64),
arguments(imageName, Constants.SERVLET, ShellTool.AntSword, Packers.Base64),
arguments(imageName, Constants.FILTER, ShellTool.Behinder, Packers.Base64),
arguments(imageName, Constants.FILTER, ShellTool.Godzilla, Packers.Base64),
arguments(imageName, Constants.FILTER, ShellTool.Command, Packers.Base64),
arguments(imageName, Constants.FILTER, ShellTool.Suo5, Packers.Base64),
arguments(imageName, Constants.FILTER, ShellTool.AntSword, Packers.Base64),
arguments(imageName, Constants.LISTENER, ShellTool.Behinder, Packers.Base64),
arguments(imageName, Constants.LISTENER, ShellTool.Godzilla, Packers.Base64),
arguments(imageName, Constants.LISTENER, ShellTool.Command, Packers.Base64),
arguments(imageName, Constants.LISTENER, ShellTool.Suo5, Packers.Base64),
arguments(imageName, Constants.LISTENER, ShellTool.AntSword, Packers.Base64),
arguments(imageName, ShellType.SERVLET, ShellTool.Behinder, Packers.Base64),
arguments(imageName, ShellType.SERVLET, ShellTool.Godzilla, Packers.Base64),
arguments(imageName, ShellType.SERVLET, ShellTool.Command, Packers.Base64),
arguments(imageName, ShellType.SERVLET, ShellTool.Suo5, Packers.Base64),
arguments(imageName, ShellType.SERVLET, ShellTool.AntSword, Packers.Base64),
arguments(imageName, ShellType.FILTER, ShellTool.Behinder, Packers.Base64),
arguments(imageName, ShellType.FILTER, ShellTool.Godzilla, Packers.Base64),
arguments(imageName, ShellType.FILTER, ShellTool.Command, Packers.Base64),
arguments(imageName, ShellType.FILTER, ShellTool.Suo5, Packers.Base64),
arguments(imageName, ShellType.FILTER, ShellTool.AntSword, Packers.Base64),
arguments(imageName, ShellType.LISTENER, ShellTool.Behinder, Packers.Base64),
arguments(imageName, ShellType.LISTENER, ShellTool.Godzilla, Packers.Base64),
arguments(imageName, ShellType.LISTENER, ShellTool.Command, Packers.Base64),
arguments(imageName, ShellType.LISTENER, ShellTool.Suo5, Packers.Base64),
arguments(imageName, ShellType.LISTENER, ShellTool.AntSword, Packers.Base64),
arguments(imageName, WebLogicShell.AGENT_SERVLET_CONTEXT, ShellTool.AntSword, Packers.AgentJar),
arguments(imageName, WebLogicShell.AGENT_SERVLET_CONTEXT, ShellTool.Command, Packers.AgentJar),
arguments(imageName, WebLogicShell.AGENT_SERVLET_CONTEXT, ShellTool.Behinder, Packers.AgentJar),
@@ -1,10 +1,10 @@
package com.reajason.javaweb.integration.weblogic;
import com.reajason.javaweb.memshell.WebLogicShell;
import com.reajason.javaweb.memshell.config.Constants;
import com.reajason.javaweb.memshell.config.Server;
import com.reajason.javaweb.memshell.config.ShellTool;
import com.reajason.javaweb.memshell.packer.Packers;
import com.reajason.javaweb.memshell.server.WebLogicShell;
import com.reajason.javaweb.memshell.ShellType;
import com.reajason.javaweb.memshell.Server;
import com.reajason.javaweb.memshell.ShellTool;
import com.reajason.javaweb.memshell.Packers;
import lombok.extern.slf4j.Slf4j;
import net.bytebuddy.jar.asm.Opcodes;
import org.junit.jupiter.api.AfterAll;
@@ -42,21 +42,21 @@ public class WebLogic14110ContainerTest {
static Stream<Arguments> casesProvider() {
return Stream.of(
arguments(imageName, Constants.SERVLET, ShellTool.Behinder, Packers.Base64),
arguments(imageName, Constants.SERVLET, ShellTool.Godzilla, Packers.Base64),
arguments(imageName, Constants.SERVLET, ShellTool.Command, Packers.Base64),
arguments(imageName, Constants.SERVLET, ShellTool.Suo5, Packers.Base64),
arguments(imageName, Constants.SERVLET, ShellTool.AntSword, Packers.Base64),
arguments(imageName, Constants.FILTER, ShellTool.Behinder, Packers.Base64),
arguments(imageName, Constants.FILTER, ShellTool.Godzilla, Packers.Base64),
arguments(imageName, Constants.FILTER, ShellTool.Command, Packers.Base64),
arguments(imageName, Constants.FILTER, ShellTool.Suo5, Packers.Base64),
arguments(imageName, Constants.FILTER, ShellTool.AntSword, Packers.Base64),
arguments(imageName, Constants.LISTENER, ShellTool.Behinder, Packers.Base64),
arguments(imageName, Constants.LISTENER, ShellTool.Godzilla, Packers.Base64),
arguments(imageName, Constants.LISTENER, ShellTool.Command, Packers.Base64),
arguments(imageName, Constants.LISTENER, ShellTool.Suo5, Packers.Base64),
arguments(imageName, Constants.LISTENER, ShellTool.AntSword, Packers.Base64),
arguments(imageName, ShellType.SERVLET, ShellTool.Behinder, Packers.Base64),
arguments(imageName, ShellType.SERVLET, ShellTool.Godzilla, Packers.Base64),
arguments(imageName, ShellType.SERVLET, ShellTool.Command, Packers.Base64),
arguments(imageName, ShellType.SERVLET, ShellTool.Suo5, Packers.Base64),
arguments(imageName, ShellType.SERVLET, ShellTool.AntSword, Packers.Base64),
arguments(imageName, ShellType.FILTER, ShellTool.Behinder, Packers.Base64),
arguments(imageName, ShellType.FILTER, ShellTool.Godzilla, Packers.Base64),
arguments(imageName, ShellType.FILTER, ShellTool.Command, Packers.Base64),
arguments(imageName, ShellType.FILTER, ShellTool.Suo5, Packers.Base64),
arguments(imageName, ShellType.FILTER, ShellTool.AntSword, Packers.Base64),
arguments(imageName, ShellType.LISTENER, ShellTool.Behinder, Packers.Base64),
arguments(imageName, ShellType.LISTENER, ShellTool.Godzilla, Packers.Base64),
arguments(imageName, ShellType.LISTENER, ShellTool.Command, Packers.Base64),
arguments(imageName, ShellType.LISTENER, ShellTool.Suo5, Packers.Base64),
arguments(imageName, ShellType.LISTENER, ShellTool.AntSword, Packers.Base64),
arguments(imageName, WebLogicShell.AGENT_SERVLET_CONTEXT, ShellTool.AntSword, Packers.AgentJar),
arguments(imageName, WebLogicShell.AGENT_SERVLET_CONTEXT, ShellTool.Command, Packers.AgentJar),
arguments(imageName, WebLogicShell.AGENT_SERVLET_CONTEXT, ShellTool.Behinder, Packers.AgentJar),