Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Coding a proxy URL into SHA1?

    Im doing a college project on "security exploits in the internet and modern appliances", and part of it is to create a secure enviroment for bypassing filtering systems.

    Before i continue may i point out -
    Im not some 14 year old kid wanting to access youtube.

    If your going to assume the above, please, leave the thread and let people who wish to help reply. Lets keep it clean eh?

    My main objective in this is that many systems block the encoding used in the URL of the page "proxified". E.g. MD5 etc. But, unless i am mistaken the encryption known as "SHA1" is yet to be decrypted.

    Is there any way in PHP to encode a variable / factor to SHA1? Like they do currently to MD5 in URLs like that?

  • #2
    Regular Coder bacterozoid's Avatar
    Join Date
    Jun 2002
    Location
    USA
    Posts
    490
    Thanks
    24
    Thanked 35 Times in 35 Posts
    PHP has a sha1 function just as they do MD5. It uses 40 characters instead of 32 and is harder to break than MD5.

    I don't know that MD5 has been figured out...but there are a lot of rainbow tables out there that just contain a zillion input / hash combinations.

    So, you could use sha1 to encode a variable in the URL, but don't leave it up chance that someone could use a rainbow table or brute force method to crack it.

    Use a salt when you create your hash so your hash is unique. Just don't give it away :P

    PHP Code:
    $salt "324@ 52#QMFe3E222%%";
    $hash sha1($salt.md5($variable)); 


  •  

    Posting Permissions

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