mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-22 07:00:43 +08:00
17 lines
612 B
Java
17 lines
612 B
Java
import com.googlecode.aviator.AviatorEvaluator;
|
|
import com.googlecode.aviator.AviatorEvaluatorInstance;
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
/**
|
|
* @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));
|
|
}
|
|
} |