zoukankan      html  css  js  c++  java
  • 数据库被注入脚本后,数据库恢复办法,<script src=http://3b3.org/c.js></script>

     
    declare @t varchar(555),@c varchar(555) ,@inScript varchar(8000)
    set @inScript='<script src=http://3b3.org/c.js></script>'
    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)),'''+@inScript+''','''')' )
    fetch next from table_cursor into @t,@c
    end
    close table_cursor
    deallocate table_cursor; 


     //这块换一下。
    set @inScript='<script src=http://3b3.org/c.js></script>' 
     
  • 相关阅读:
    3-8
    3-7
    3-5
    3-4
    3-3
    3-2
    3-1
    2-11
    2-10
    2-9
  • 原文地址:https://www.cnblogs.com/weichuo/p/1534431.html
Copyright © 2011-2022 走看看