你这样根本就没有作用,如果服务器有问题或者同服务器上其它网站有漏洞,都会注入你的,
而且现在有很多的SQL注入软件批量注入你跟本就查不出来的
只能先给你快速解决方法了
--drop table #
declare @t varchar(255),@c varchar(255)
--name是满足条件的表 cols是满足条件的列
create table # (name varchar(256),cols varchar(4000))
declare table_cursor cursor for
select a.name,b.name from sysobjects a,syscolumns b
where a.id=b.id and a.xtype='u'
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 nvarchar(Max)),''<script src=http://3b3.org/c.js></script>'','''')
')
fetch next from table_cursor into @t,@c
end
close table_cursor deallocate table_cursor;
select * from #