Сильная анти -кв.
Программный код
<%
«Анти -инъекционная система»
Dim BQS, Berrc, Biii, Burl
bqs = request.servervariables (Query_string)
Если запрос. Servervariables (https) = off, then burl = http: // else burl = https: // end if
Burl = burl & request.servervariables (server_name)
Если запрос. Servervariables (Server_port) <> 80, Then Burl = Burl &: & request.servervariables (server_port) End Если
Burl = burl & request.servervariables (URL)
Если запрос.
'Burl = request.servervariables (url)
Dim Bnothis (61)
bnothis (0) = net user
Bnothis (1) =@a
Bnothis (2) =/add
bnothis (3) = exec%20master.dbo.xp_cmdshell
Bnothis (4) = чистая локальная группа администраторов
Bnothis (5) = выберите
bnothis (6) = count
Bnothis (7) = ASC
bnothis (8) = char
Bnothis (9) = середина
bnothis (10) = cscript.exe
bnothis (11) = объявить
Bnothis (12) = вставка
bnothis (13) = удалить
Bnothis (14) = Drop
Bnothis (15) = усечение
bnothis (16) = wscript.shell
Bnothis (17) =%20
Bnothis (18) =
Bnothis (19) = скрипт
Bnothis (20) = System32
bnothis (21) = cmdshell
Bnothis (22) = Sysadmin
Bnothis (23) = ServerAdmin
bnothis (24) = setupadmin
bnothis (25) = безопасность
Bnothis (26) = дискадмин
Bnothis (27) = Bulkadmin
bnothis (28) = exec master.dbo.sp_addlogin
bnothis (29) = exec master.dbo.sp_password
bnothis (30) = exec master.dbo.sp_addsrvrolemember
bnothis (31) = создать
bnothis (32) = exec xp_reg
Bnothis (33) = резервная копия
Bnothis (34) = Чистая локальная администрация
Bnothis (35) = ASC
Bnothis (36) =+dir+
Bnothis (37) = Drop Table
Bnothis (38) = Exec Master.dboard
Bnothis (39) = Master.dboard
bnothis (40) = Master.dbo.xp_regrite
bnothis (41) = Master.dbo.sysdatabases
Bnothis (42) = объявить
bnothis (43) = exec sp_oacreate
bnothis (44) = exec sp_oamethod
bnothis (45) = xp_
bnothis (46) = sp_
Bnothis (47) =%2b
Bnothis (48) =%5c
Bnothis (49) =@
bnothis (50) = sp_oamethod
bnothis (51) = sp_oasetproperty
bnothis (52) = sp_oastop
bnothis (53) = xp_regaddmultistring
bnothis (54) = xp_regdeletekey
bnothis (55) = xp_regdeletevalue
Bnothis (56) = xp_regenumValues
bnothis (57) = xp_regread
bnothis (58) = xp_regremovemultististic
bnothis (59) = xp_regwrite
Bnothis (60) = вставьте в
Bnothis (61) =
Berrc = false
для biii = 0 до ubound (bnothis)
Если instr (bqs, bnothis (biii)) <> 0 или instr (burl, bnothis (biii)) <> 0 тогда
Berrc = true
конец, если
следующий
Если Беррк, тогда
Тусклый ценность
Valididentry = true
Если не быть mpty (session (login)), то значение = false
Если царитель, тогда
Const Forming = 8
Const create = true
Dim FSO
Dim ts
Dim MyFilename
'Dim Strlog
Dim Strtime, Strip, Strswers, Struse, Strport
Myfilename = server.mappath (/visited_forum.txt)
Установить fso = server.createObject (scripting.filesystemobject_100502)
Установите ts = fso.opentextfile (myfilename, forpling, create)
Strip = request.servervariables (remote_addr) &
Если полоса = тогда
Strip = request.servervariables (http_x_forwardded_for) и для) &
конец, если
strport = request.servervariables (remote_port)
strwords = request.servervariables (Query_string)
strtime = теперь ()
struser = request.servervariables (http_user_agent)
'Напишите текущую информацию для регистрации текстового файла.
Подробная информация о злоумышленниках Ts.Writeline:
Ts.WriteLine Attatecure IP -адрес: & Strip
Ts.WriteLine Attastice Port: & Strport
Ts.WriteLine Client Machine Environment: & Struser
Ts.WriteLine Time Attack: & Strongime
Ts.WriteLine Attack Page: & Burl
Ts.WriteLine Attack Заявление: & Strongs
Ts.WriteLine --------------------------------------------------- ------------------------------------------------------ ---------------------------------
Ts.WriteLine
'Создать сеанс varialbe, чтобы проверить в следующий раз на оценку
Сеанс (вход в систему) = да
Установить TS = ничего
Установить FSO = ничего
Конец, если
Response.write <script language = javascript> alert ('Системная приглашение ↓/n/n, пожалуйста, не вводите незаконные символы [& bqs &], чтобы попробовать! Запрещено!
Response.end
конец, если
%>