mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-22 07:00:43 +08:00
feat: support more expression packer
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import com.googlecode.aviator.AviatorEvaluator;
|
||||
import com.googlecode.aviator.AviatorEvaluatorInstance;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
/**
|
||||
* @author ReaJason
|
||||
* @since 2025/1/29
|
||||
*/
|
||||
class AviatorServletTest {
|
||||
|
||||
@Test
|
||||
void test() {
|
||||
String exp = "use org.springframework.cglib.core.*;use org.springframework.util.*;ReflectionUtils.invokeMethod(ClassUtils.getMethod(Class.forName('java.lang.Thread'), 'getContextClassLoader', nil), Thread.currentThread())";
|
||||
AviatorEvaluatorInstance evaluator = AviatorEvaluator.newInstance();
|
||||
System.out.println(evaluator.execute(exp));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user