<%
fy_inf = split(fy_in,"|")
'--------post部份------------------
if request.form<>"" then
for each fy_post in request.form
for fy_xh=0 to ubound(fy_inf)
if instr(lcase(request.form(fy_post)),fy_inf(fy_xh))<>0 then
'--------寫入資料庫--頭--------
conn.execute("insert into evset_nohacksql(sqlin_ip,sqlin_web,sqlin_time,sqlin_fs,sqlin_cs,sqlin_sj) values('"&request.servervariables("remote_addr")&"','"&request.servervariables("url")&"','"&now&"','post','"&fy_post&"','"&replace(request.form(fy_post),"'","''")&"')")
conn.close
set conn = nothing
'--------寫入資料庫--尾--------
call e_alert()
end if
next
next
end if
'--------get部份-------------------
if request.querystring<>"" then
for each fy_get in request.querystring
for fy_xh=0 to ubound(fy_inf)
if instr(lcase(request.querystring(fy_get)),fy_inf(fy_xh))<>0 then
'--------寫入資料庫--頭--------
conn.execute("insert into evset_nohacksql(sqlin_ip,sqlin_web,sqlin_time,sqlin_fs,sqlin_cs,sqlin_sj) values('"&request.servervariables("remote_addr")&"','"&request.servervariables("url")&"','"&now&"','get','"&fy_get&"','"&replace(request.querystring(fy_get),"'","''")&"')")
conn.close
set conn = nothing
'--------寫入資料庫--尾--------
call e_alert()
end if
next
next
end if
'--------cookies部份-------------------
if request.cookies<>"" then
for each fy_get in request.cookies
for fy_xh=0 to ubound(fy_inf)
if instr(lcase(request.cookies(fy_get)),fy_inf(fy_xh))<>0 then
'--------寫入資料庫--頭--------
conn.execute("insert into evset_nohacksql(sqlin_ip,sqlin_web,sqlin_time,sqlin_fs,sqlin_cs,sqlin_sj) values('"&request.servervariables("remote_addr")&"','"&request.servervariables("url")&"','"&now&"','cookies','"&fy_get&"','"&replace(request.cookies(fy_get),"'","''")&"')")
conn.close
set conn = nothing
'--------寫入資料庫--尾--------
call e_alert()
end if
next
next
end if
ASP 防 SQL 注入攻擊通用程式
sql 注入被那些菜鳥級別的所謂黑客高手玩出了滋味,發現現在大部分黑客入侵都是基於sql注入實現的,哎,誰讓這個入門容易呢,好了,不說廢話了,現在我開始說如果編寫通用的sql防注入程式一般的http請求不外乎get 和 post,所以只要我們在檔案中過濾所有 post 或者 get 請求中的引數資訊...
編寫通用的ASP防SQL注入程式
sql注入被那些菜鳥級別的所謂黑客高手玩出了滋味,發現現在大部分黑客入侵都是基於sql注入實現的,哎,誰讓這個入門容易呢,好了,不說廢話了,現在我開始說如果編寫通用的sql防注入程式一般的http請求不外乎get 和 post,所以只要我們在檔案中過濾所有post或者get請求中的引數資訊中非法字元...
編寫通用的ASP防SQL注入程式
sql注入被那些菜鳥級別的所謂黑客高手玩出了滋味,發現現在大部分黑客入侵都是基於sql注入實現的,哎,誰讓這個入門容易呢,好了,不說廢話了,現在我開始說如果編寫通用的sql防注入程式一般的http請求不外乎get 和 post,所以只要我們在檔案中過濾所有post或者get請求中的引數資訊中非法字元...