知识大全 SQL Server加密存储过程的破解问题
Posted 视图
篇首语:一个人必须学习与自己不同类型的人相处,不然生活何其孤苦。本文由小常识网(cha138.com)小编为大家整理,主要介绍了知识大全 SQL Server加密存储过程的破解问题相关的知识,希望对你有一定的参考价值。
SQL Server加密存储过程的破解问题 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!
CREATE PROCEDURE sp_decrypt(@objectName varchar( )) AS begin set nocount on CSDN j copyright: V 破解字节不受限制 适用于SQLSERVER 存储过程 函数 视图 触发器 修正上一版视图触发器不能正确解密错误 发现有错 请E_MAIL begin tran declare @objectname varchar( ) @varbin varbinary( ) declare @sql nvarchar( ) @sql varchar( ) @sql nvarchar( ) @sql nvarchar( ) DECLARE @OrigSpText nvarchar( ) @OrigSpText nvarchar( ) @OrigSpText nvarchar( ) @resultsp nvarchar( ) declare @i int @status int @type varchar( ) @parentid int declare @colid int @n int @q int @j int @k int @encrypted int @number int select @type=xtype @parentid=parent_obj from sysobjects where id=object_id(@ObjectName) create table #temp(number int colid int ctext varbinary( ) encrypted int status int) insert #temp SELECT number colid ctext encrypted status FROM sysments WHERE id = object_id(@objectName) select @number=max(number) from #temp set @k= while @k<=@number begin if exists(select from sysments where id=object_id(@objectname) and number=@k) begin if @type= P set @sql =(case when @number> then ALTER PROCEDURE + @objectName + ; +rtrim(@k)+ WITH ENCRYPTION AS else ALTER PROCEDURE + @objectName+ WITH ENCRYPTION AS end) if @type= TR begin declare @parent_obj varchar( ) @tr_parent_xtype varchar( ) select @parent_obj=parent_obj from sysobjects where id=object_id(@objectName) select @tr_parent_xtype=xtype from sysobjects where id=@parent_obj if @tr_parent_xtype= V begin set @sql = ALTER TRIGGER +@objectname+ ON +OBJECT_NAME(@parentid)+ WITH ENCRYPTION INSTERD OF INSERT AS PRINT end else begin set @sql = ALTER TRIGGER +@objectname+ ON +OBJECT_NAME(@parentid)+ WITH ENCRYPTION FOR INSERT AS PRINT end end if @type= FN or @type= TF or @type= IF set @sql =(case @type when TF then ALTER FUNCTION + @objectName+ (@a char( )) returns @b table(a varchar( )) with encryption as begin insert @b select @a return end when FN then ALTER FUNCTION + @objectName+ (@a char( )) returns char( ) with encryption as begin return @a end when IF then ALTER FUNCTION + @objectName+ (@a char( )) returns table with encryption as return select @a as a end) if @type= V set @sql = ALTER VIEW +@objectname+ WITH ENCRYPTION AS SELECT as f set @q=len(@sql ) set @sql =@sql +REPLICATE( @q) select @sql =REPLICATE( ) set @sql = exec(@sql select @colid=max(colid) from #temp where number=@k set @n= while @n<=CEILING( *(@colid )/ ) and len(@sQL )<= begin set @sql =@sql + +@ set @n=@n+ end set @sql =@sql + ) exec sp_executesql @sql N @Sql nvarchar( ) @ varchar( ) @sql =@sql @=@sql end set @k=@k+ end set @k= while @k<=@number begin if exists(select from sysments where id=object_id(@objectname) and number=@k) begin select @colid=max(colid) from #temp where number=@k set @n= while @n<=@colid begin select @OrigSpText =ctext @encrypted=encrypted @status=status FROM #temp WHERE colid=@n and number=@k SET @OrigSpText =(SELECT ctext FROM sysments WHERE id=object_id(@objectName) and colid=@n and number=@k) if @n= begin if @type= P SET @OrigSpText =(case when @number> then CREATE PROCEDURE + @objectName + ; +rtrim(@k)+ WITH ENCRYPTION AS else CREATE PROCEDURE + @objectName + WITH ENCRYPTION AS end) if @type= FN or @type= TF or @type= IF SET @OrigSpText =(case @type when TF then CREATE FUNCTION + @objectName+ (@a char( )) returns @b table(a varchar( )) with encryption as begin insert @b select @a return end when FN then CREATE FUNCTION + @objectName+ (@a char( )) returns char( ) with encryption as begin return @a end when IF then CREATE FUNCTION + @objectName+ (@a char( )) returns table with encryption as return select @a as a end) if @type= TR begin if @tr_parent_xtype= V begin set @OrigSpText = CREATE TRIGGER +@objectname+ ON +OBJECT_NAME(@parentid)+ WITH ENCRYPTION INSTEAD OF INSERT AS PRINT end else begin set @OrigSpText = CREATE TRIGGER +@objectname+ ON +OBJECT_NAME(@parentid)+ WITH ENCRYPTION FOR INSERT AS PRINT end end if @type= V set @OrigSpText = CREATE VIEW +@objectname+ WITH ENCRYPTION AS SELECT as f set @q= len(@OrigSpText ) set @OrigSpText =@OrigSpText +REPLICATE( @q) end else begin SET @OrigSpText =REPLICATE( ) end SET @i= SET @resultsp = replicate(N A (datalength(@OrigSpText ) / )) WHILE @i<=datalength(@OrigSpText )/ BEGIN SET @resultsp = stuff(@resultsp @i NCHAR(UNICODE(substring(@OrigSpText @i )) ^ (UNICODE(substring(@OrigSpText @i )) ^ UNICODE(substring(@OrigSpText @i ))))) SET @i=@i+ END set @varbin=cast(@OrigSpText as varbinary( )) set @resultsp=(case when @encrypted= then @resultsp else convert(nvarchar( ) case when @status& = then unpress(@varbin) else @varbin end) end) print @resultsp set @n=@n+ end end set @k=@k+ end drop table #temp rollback tran end cha138/Article/program/SQLServer/201311/22022相关参考
SQLServer存储过程编程经验技巧 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! MS SQ
知识大全 Delphi与SQL Server存储过程编程详解
Delphi与SQLServer存储过程编程详解 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!
SQLServer存储过程编写和优化措施[2] 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!&nb
SQLServer存储过程编写和优化措施[1] 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!&nb
实例讲解JSP调用SQLServer的存储过程 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! J
知识大全 .Net下调用SQL Server2000中存储过程
.Net下调用SQLServer2000中存储过程 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!
JSP中调用SQLServer存储过程实例讲解 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 下
SQLServer千万数量级分页存储过程 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 随着信息
用ASP调用SQLServer的视图和存储过程 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!
VS和SQLServer对存储过程进行版本排序 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 概