Methods to prevent data from being submitted from external sources
First, SHIELD special characters and keywords
Fqys = request. servervariables ("QUERY_STRING ")
Dim nothis (18)
Nothis (0) = "Net user"
Nothis (1) = "xp_mongoshell"
Nothis (2) = "/Add"
Nothis (3) = "Exec % 20master. DBO. xp_mongoshell"
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 "<script language =" "JavaScript" ">"
Response. Write "parent. Alert ('sorry! You are attempting to attack this server or want to obtain the highest authority of this server! Will go directly to the home page ..');"
Response. Write "self. Location. href = 'default. asp ';"
Response. Write "</SCRIPT>"
Response. End
End if