Encryption of stored procedures and stored functions: With Encryption
<! -- [If! Supportlinebreaknewline] -->
<! -- [Endif] -->
Create procedure DBO. sp_xml_main
@ Table_name nvarchar (260) = '',
@ Dirname nvarchar (20) =''
With Encryption
As
Begin
....................
End
Go
Decryption of stored procedures and stored Functions
If exists (select * From DBO. sysobjects where id = object_id (n' [DBO]. [sp_decrypt] ') and objectproperty (ID, n' isprocedure') = 1)
Drop procedure [DBO]. [sp_decrypt]
Go
/* -- Crack functions, processes, triggers, and views. Limited to sqlserver2000
-- Author: j9988 -- All Rights Reserved */
/* -- Call example
-- Decrypts a specified Stored Procedure
Exec sp_decrypt 'encrypt P _ Test'
-- Decrypt all stored procedures
Declare TB cursor
Select name from sysobjects where xtype = 'p' and status> 0 and name <> 'SP _ decrypt'
Declare @ name sysname
Open TB
Fetch next from TB into @ name
While @ fetch_status = 0
Begin
Print '/* ------- stored procedure [' + @ name + '] ----------- */'
Exec sp_decrypt @ name
Fetch next from TB into @ name
End
Close TB
Deallocate TB
--*/
If exists (select * From DBO. sysobjects where id = object_id (n' [DBO]. [sp_decrypt] ') and objectproperty (ID, n' isprocedure') = 1)
Drop procedure [DBO]. [sp_decrypt]
Go
Create procedure sp_decrypt (@ objectname varchar (50 ))
As
Begin
Set nocount on
-- Unlimitedly cracked bytes, applicable to sqlserver2000 stored procedures, functions, views, and triggers