<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%><%server.ScriptTimeout = 1000000'xtype=99 ntext 与text类型相似,不同的是,ntext类型采用unicode标准字符集。'xtype=35 text 用于存储大量文本数据。'xtype=231 nvarchar 用来定义可变长度的二进制数据,最大长度为4000个字符。'xtype=167 varchar 存储最常可以达到8000个字符的变长的字符数据str = "''" '加在文本类型字段后的木马代码sql = "SELECT a.name as t_name,b.name as c_name, b.xtype FROM sysobjects a,syscolumns b WHERE a.id=b.id AND a.xtype='u' AND (b.xtype=99 OR b.xtype=35 OR b.xtype=231 OR b.xtype=167)"set rs = conn.execute(sql)while Not rs.eoft_name = rs("t_name") '表名c_name = rs("c_name") '字段名xtype = rs("xtype") '字段类型If (xtype = 99 Or xtype = 35) thenconn.execute("update [" + t_name + "] set [" + c_name + "]=replace(cast([" + c_name + "] as varchar(8000)), " + str + ", '')")Elseconn.execute("update [" + t_name + "] set [" + c_name + "]=replace([" + c_name + "], " + str + ", '')")End Ifrs.movenextwendresponse.Write("已经初步清理了挂马数据,请重新刷新页面试试看!")%>














发表评论