mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-21 22:50:42 +08:00
feat: support OGNL SpringUtils packers
This commit is contained in:
@@ -31,6 +31,8 @@ dependencies {
|
||||
|
||||
implementation("com.caucho:hessian:4.0.66")
|
||||
providedCompile("javax.servlet:javax.servlet-api:3.1.0")
|
||||
testImplementation(libs.junit.jupiter)
|
||||
testRuntimeOnly(libs.junit.platform.launcher)
|
||||
}
|
||||
|
||||
tasks.war {
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import ognl.Ognl;
|
||||
import ognl.OgnlContext;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* @author ReaJason
|
||||
* @since 2025/7/22
|
||||
*/
|
||||
class OgnlServletTest {
|
||||
|
||||
@Test
|
||||
void test() throws Exception {
|
||||
OgnlContext context = new OgnlContext();
|
||||
Object value = null;
|
||||
System.out.println(Ognl.getValue("(new java.io.File('.')).list()", context, context.getRoot()));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user