Instantly share code, notes, and snippets.

@h4wkst3r /nashornCalc.js Secret
Created Apr 24, 2018

Embed
What would you like to do?
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