March 23, 2004 at 9:41 pm
Hi,
Is there anyway to get the text in an encrypted stored procedures?
March 24, 2004 at 6:10 am
Yes, there are tools on the internet and some simple code at Planet-Source-Code to do this sorrt of thing. Note however some do it by changing the SP to garbage and comparing offsets so make sure you backup first and make sure you do not violate any license agreements you have, this should only be used strictly for recover of lost code for yourself or group.
March 24, 2004 at 6:20 am
But in most cases you must have sysadmin right to use such app. There are also stored procedures to decrypt encrypted procedures.
March 24, 2004 at 11:16 pm
I found this from Planet Source Code. CHeck you adequate rights to use it.
CREATE PROCEDURE DECRYPTSP2K
@objName varchar(50)
AS
DECLARE @a nvarchar(4000), @b-2 nvarchar(4000), @C nvarchar(4000), @d nvarchar(4000), @i int, @t bigint
--get encrypted data
SET @a=(SELECT ctext FROM syscomments WHERE id = object_id(@objName))
SET @b-2='ALTER PROCEDURE '+ @objName +' WITH ENCRYPTION AS '+REPLICATE('-', 4000-62)
EXECUTE (@b)
--get encrypted bogus SP
SET @C=(SELECT ctext FROM syscomments WHERE id = object_id(@objName))
SET @b-2='CREATE PROCEDURE '+ @objName +' WITH ENCRYPTION AS '+REPLICATE('-', 4000-62)
--start counter
SET @i=1
--fill temporary variable
SET @d = replicate(N'A', (datalength(@a) / 2))
--loop
WHILE @i0
SET @d=REPLACE(UPPER(@d),'WITH ENCRYPTION', '')
--replace SP
execute( @d)
GO
March 25, 2004 at 12:04 am
I use dSQLSRVD
March 25, 2004 at 10:14 pm
Hi,
As said by Antares686 i found number of scripts and tools for decryption in planet-source-code site. Thanks for eswar for providing 'DECRYPTSP2K' it is working really fine.
I tried dSQLSRVD but it is giving some ADO Recordset error.
Thanks for your responses.
May 12, 2004 at 5:50 am
Might try giving this product a shot. http://decryptor.orbitaltechnologies.org
September 16, 2005 at 2:28 pm
Thank you very much for DECRYPTSP2K!
September 17, 2005 at 5:51 am
These Decrypting tools are successfull in many times. Dont You think then SQL
not that much secured. Suppose if some body wants to hide the logical steps then they usually encrypt the stored procedure.
With decryption they can always come to know what is there in the procedure
Is there any way to avoid this
June 9, 2006 at 1:07 am
You might be noticed that above does not work for SQL Server 2005.
A tool for SQL Server 2005: http://www.elitude.net
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply