Results 1 to 5 of 5

Thread: Decrypt a string

  1. #1

    Thread Starter
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    Decrypt a string

    Heylo

    I need to decrypt this

    aHR0cDovL21lbHRkb3duc29mdHdhcmUuY28udWsvbmV3cy5waHA=


    No i know what it is meant to read, but i would like to know how to encryt a URL, using the exact method they used there.

    Its means to read http://meltdownsoftware.co.uk/news.php



    Coolio

  2. #2
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Re: Decrypt a string

    Are you sure it has been encrypted? If it has then yes you can decrypt it but if it is a Hash then you cant. You can only use the same Hashing method and compare the two outcomes.

    Either way you really need to know the specific method used.

  3. #3
    Fanatic Member space_monkey's Avatar
    Join Date
    Apr 2005
    Location
    神と歩くこと
    Posts
    573

    Re: Decrypt a string

    Using NF-tools extension for firefox you can see that it is Base64 encoded.
    Using VB6 or VB.net 2008 with .net 3.5
    "Life... death... either way I'll be confined to a small cubicle!" - Hermes Conrad

  4. #4

  5. #5
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Decrypt a string

    Its called base 64 encoding. It is NOT encryption. Its purpose it to make binary data safe for transfer as plain text.

    It uses a base 64 number system. Base 10 is the decimal, base 16 is hexadecimal and base 7 is octal. Imagain having 64 fingers ..... the base 64 system uses 64 unique symbols to depict all possible values between 0 and 63.

    Those are: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/

    From http://en.wikipedia.org/wiki/Base64
    To convert data to PEM printable encoding, the first byte is placed in the most significant eight bits of a 24-bit buffer, the next in the middle eight, and the third in the least significant eight bits. If there are fewer than three bytes left to encode (or in total), the remaining buffer bits will be zero. The buffer is then used, six bits at a time, most significant first, as indices into the string: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", and the indicated character is output.
    So given the first part of the string: "http", you would do the following.
    Code:
    1) Decode / Encode Table
    
    A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S  
    0   1   2   3   4   5   6   7   8   9   10  11  12  13  14  15  16  17  18 
    
    T   U   V   W   X   Y   Z   a   b   c   d   e   f   g   h   i   j   k   l
    19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37 
    
    m   n   o   p   q   r   s   t   u   v   w   x   y   z   0   1   2   3   4  
    38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56
    
    5   6   7   8   9   +   /
    57  58  59  60  61  62  63  
    
    2) split the string into three byte / 24 bit portions. Note, that
       when there are less than three bytes left, the buffer is right padded
       with zeros. These are not however included in the encoding, but the shortful must be noted for later use.
    
    htt = 01101000 01110100 01110100
    p   = 01110000 (00000000 00000000) - short 2 bytes
    
    3) take 6 bits at a time, if you don't have a multiple of 6, right pad with zeros to make a multiple of 6
    
    011010 000111 010001 110100
    011100 00|0000
    
    4) subsistute your vlaues using the table above
    26,7,17,52,28,0 = aHR0cA
    
    5) Use the number of byes short and append "=" for one byte and "==" for two bytes.
    
    Base 64 encoded string is: aHR0cA==
    Of course you could write a program to do this using bit shifts and logical operands. I don't have the brain power to tackle that tonight though

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width