-
-
Save mgeeky/b8d1af37f978ed650de1cefa36e2983b to your computer and use it in GitHub Desktop.
Executing JScript from Powershell via .NET reflection
This file contains hidden or 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
[Reflection.Assembly]::LoadWithPartialName('Microsoft.JScript'); | |
$js = 'var js = new ActiveXObject("WScript.Shell");js.Run("calc");' | |
[Microsoft.JScript.Eval]::JScriptEvaluate($js,[Microsoft.JScript.Vsa.VsaEngine]::CreateEngine()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment