Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. decryption

decryption

Scheduled Pinned Locked Moved Database
tutorialdatabasesql-serversysadmin
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 8664010
    wrote on last edited by
    #1

    hi experts, can anyone guide me ,how to decrypt the encrypted user defined function in sql server 2008

    R L P 3 Replies Last reply
    0
    • U User 8664010

      hi experts, can anyone guide me ,how to decrypt the encrypted user defined function in sql server 2008

      R Offline
      R Offline
      R Giskard Reventlov
      wrote on last edited by
      #2

      Your question makes no sense: are you saying that the functions, itself, is encrypted and you need to decrypt it or the output from the function? In either case, speak to the original author of the function: there is no earthly way that anyone here could possibly guess at the encryption used.

      "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. Those who seek perfection will only find imperfection nils illegitimus carborundum me, me, me me, in pictures

      1 Reply Last reply
      0
      • U User 8664010

        hi experts, can anyone guide me ,how to decrypt the encrypted user defined function in sql server 2008

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Member 8701813 wrote:

        can anyone guide me ,how to decrypt the encrypted user defined function in sql server 2008

        http://sqljunkieshare.com/2012/03/07/decrypting-encrypted-stored-procedures-views-functions-in-sql-server-20052008-r2/[^] Now, whose database are you trying to hack?

        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

        U 1 Reply Last reply
        0
        • U User 8664010

          hi experts, can anyone guide me ,how to decrypt the encrypted user defined function in sql server 2008

          P Offline
          P Offline
          poongunrans
          wrote on last edited by
          #4

          Encryption / Decryption set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO CREATE FUNCTION [dbo].[fn_Cryptography] ( @String varchar(50) ) /* Author: POONGUNRAN S Create date: 29-May-2013 Description: Encrypt / Decrypt Parameters : @String - String to be encrypted / decrypted */ RETURNS varchar(50) AS BEGIN IF @String = '' RETURN '' SELECT @String = LTRIM(RTRIM(@String)) DECLARE @Key varchar(50), @Crypt varchar(50), @Len smallint, @n smallint SELECT @n = 235 SELECT @Key = '' WHILE @n <= 255 BEGIN SELECT @Key = @Key + CHAR(@n) SELECT @n = @n + 1 END SELECT @Crypt = '' SELECT @Len = LEN(@String) SELECT @n = 1 WHILE @n <= @Len BEGIN SELECT @Crypt = @Crypt + CHAR(ASCII(SUBSTRING(@String,@n,1)) ^ ASCII(SUBSTRING(@Key,@n,1))) SELECT @n = @n + 1 END RETURN @Crypt END Input put: Select dbo.fn_Cryptography('test') o/p : Ÿ‰žš select dbo.fn_Cryptography('Ÿ‰žš') o/p : test

          1 Reply Last reply
          0
          • L Lost User

            Member 8701813 wrote:

            can anyone guide me ,how to decrypt the encrypted user defined function in sql server 2008

            http://sqljunkieshare.com/2012/03/07/decrypting-encrypted-stored-procedures-views-functions-in-sql-server-20052008-r2/[^] Now, whose database are you trying to hack?

            Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

            U Offline
            U Offline
            User 8664010
            wrote on last edited by
            #5

            hi, thanks for replying...by d way i am not hacking anyone's db...i tried my function...i succeeded in encrypting but couldn't succeed in decrypting it....ie i asked in this forum...once again thanks for replying...

            L 1 Reply Last reply
            0
            • U User 8664010

              hi, thanks for replying...by d way i am not hacking anyone's db...i tried my function...i succeeded in encrypting but couldn't succeed in decrypting it....ie i asked in this forum...once again thanks for replying...

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Member 8701813 wrote:

              by d way i am not hacking anyone's db

              I do not see any other reason to decrypt a procedure.

              Member 8701813 wrote:

              i succeeded in encrypting but couldn't succeed in decrypting it

              There are some tools and some sprocs that can decrypt an sproc/function on Sql2005. None of those will work on Sql2010, and that change "might" have been introduced in Sql2k8R2. In that case, you're out of luck.

              Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups