Author Topic: Password Strength Checker  (Read 20789 times)

stormeus

  • No-Lifer
  • Developer
  • Full Member
  • *****
  • Posts: 112
  • Karma: +13/-2
    • View Profile
Password Strength Checker
« on: November 17, 2011, 12:29:43 am »
Password Strength Check Module ( mod_password )

A quick module I wrote from the Global Watchlist source code, this module connects to Google's password rating API to rate a password's strength. It's very simple, and consists of only one function.

int GetPasswordStrength( string password, [bool ignoreLength [, string userName]] )
password     - The password, as a string
ignoreLength - If true, password length is not checked. (Optional and false by default.)
userName     - The username, which can be used for additional security checks. (Optional)

The function returns an integer from 0-4, or null if an error occurs. The ratings are as follows:
[list]
    0 - Too short.[/li]
      1 - Insecure.[/li]
        2 - Okay.[/li]
          3 - Good.[/li]
            4 - Excellent.[/li]
            [/list]

            Download (revision 2)
            Combined Package (Linux, Source, and Windows in one ZIP)

            Quote
            Archive
            Revision 1
            Combined Package (Linux, Source, and Windows in one ZIP)
            « Last Edit: November 19, 2011, 03:16:27 am by stormeus »
            Quote
            Morphine says:
                them LU devs ranting about how LU doesn't have client pickups
                while us VC:MPers don't have client anything
                ;_;

            Stormeus Argo says:
                we have client crashes though
                ohohohohoho

            Morphine says:
                LU DOESN'T HAVE THAT

            Stormeus Argo says:
                LU - 0
                VC:MP - 1

            88nateatx

            • Jr. Member
            • **
            • Posts: 59
            • Karma: +2/-7
            • Doesn't give a damn about his bad reputation.
              • View Profile
            Re: Password Strength Checker
            « Reply #1 on: November 17, 2011, 12:50:52 am »
            wow, another nice module to fiddle around with  ;D


            Thijn

            • Tester
            • Sr. Member
            • ****
            • Posts: 531
            • Karma: +27/-16
              • View Profile
            Re: Password Strength Checker
            « Reply #2 on: November 17, 2011, 06:36:50 am »
            Looks nice, Although I rather have this in plain squirrel.

            stormeus

            • No-Lifer
            • Developer
            • Full Member
            • *****
            • Posts: 112
            • Karma: +13/-2
              • View Profile
            Re: Password Strength Checker
            « Reply #3 on: November 17, 2011, 11:51:49 am »
            Maybe when I get around to making Squirrel HTTP sockets. Otherwise, making a password checker like cracklib or Google's would be complex.
            Quote
            Morphine says:
                them LU devs ranting about how LU doesn't have client pickups
                while us VC:MPers don't have client anything
                ;_;

            Stormeus Argo says:
                we have client crashes though
                ohohohohoho

            Morphine says:
                LU DOESN'T HAVE THAT

            Stormeus Argo says:
                LU - 0
                VC:MP - 1

            Thijn

            • Tester
            • Sr. Member
            • ****
            • Posts: 531
            • Karma: +27/-16
              • View Profile
            Re: Password Strength Checker
            « Reply #4 on: November 17, 2011, 03:40:55 pm »
            Maybe when I get around to making Squirrel HTTP sockets.

            LU's Sockets?

            stormeus

            • No-Lifer
            • Developer
            • Full Member
            • *****
            • Posts: 112
            • Karma: +13/-2
              • View Profile
            Re: Password Strength Checker
            « Reply #5 on: November 17, 2011, 08:32:43 pm »
            I know, but I've tried making HTTP requests with variable success, usually unsuccessful, other times hard to parse.
            EDIT: Generally, a module would be slightly faster anyways.
            « Last Edit: November 17, 2011, 08:38:08 pm by stormeus »
            Quote
            Morphine says:
                them LU devs ranting about how LU doesn't have client pickups
                while us VC:MPers don't have client anything
                ;_;

            Stormeus Argo says:
                we have client crashes though
                ohohohohoho

            Morphine says:
                LU DOESN'T HAVE THAT

            Stormeus Argo says:
                LU - 0
                VC:MP - 1

            stormeus

            • No-Lifer
            • Developer
            • Full Member
            • *****
            • Posts: 112
            • Karma: +13/-2
              • View Profile
            Re: Password Strength Checker
            « Reply #6 on: November 19, 2011, 02:51:24 am »
            The module has been updated to revision 2.
            [list]
              A mid-level cache has been updated. The screenshot below should give a good idea of how effective it is.
              Lots of rewriting to use the standard namespace, like
            std::string.[/li]
              The username and password length limit has been removed since it is no longer necessary.
              Added type checking so you can't pass off
            null or 7 as a password. They must be strings. ignoreLength must be a bool.[/li]
              Windows DLL compressed using
            UPX. Reduced the filesize from 100+ KB to around 20 KB, and works properly.[/li]
            [/list]

            Updating is not required, but recommended.
            Bug reports always appreciated.

            Cache Speed Testing
            « Last Edit: November 19, 2011, 03:16:12 am by stormeus »
            Quote
            Morphine says:
                them LU devs ranting about how LU doesn't have client pickups
                while us VC:MPers don't have client anything
                ;_;

            Stormeus Argo says:
                we have client crashes though
                ohohohohoho

            Morphine says:
                LU DOESN'T HAVE THAT

            Stormeus Argo says:
                LU - 0
                VC:MP - 1

             

            © Liberty Unleashed Team.