Skip to content

Instantly share code, notes, and snippets.

@h4wkst3r
Created April 24, 2018 23:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save h4wkst3r/d1fb53060f777dfb23b0e3234ffada61 to your computer and use it in GitHub Desktop.
Save h4wkst3r/d1fb53060f777dfb23b0e3234ffada61 to your computer and use it in GitHub Desktop.
Run Calc w/ Nashorn Javascript
// set process name to start
var processName = "calc.exe";
print("Starting Calc");
// create a reference to a Runtime object
var RuntimeJavaClass = Java.type('java.lang.Runtime');
// Start the calc process
RuntimeJavaClass.getRuntime().exec(processName, null);
print("Calc has now been executed");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment