Results 1 to 2 of 2

Thread: Encrypted Password

  1. #1
    Join Date
    Jul 2006
    Posts
    142
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Talking Encrypted Password

    1) Script Title: Encrypted Password

    2) Script URL (on DD): Encrypted Password :

    <script>
    //Encrypted Password script- By Rob Heslop
    //Script featured on Dynamic Drive
    //Visit http://www.dynamicdrive.com

    function submitentry(){
    password = document.password1.password2.value.toLowerCase()
    username = document.password1.username2.value.toLowerCase()
    passcode = 1
    usercode = 1
    for(i = 0; i < password.length; i++) {
    passcode *= password.charCodeAt(i);
    }
    for(x = 0; x < username.length; x++) {
    usercode *= username.charCodeAt(x);
    }
    //CHANGE THE NUMBERS BELOW TO REFLECT YOUR USERNAME/PASSWORD
    if(usercode==134603040&&passcode==126906300)
    //CHANGE THE NUMBERS ABOVE TO REFLECT YOUR USERNAME/PASSWORD
    {
    window.location=password+".htm"}
    else{
    alert("password/username combination wrong")}
    }
    </script>

    <form name="password1">
    <strong>Enter username: </strong>
    <input type="text" name="username2" size="15">
    <br>
    <strong>Enter password: </strong>
    <input type="password" name="password2" size="15">

    <input type="button" value="Submit" onClick="submitentry()">
    </form>

    3) Describe problem: If you wanted to bypass this method (as mentioned in the "Encrypted Password Generator" script) , how would you do it. I am challenging the integrity of this code in order to enhance my own security. Please post your methods for bypassing this trick of making the password unviewable by just looking at the source.

    My method:

    View the List all the files in the web folder to look at the page named after password.

    [please post yours]

    Thanks

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It's not exactly a perfect algorithm, and I suspect that someone with more knowledge in cryptography than I do would find it rather trivial to crack. It certainly gives away an approximation of the length of the password, which is why I rewrote it, to (amongst other things) be more flexible in the algorithms possible. I've used MD5 (thanks to Paul Andrew Jackson) in the example.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

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