Ways to prevent data from being submitted externally
The first way to screen special characters and keywords
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 (+) = "Insert"
nothis = "Delete"
Nothis = "Drop"
Nothis = "Truncate"
Nothis (a) = "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 "<script language=" "JavaScript" ">"
Response.Write "Parent.alert" (' Sorry!) you are trying to attack this server or want to obtain the highest management of this server! will be directly to the home page ... ');
Response.Write "self.location.href= ' default.asp ';"
Response.Write "</script>"
Response.End
End If
Current 1/3 page
123 Next read the full text