MSSQL木马修复,中木马后的处理方法

时间:2024-01-21 10:47:13 


declare @t varchar(255),@c varchar(255)
declare table_cursor cursor for select a.name,b.name
from sysobjects a,syscolumns b ,systypes c
where a.id=b.id and a.xtype='u' and c.name
in ('char', 'nchar', 'nvarchar', 'varchar','text','ntext'/* --这里如果你的text(ntext)类型没有超过8000(4000)长度,才可以使用*/)
declare @str varchar(500),@str2 varchar(500)
set @str='<script src=fasfdasfasf ></script> ' /*这里是你要替换的字符*/
set @str2='' /*替换后的字符*/
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)),'''+@str+''','''+ @str2 +''')')

fetch next from table_cursor
into @t,@c end close table_cursor deallocate table_cursor;

标签:MSSQL,木马修复
0
投稿

猜你喜欢

  • 多列复合索引的使用 绕过微软sql server的一个缺陷

    2012-08-21 10:37:36
  • 跟老齐学Python之永远强大的函数

    2021-12-30 19:41:08
  • 关于MySQL与Golan分布式事务经典的七种解决方案

    2024-01-15 00:49:33
  • Django中实现一个高性能计数器(Counter)实例

    2023-11-16 03:53:48
  • Python异常类型以及处理方法汇总

    2021-11-22 00:07:03
  • python数据结构之图的实现方法

    2022-12-29 04:59:38
  • 解决Windows环境下安装 mysql-8.0.11-winx64 遇到的问题

    2024-01-22 18:45:21
  • 用Python 爬取猫眼电影数据分析《无名之辈》

    2023-07-03 17:23:26
  • vue.js选中动态绑定的radio的指定项

    2024-04-27 16:13:25
  • python算法与数据结构之单链表的实现代码

    2022-09-30 14:35:39
  • MobaXterm入门使用教程

    2023-11-23 12:26:53
  • tensorflow多维张量计算实例

    2022-02-05 00:43:48
  • GC与JS内存泄露

    2010-09-25 19:01:00
  • Python使用邻接矩阵实现图及Dijkstra算法问题

    2022-09-30 01:22:00
  • python字符串,元组,列表,字典互转代码实例详解

    2022-03-01 22:51:55
  • go高并发时append方法偶现错误解决分析

    2024-02-13 20:30:57
  • 纯CSS制作的网页中的lightbox效果

    2007-11-06 18:59:00
  • Python中变量交换的例子

    2021-04-02 13:28:36
  • 解决tensorflow模型压缩的问题_踩坑无数,总算搞定

    2021-12-18 03:09:23
  • Python安装第三方库及常见问题处理方法汇总

    2022-11-22 04:40:51
  • asp之家 网络编程 m.aspxhome.com