sql的注射方法分为Request.QueryString、Request.Form、Request.Cookies和 Request.ServerVariables
对于get的方法攻击
可以这样
fqys=request.servervariables("query_string")
dim nothis(18)
nothis(0)="net user"
nothis(1)="xp_cmdshell"
nothis(2)="/add"
nothis(3)="exec%20master.dbo.xp_cmdshell"
nothis(4)="net localgroup administrators"
nothis(5)="select"
nothis(6)="count"
nothis(7)="asc"
nothis(8)="char"
nothis(9)="mid"
nothis(10)="'"
nothis(11)=":"
nothis(12)=""""
nothis(13)="insert"
nothis(14)="delete"
nothis(15)="drop"
nothis(16)="truncate"
nothis(17)="from"
nothis(18)="%"
errc=false
for i= 0 to ubound(nothis)
if instr(FQYs,nothis(i))<>0 then
errc=true
end if
next
if errc then
response.write " "
response.end
end if
<%
function clear(str)
str1=replace(str,"'","")
str1=replace(str1,"and","")
str1=replace(str1,";","")
str1=replace(str1," ","")
if str<>str1 then response.end
clear=str1
end function
%>