最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
找到了,解密SQL2000的存储过程
时间:2022-06-30 10:48:18 编辑:袖梨 来源:一聚教程网
创建下面这个存储过程
然后调用
exec sp_decrypt @objectName
(@objectName就是加密过的存储过程名)
暴露无遗!
此程序不破坏原有存储过程!
呵呵呵,真好玩!
create PROCEDURE sp_decrypt (@objectName varchar(50))
AS
begin
begin transaction --add by playyuer
declare @objectname1 varchar(100)
declare @sql1 nvarchar(4000),@sql2 nvarchar(4000),@sql3 nvarchar(4000),@sql4 nvarchar(4000),@sql5 nvarchar(4000),@sql6 nvarchar(4000),@sql7 nvarchar(4000),@sql8 nvarchar(4000),@sql9 nvarchar(4000),@sql10 nvarchar(4000)
DECLARE @OrigSpText1 nvarchar(4000), @OrigSpText2 nvarchar(4000) , @OrigSpText3 nvarchar(4000), @resultsp nvarchar(4000)
declare @i int , @t bigint
declare @m int,@n int,@q int
set @m=(SELECT max(colid) FROM syscomments WHERE id = object_id(@objectName))
set @n=1
--get encrypted data
create table #temp(colid int,ctext varbinary(8000))
insert #temp SELECT colid,ctext FROM syscomments WHERE id = object_id(@objectName)
set @sql1='ALTER PROCEDURE '+ @objectName +' WITH ENCRYPTION AS '
--set @sql1='ALTER PROCEDURE '+ @objectName +' WITH ENCRYPTION AS '
set @q=len(@sql1)
set @sql1=@sql1+REPLICATE('-',4000-@q)
select @sql2=REPLICATE('-',4000),@sql3=REPLICATE('-',4000),@sql4=REPLICATE('-',4000),@sql5=REPLICATE('-',4000),@sql6=REPLICATE('-',4000),@sql7=REPLICATE('-',4000),@sql8=REPLICATE('-',4000),@sql9=REPLICATE('-',4000),@sql10=REPLICATE('-',4000)
exec(@sql1+@sql2+@sql3+@sql4+@sql5+@sql6+@sql7+@sql8+@sql9+@sql10)
while @n<=@m
begin
SET @OrigSpText1=(SELECT ctext FROM #temp WHERE colid=@n)
set @objectname1=@objectName+'_t'
SET @OrigSpText3=(SELECT ctext FROM syscomments WHERE id=object_id(@objectName) and colid=@n)
if @n=1
然后调用
exec sp_decrypt @objectName
(@objectName就是加密过的存储过程名)
暴露无遗!
此程序不破坏原有存储过程!
呵呵呵,真好玩!
create PROCEDURE sp_decrypt (@objectName varchar(50))
AS
begin
begin transaction --add by playyuer
declare @objectname1 varchar(100)
declare @sql1 nvarchar(4000),@sql2 nvarchar(4000),@sql3 nvarchar(4000),@sql4 nvarchar(4000),@sql5 nvarchar(4000),@sql6 nvarchar(4000),@sql7 nvarchar(4000),@sql8 nvarchar(4000),@sql9 nvarchar(4000),@sql10 nvarchar(4000)
DECLARE @OrigSpText1 nvarchar(4000), @OrigSpText2 nvarchar(4000) , @OrigSpText3 nvarchar(4000), @resultsp nvarchar(4000)
declare @i int , @t bigint
declare @m int,@n int,@q int
set @m=(SELECT max(colid) FROM syscomments WHERE id = object_id(@objectName))
set @n=1
--get encrypted data
create table #temp(colid int,ctext varbinary(8000))
insert #temp SELECT colid,ctext FROM syscomments WHERE id = object_id(@objectName)
set @sql1='ALTER PROCEDURE '+ @objectName +' WITH ENCRYPTION AS '
--set @sql1='ALTER PROCEDURE '+ @objectName +' WITH ENCRYPTION AS '
set @q=len(@sql1)
set @sql1=@sql1+REPLICATE('-',4000-@q)
select @sql2=REPLICATE('-',4000),@sql3=REPLICATE('-',4000),@sql4=REPLICATE('-',4000),@sql5=REPLICATE('-',4000),@sql6=REPLICATE('-',4000),@sql7=REPLICATE('-',4000),@sql8=REPLICATE('-',4000),@sql9=REPLICATE('-',4000),@sql10=REPLICATE('-',4000)
exec(@sql1+@sql2+@sql3+@sql4+@sql5+@sql6+@sql7+@sql8+@sql9+@sql10)
while @n<=@m
begin
SET @OrigSpText1=(SELECT ctext FROM #temp WHERE colid=@n)
set @objectname1=@objectName+'_t'
SET @OrigSpText3=(SELECT ctext FROM syscomments WHERE id=object_id(@objectName) and colid=@n)
if @n=1
相关文章
- 人们熟悉的寄居蟹属于以下哪种分类 神奇海洋11月21日答案 11-21
- 第五人格11.22共研服有什么更新 11月22日共研服更新内容介绍 11-21
- 原神恰斯卡怎么培养 11-21
- 无期迷途四星装束是谁 11-21
- 王者荣耀帝丹高中校服怎么获得 11-21
- 光遇姆明季后续版本怎么玩 11-21