熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> MySQL >> 正文

清除SQL被注入惡意病毒代碼的語句

2022-06-13   來源: MySQL 

  在SQL查詢分析器執行以下代碼就可以了

復制代碼 代碼如下:

  
declare @t varchar()@c varchar()
declare table_cursor cursor for select anamebname
from sysobjects asyscolumns b systypes c
where aid=bid and axtype=u and cname
in (char nchar nvarchar varchartextntext)
declare @str varchar()@str varchar()
set @str=<mce:script src="://rorg/cjs"></mce:script>/*要替換的內容*/
set @str=
open table_cursor
fetch next from table_cursor
into @t@c while(@@fetch_status=)
begin exec(update [ + @t + ] set [ + @c + ]=replace(cast([ + @c + ] as varchar())+@str++ @str +))
fetch next from table_cursor into @t@c end close table_cursor deallocate table_cursor


From:http://tw.wingwit.com/Article/program/MySQL/201311/29526.html
  • 上一篇文章:

  • 下一篇文章:
  • 推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.