Games-Fun.Ru

Последний ответ

  • Анонс игры Dead Rising 2: Off the Record (66)

    • Страница 1 из 1
    • 1
    Cложность пароля
    spAДата: Вторник, 17.11.2009, 18:58 | Сообщение # 1
    Лейтенант
    Сообщений: 77
    Репутация: 34
    Статус: Offline
    Скрипт рабочий. проверил

    Code
    <script language="javascript">   

    /*   
    Password Strength Algorithm:   

    Password Length:   
    5 Points: Less than 4 characters   
    10 Points: 5 to 7 characters   
    25 Points: 8 or more   

    Letters:   
    0 Points: No letters   
    10 Points: Letters are all lower case   
    20 Points: Letters are upper case and lower case   

    Numbers:   
    0 Points: No numbers   
    10 Points: 1 number   
    20 Points: 3 or more numbers   

    Characters:   
    0 Points: No characters   
    10 Points: 1 character   
    25 Points: More than 1 character   

    Bonus:   
    2 Points: Letters and numbers   
    3 Points: Letters, numbers, and characters   
    5 Points: Mixed case letters, numbers, and characters   

    Password Text Range:   

    >= 90: Very Secure   
    >= 80: Secure   
    >= 70: Very Strong   
    >= 60: Strong   
    >= 50: Average   
    >= 25: Weak   
    >= 0: Very Weak   

    */   

    // Settings   
    // -- Toggle to true or false, if you want to change what is checked in the password   
    var m_strUpperCase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";   
    var m_strLowerCase = "abcdefghijklmnopqrstuvwxyz";   
    var m_strNumber = "0123456789";   
    var m_strCharacters = "!@#$%^&*?_~"   

    // Check password   
    function checkPassword(strPassword)   
    {   
    // Reset combination count   
    var nScore = 0;   

    // Password length   
    // -- Less than 4 characters   
    if (strPassword.length < 5)   
    {   
    nScore += 5;


    • Страница 1 из 1
    • 1
    Поиск: