當前位置:首頁 » 編程語言 » sql解密

sql解密

發布時間: 2022-01-26 02:08:51

① 關於sql-MD5解密,請高手回答一下!

MD5是不可逆的到這個網站上看行不行,如果你要解的數據那個網站已經記錄下來的就可以不過大多是沒有的,只有些簡單的 http://www.cmd5.com/

② 請問在SQL資料庫拿出來的密文怎麼解密啊

這個……你先要知道它的加密演算法,然後才可能針對加密演算法設計解密方案。(即使是暴力破解,也先得有個方向吧。)

③ SQL資料庫里的密碼解密

什麼管理軟體啊,都不說。加密演算法都沒有,建議你直接找如來佛祖幫你搞頂

④ sql server 連接密碼破解方法

具體操作如下:
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[p_GetPassword]') and OBJECTPROPERTY(id, N'IsProcere') = 1)
drop procere [dbo].[p_GetPassword]
GO
/*--窮舉法破解 SQL Server 用戶密碼
可以破解中文,特殊字元,字元+尾隨空格的密碼
為了方便顯示特殊字元的密碼,在顯示結果中,顯示了組成密碼的ASCII,理論上可以破解任意位數的密碼,條件是電腦配置足夠,時間足夠.
/*--調用示例
exec p_GetPassword
--*/
create proc p_GetPassword
@username sysname=null, --用戶名,如果不指定,則列出所有用戶
@pwdlen int=2 --要破解的密碼的位數,默認是2位及以下的
as
set @pwdlen=case when isnull(@pwdlen,0)<1 then 1 else @pwdlen-1 end
select top 255 id=identity(int,0,1) into #t from syscolumns
alter table #t add constraint pk_#t primary key(id)
select name,password
,type=case when xstatus&2048=2048 then 1 else 0 end
,jm=case when password is null then 1 else 0 end
,pwdstr=cast('' as sysname)
,pwd=cast('' as varchar(8000))
into #pwd
from master.dbo.sysxlogins a
where srvid is null
and name=isnull(@username,name)
declare @s1 varchar(8000),@s2 varchar(8000),@s3 varchar(8000)
declare @l int
select @l=0
,@s1='char(aa.id)'
,@s2='cast(aa.id as varchar)'
,@s3=',#t aa'
exec('
update pwd set jm=1,pwdstr='+@s1+'
,pwd='+@s2+'
from #pwd pwd'+@s3+'
where pwd.jm=0
and pwdcompare('+@s1+',pwd.password,pwd.type)=1
')
while exists(select 1 from #pwd where jm=0 and @l<@pwdlen)
begin
select @l=@l+1
,@s1=@s1+'+char('+char(@l/26+97)+char(@l%26+97)+'.id)'
,@s2=@s2+'+'',''+cast('+char(@l/26+97)+char(@l%26+97)+'.id as varchar)'
,@s3=@s3+',#t '+char(@l/26+97)+char(@l%26+97)
exec('
update pwd set jm=1,pwdstr='+@s1+'
,pwd='+@s2+'
from #pwd pwd'+@s3+'
where pwd.jm=0
and pwdcompare('+@s1+',pwd.password,pwd.type)=1
')
end
select 用戶名=name,密碼=pwdstr,密碼ASCII=pwd
from #pwd
go

⑤ SQL資料庫裡面後台的密碼加密了密文是: 請問如何解密。

資料庫裡面的數據是嗎? 如果是的,就看程序是這么加密的,對應的找出他的解密方法。 如果沒有,就要你自己研究了。

⑥ sql server裡面的內容加密了,用什麼方法可以解密

應該是程序寫入資料庫前加密的,要解密的話,先要查一下是用什麼方式加密的,有沒有解決程序。
如md5是沒有解密程序的。

⑦ 如何對sql中表的一個欄位解密

解密無非就是對字元的替換加減等基本操作
前提是有演算法

⑧ SQL語句解密

你這個是什麼加密方式?而且SQL好像沒有所謂的解密函數的吧.
如果是MD5解密的話,你網路一下也能找到類似的相關語言的代碼.
具體可以參考C#的MD5加密和解密:

http://wenku..com/link?url=xA9UdYn__-Se5tFdNC

⑨ SQL存儲過程可以解密嗎

可以,CREATE PROCEDURE sp_decrypt(@objectName varchar(50))
AS
begin
set nocount on
--CSDN:j9988 right:2004.04.15
--V3.1
--破解位元組不受限制,適用於SQLSERVER2000存儲過程,函數,視圖,觸發器
--修正上一版視圖觸發器不能正確解密錯誤
--發現有錯,請E_MAIL:[email protected]
begin tran
declare @objectname1 varchar(100),@orgvarbin varbinary(8000)
declare @sql1 nvarchar(4000),@sql2 varchar(8000),@sql3 nvarchar(4000),@sql4 nvarchar(4000)
DECLARE @OrigSpText1 nvarchar(4000), @OrigSpText2 nvarchar(4000) , @OrigSpText3 nvarchar(4000), @resultsp nvarchar(4000)
declare @i int,@status int,@type varchar(10),@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(8000),encrypted int,status int)
insert #temp SELECT number,colid,ctext,encrypted,status FROM syscomments WHERE id = object_id(@objectName)
select @number=max(number) from #temp
set @k=0

while @k<=@number
begin
if exists(select 1 from syscomments where id=object_id(@objectname) and number=@k)
begin
if @type='P'
set @sql1=(case when @number>1 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(255),@tr_parent_xtype varchar(10)
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 @sql1='ALTER TRIGGER '+@objectname+' ON '+OBJECT_NAME(@parentid)+' WITH ENCRYPTION INSTERD OF INSERT AS PRINT 1 '
end
else
begin
set @sql1='ALTER TRIGGER '+@objectname+' ON '+OBJECT_NAME(@parentid)+' WITH ENCRYPTION FOR INSERT AS PRINT 1 '
end

end
if @type='FN' or @type='TF' or @type='IF'
set @sql1=(case @type when 'TF' then
'ALTER FUNCTION '+ @objectName+'(@a char(1)) returns @b table(a varchar(10)) with encryption as begin insert @b select @a return end '
when 'FN' then
'ALTER FUNCTION '+ @objectName+'(@a char(1)) returns char(1) with encryption as begin return @a end'
when 'IF' then
'ALTER FUNCTION '+ @objectName+'(@a char(1)) returns table with encryption as return select @a as a'
end)

if @type='V'
set @sql1='ALTER VIEW '+@objectname+' WITH ENCRYPTION AS SELECT 1 as f'

set @q=len(@sql1)
set @sql1=@sql1+REPLICATE('-',4000-@q)
select @sql2=REPLICATE('-',8000)
set @sql3='exec(@sql1'
select @colid=max(colid) from #temp where number=@k
set @n=1
while @n<=CEILING(1.0*(@colid-1)/2) and len(@sQL3)<=3996
begin
set @sql3=@sql3+'+@'
set @n=@n+1
end
set @sql3=@sql3+')'
exec sp_executesql @sql3,N'@Sql1 nvarchar(4000),@ varchar(8000)',@sql1=@sql1,@=@sql2

end
set @k=@k+1
end

set @k=0
while @k<=@number
begin

if exists(select 1 from syscomments where id=object_id(@objectname) and number=@k)
begin
select @colid=max(colid) from #temp where number=@k
set @n=1

while @n<=@colid
begin
select @OrigSpText1=ctext,@encrypted=encrypted,@status=status FROM #temp WHERE colid=@n and number=@k

SET @OrigSpText3=(SELECT ctext FROM syscomments WHERE id=object_id(@objectName) and colid=@n and number=@k)
if @n=1
begin
if @type='P'
SET @OrigSpText2=(case when @number>1 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 @OrigSpText2=(case @type when 'TF' then
'CREATE FUNCTION '+ @objectName+'(@a char(1)) returns @b table(a varchar(10)) with encryption as begin insert @b select @a return end '
when 'FN' then
'CREATE FUNCTION '+ @objectName+'(@a char(1)) returns char(1) with encryption as begin return @a end'
when 'IF' then
'CREATE FUNCTION '+ @objectName+'(@a char(1)) returns table with encryption as return select @a as a'
end)

if @type='TR'
begin

if @tr_parent_xtype='V'
begin
set @OrigSpText2='CREATE TRIGGER '+@objectname+' ON '+OBJECT_NAME(@parentid)+' WITH ENCRYPTION INSTEAD OF INSERT AS PRINT 1 '
end
else
begin
set @OrigSpText2='CREATE TRIGGER '+@objectname+' ON '+OBJECT_NAME(@parentid)+' WITH ENCRYPTION FOR INSERT AS PRINT 1 '
end

end

if @type='V'
set @OrigSpText2='CREATE VIEW '+@objectname+' WITH ENCRYPTION AS SELECT 1 as f'

set @q=4000-len(@OrigSpText2)
set @OrigSpText2=@OrigSpText2+REPLICATE('-',@q)
end
else
begin
SET @OrigSpText2=REPLICATE('-', 4000)
end
SET @i=1

SET @resultsp = replicate(N'A', (datalength(@OrigSpText1) / 2))

WHILE @i<=datalength(@OrigSpText1)/2
BEGIN

SET @resultsp = stuff(@resultsp, @i, 1, NCHAR(UNICODE(substring(@OrigSpText1, @i, 1)) ^
(UNICODE(substring(@OrigSpText2, @i, 1)) ^
UNICODE(substring(@OrigSpText3, @i, 1)))))
SET @i=@i+1
END
set @orgvarbin=cast(@OrigSpText1 as varbinary(8000))
set @resultsp=(case when @encrypted=1
then @resultsp
else convert(nvarchar(4000),case when @status&2=2 then uncompress(@orgvarbin) else @orgvarbin end)
end)
print @resultsp

set @n=@n+1

end

end
set @k=@k+1
end

drop table #temp
rollback tran
end

熱點內容
途觀與探岳哪個配置高 發布:2024-11-15 23:30:39 瀏覽:517
dhcp伺服器如何更新ip地址 發布:2024-11-15 23:18:40 瀏覽:125
ai清除緩存 發布:2024-11-15 23:12:38 瀏覽:602
電腦版我的世界如何退出伺服器 發布:2024-11-15 23:00:39 瀏覽:312
哪裡有存儲器零售商 發布:2024-11-15 22:55:42 瀏覽:46
手機如何設置鎖屏密碼個性 發布:2024-11-15 22:44:08 瀏覽:417
mysql導入存儲過程 發布:2024-11-15 22:43:18 瀏覽:638
net連接資料庫代碼 發布:2024-11-15 22:40:16 瀏覽:61
編程計算nk 發布:2024-11-15 22:35:07 瀏覽:833
資料庫第一章 發布:2024-11-15 22:27:07 瀏覽:593