Script for checking strong password weak password possible in PHP?

Discussion in 'PHP' started by virtualmisc, Feb 16, 2010.

  1. #1
    Hello Friends

    In a form while entering data in password field what is the simplest way to show the status weak password or strong password in PHP?

    Thanks
     
    virtualmisc, Feb 16, 2010 IP
  2. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #2
    Jquery + PHP or Ajax + PHP.
     
    danx10, Feb 16, 2010 IP
  3. AntelopeSalad

    AntelopeSalad Peon

    Messages:
    85
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    And some basic logic:

    "Only uppercase or lowercase?" -> +1 weak
    "No numbers?" -> +1 weak
    "Less than 6 characters?" -> +1 weak

    Then add it up and assign values to types of weakness.

    3 = Extremely Weak
    2 = Very Weak
    1 = Slightly Weak

    Could do the same thing in reverse to display Strong types.
     
    AntelopeSalad, Feb 16, 2010 IP
  4. Izonedig

    Izonedig Member

    Messages:
    150
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #4
    I don't think this is easy, but can be done :)
    I'm not sure how some websites do, but I think you may take care of these things to check the strenght:
    1-lenght of the password.
    2-existing of numbers
    3-upper and lower cases
    4-how many repeated characters there exist
    5-numbers are next to each other (like: agsjnj1230) or seperated (a5d8df58) (seperated is better)

    You can also check how to create strong random passwords
     
    Izonedig, Feb 16, 2010 IP