mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-23 15:31:53 +08:00
feat: support was and weblogic agent shell
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.reajason.javaweb.memshell;
|
||||
|
||||
import com.reajason.javaweb.memshell.tomcat.injector.TomcatFilterChainAgentInjector;
|
||||
import com.reajason.javaweb.memshell.shelltool.behinder.BehinderFilter;
|
||||
import com.reajason.javaweb.memshell.shelltool.behinder.BehinderServlet;
|
||||
import com.reajason.javaweb.memshell.shelltool.behinder.BehinderValve;
|
||||
@@ -10,12 +11,12 @@ import com.reajason.javaweb.memshell.shelltool.godzilla.GodzillaFilter;
|
||||
import com.reajason.javaweb.memshell.shelltool.godzilla.GodzillaServlet;
|
||||
import com.reajason.javaweb.memshell.shelltool.godzilla.GodzillaValve;
|
||||
import com.reajason.javaweb.memshell.tomcat.behinder.BehinderListener;
|
||||
import com.reajason.javaweb.memshell.tomcat.behinder.TomcatFilterChainBehinderAdvisor;
|
||||
import com.reajason.javaweb.memshell.shelltool.behinder.BehinderFilterChainAdvisor;
|
||||
import com.reajason.javaweb.memshell.tomcat.command.CommandListener;
|
||||
import com.reajason.javaweb.memshell.tomcat.command.CommandWebSocket;
|
||||
import com.reajason.javaweb.memshell.tomcat.command.TomcatFilterChainCommandAdvisor;
|
||||
import com.reajason.javaweb.memshell.shelltool.command.CommandFilterChainAdvisor;
|
||||
import com.reajason.javaweb.memshell.tomcat.godzilla.GodzillaListener;
|
||||
import com.reajason.javaweb.memshell.tomcat.godzilla.TomcatFilterChainGodzillaAdvisor;
|
||||
import com.reajason.javaweb.memshell.shelltool.godzilla.GodzillaFilterChainAdvisor;
|
||||
import com.reajason.javaweb.memshell.tomcat.injector.*;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
@@ -45,8 +46,8 @@ public class TomcatShell extends AbstractShell {
|
||||
Map.entry(JAKARTA_LISTENER, Pair.of(CommandListener.class, TomcatListenerInjector.class)),
|
||||
Map.entry(VALVE, Pair.of(CommandValve.class, TomcatValveInjector.class)),
|
||||
Map.entry(JAKARTA_VALVE, Pair.of(CommandValve.class, TomcatValveInjector.class)),
|
||||
Map.entry(AGENT_FILTER_CHAIN, Pair.of(TomcatFilterChainCommandAdvisor.class, TomcatFilterChainAgentInjector.class)),
|
||||
Map.entry(AGENT_JAKARTA_FILTER_CHAIN, Pair.of(TomcatFilterChainCommandAdvisor.class, TomcatFilterChainAgentInjector.class)),
|
||||
Map.entry(AGENT_FILTER_CHAIN, Pair.of(CommandFilterChainAdvisor.class, TomcatFilterChainAgentInjector.class)),
|
||||
Map.entry(AGENT_JAKARTA_FILTER_CHAIN, Pair.of(CommandFilterChainAdvisor.class, TomcatFilterChainAgentInjector.class)),
|
||||
Map.entry(WEBSOCKET, Pair.of(CommandWebSocket.class, TomcatWebSocketInjector.class))
|
||||
);
|
||||
}
|
||||
@@ -62,8 +63,8 @@ public class TomcatShell extends AbstractShell {
|
||||
JAKARTA_LISTENER, Pair.of(GodzillaListener.class, TomcatListenerInjector.class),
|
||||
VALVE, Pair.of(GodzillaValve.class, TomcatValveInjector.class),
|
||||
JAKARTA_VALVE, Pair.of(GodzillaValve.class, TomcatValveInjector.class),
|
||||
AGENT_FILTER_CHAIN, Pair.of(TomcatFilterChainGodzillaAdvisor.class, TomcatFilterChainAgentInjector.class),
|
||||
AGENT_JAKARTA_FILTER_CHAIN, Pair.of(TomcatFilterChainGodzillaAdvisor.class, TomcatFilterChainAgentInjector.class)
|
||||
AGENT_FILTER_CHAIN, Pair.of(GodzillaFilterChainAdvisor.class, TomcatFilterChainAgentInjector.class),
|
||||
AGENT_JAKARTA_FILTER_CHAIN, Pair.of(GodzillaFilterChainAdvisor.class, TomcatFilterChainAgentInjector.class)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -78,8 +79,8 @@ public class TomcatShell extends AbstractShell {
|
||||
JAKARTA_LISTENER, Pair.of(BehinderListener.class, TomcatListenerInjector.class),
|
||||
VALVE, Pair.of(BehinderValve.class, TomcatValveInjector.class),
|
||||
JAKARTA_VALVE, Pair.of(BehinderValve.class, TomcatValveInjector.class),
|
||||
AGENT_FILTER_CHAIN, Pair.of(TomcatFilterChainBehinderAdvisor.class, TomcatFilterChainAgentInjector.class),
|
||||
AGENT_JAKARTA_FILTER_CHAIN, Pair.of(TomcatFilterChainBehinderAdvisor.class, TomcatFilterChainAgentInjector.class)
|
||||
AGENT_FILTER_CHAIN, Pair.of(BehinderFilterChainAdvisor.class, TomcatFilterChainAgentInjector.class),
|
||||
AGENT_JAKARTA_FILTER_CHAIN, Pair.of(BehinderFilterChainAdvisor.class, TomcatFilterChainAgentInjector.class)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.reajason.javaweb.memshell;
|
||||
|
||||
import com.reajason.javaweb.memshell.shelltool.behinder.BehinderFilterChainAdvisor;
|
||||
import com.reajason.javaweb.memshell.shelltool.command.CommandFilterChainAdvisor;
|
||||
import com.reajason.javaweb.memshell.shelltool.godzilla.GodzillaFilterChainAdvisor;
|
||||
import com.reajason.javaweb.memshell.shelltool.behinder.BehinderFilter;
|
||||
import com.reajason.javaweb.memshell.shelltool.behinder.BehinderServlet;
|
||||
import com.reajason.javaweb.memshell.shelltool.command.CommandFilter;
|
||||
@@ -12,6 +15,7 @@ import com.reajason.javaweb.memshell.weblogic.godzilla.GodzillaListener;
|
||||
import com.reajason.javaweb.memshell.weblogic.injector.WebLogicFilterInjector;
|
||||
import com.reajason.javaweb.memshell.weblogic.injector.WebLogicListenerInjector;
|
||||
import com.reajason.javaweb.memshell.weblogic.injector.WebLogicServletInjector;
|
||||
import com.reajason.javaweb.memshell.weblogic.injector.WebLogicServletStubAgentInjector;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import java.util.Map;
|
||||
@@ -23,12 +27,15 @@ import static com.reajason.javaweb.memshell.config.Constants.*;
|
||||
* @since 2024/12/24
|
||||
*/
|
||||
public class WebLogicShell extends AbstractShell {
|
||||
public static final String AGENT_SERVLET_STUB = AGENT + "ServletStub";
|
||||
|
||||
@Override
|
||||
protected Map<String, Pair<Class<?>, Class<?>>> getBehinderShellMap() {
|
||||
return Map.of(
|
||||
SERVLET, Pair.of(BehinderServlet.class, WebLogicServletInjector.class),
|
||||
FILTER, Pair.of(BehinderFilter.class, WebLogicFilterInjector.class),
|
||||
LISTENER, Pair.of(BehinderListener.class, WebLogicListenerInjector.class)
|
||||
LISTENER, Pair.of(BehinderListener.class, WebLogicListenerInjector.class),
|
||||
AGENT_SERVLET_STUB, Pair.of(BehinderFilterChainAdvisor.class, WebLogicServletStubAgentInjector.class)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -37,7 +44,8 @@ public class WebLogicShell extends AbstractShell {
|
||||
return Map.of(
|
||||
SERVLET, Pair.of(CommandServlet.class, WebLogicServletInjector.class),
|
||||
FILTER, Pair.of(CommandFilter.class, WebLogicFilterInjector.class),
|
||||
LISTENER, Pair.of(CommandListener.class, WebLogicListenerInjector.class)
|
||||
LISTENER, Pair.of(CommandListener.class, WebLogicListenerInjector.class),
|
||||
AGENT_SERVLET_STUB, Pair.of(CommandFilterChainAdvisor.class, WebLogicServletStubAgentInjector.class)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -46,7 +54,8 @@ public class WebLogicShell extends AbstractShell {
|
||||
return Map.of(
|
||||
SERVLET, Pair.of(GodzillaServlet.class, WebLogicServletInjector.class),
|
||||
FILTER, Pair.of(GodzillaFilter.class, WebLogicFilterInjector.class),
|
||||
LISTENER, Pair.of(GodzillaListener.class, WebLogicListenerInjector.class)
|
||||
LISTENER, Pair.of(GodzillaListener.class, WebLogicListenerInjector.class),
|
||||
AGENT_SERVLET_STUB, Pair.of(GodzillaFilterChainAdvisor.class, WebLogicServletStubAgentInjector.class)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.reajason.javaweb.memshell;
|
||||
|
||||
import com.reajason.javaweb.memshell.shelltool.behinder.BehinderFilterChainAdvisor;
|
||||
import com.reajason.javaweb.memshell.shelltool.command.CommandFilterChainAdvisor;
|
||||
import com.reajason.javaweb.memshell.shelltool.godzilla.GodzillaFilterChainAdvisor;
|
||||
import com.reajason.javaweb.memshell.shelltool.behinder.BehinderFilter;
|
||||
import com.reajason.javaweb.memshell.shelltool.behinder.BehinderServlet;
|
||||
import com.reajason.javaweb.memshell.shelltool.command.CommandFilter;
|
||||
@@ -9,6 +12,7 @@ import com.reajason.javaweb.memshell.shelltool.godzilla.GodzillaServlet;
|
||||
import com.reajason.javaweb.memshell.websphere.behinder.BehinderListener;
|
||||
import com.reajason.javaweb.memshell.websphere.command.CommandListener;
|
||||
import com.reajason.javaweb.memshell.websphere.godzilla.GodzillaListener;
|
||||
import com.reajason.javaweb.memshell.websphere.injector.WebSphereFilterChainAgentInjector;
|
||||
import com.reajason.javaweb.memshell.websphere.injector.WebSphereFilterInjector;
|
||||
import com.reajason.javaweb.memshell.websphere.injector.WebSphereListenerInjector;
|
||||
import com.reajason.javaweb.memshell.websphere.injector.WebSphereServletInjector;
|
||||
@@ -23,12 +27,15 @@ import static com.reajason.javaweb.memshell.config.Constants.*;
|
||||
* @since 2024/12/21
|
||||
*/
|
||||
public class WebSphereShell extends AbstractShell {
|
||||
public static final String AGENT_FILTER_MANAGER = AGENT + "FilterManager";
|
||||
|
||||
@Override
|
||||
protected Map<String, Pair<Class<?>, Class<?>>> getCommandShellMap() {
|
||||
return Map.of(
|
||||
SERVLET, Pair.of(CommandServlet.class, WebSphereServletInjector.class),
|
||||
FILTER, Pair.of(CommandFilter.class, WebSphereFilterInjector.class),
|
||||
LISTENER, Pair.of(CommandListener.class, WebSphereListenerInjector.class)
|
||||
LISTENER, Pair.of(CommandListener.class, WebSphereListenerInjector.class),
|
||||
AGENT_FILTER_MANAGER, Pair.of(CommandFilterChainAdvisor.class, WebSphereFilterChainAgentInjector.class)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -37,7 +44,8 @@ public class WebSphereShell extends AbstractShell {
|
||||
return Map.of(
|
||||
SERVLET, Pair.of(GodzillaServlet.class, WebSphereServletInjector.class),
|
||||
FILTER, Pair.of(GodzillaFilter.class, WebSphereFilterInjector.class),
|
||||
LISTENER, Pair.of(GodzillaListener.class, WebSphereListenerInjector.class)
|
||||
LISTENER, Pair.of(GodzillaListener.class, WebSphereListenerInjector.class),
|
||||
AGENT_FILTER_MANAGER, Pair.of(GodzillaFilterChainAdvisor.class, WebSphereFilterChainAgentInjector.class)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -46,7 +54,8 @@ public class WebSphereShell extends AbstractShell {
|
||||
return Map.of(
|
||||
SERVLET, Pair.of(BehinderServlet.class, WebSphereServletInjector.class),
|
||||
FILTER, Pair.of(BehinderFilter.class, WebSphereFilterInjector.class),
|
||||
LISTENER, Pair.of(BehinderListener.class, WebSphereListenerInjector.class)
|
||||
LISTENER, Pair.of(BehinderListener.class, WebSphereListenerInjector.class),
|
||||
AGENT_FILTER_MANAGER, Pair.of(BehinderFilterChainAdvisor.class, WebSphereFilterChainAgentInjector.class)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user