-
-
Save h4wkst3r/d1fb53060f777dfb23b0e3234ffada61 to your computer and use it in GitHub Desktop.
Run Calc w/ Nashorn Javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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