渗透
oma
全部博文(181)
phpcms(2)
linux(4)
2011年(40)
2010年(17)
2009年(87)
2008年(37)
a7897897
HazeC
haille
呆瓜路
coldgin
小房_1
qscf_520
yejing33
luwenju
分类: 网络与安全
2009-02-27 13:27:41
SELECT a.name AS columnname,object_name(a.id)AS tablename INTO t FROM syscolumns a, sysobjects b, systypes c WHERE a.id=b.id AND a.xtype=c.xtype AND b.xtype='u' AND c.name IN('varchar','nvarchar','char','nchar','text','ntext') AND object_name(a.id)<>'t' go CREATE FUNCTION udf_genSQL(@tableName varchar(1000),@keyword varchar(1000)) returns varchar(8000) AS begin declare @sql varchar(8000) SET @sql='select * from '+@tableName +' where 1=1 ' SELECT @sql=@sql+' or '+ columnname +' like ''%'+@keyword+'%''' FROM t WHERE tablename=@tablename RETURN @sql end go SELECT dbo.udf_genSQL(tableName,'a') FROM t GROUP BY tablename DROP TABLE t DROP FUNCTION dbo.udf_genSQL
上一篇:MSSQL数据库被插入木马批量删除sql语句
下一篇:利用注册表读hash
登录 注册