sandman Posted July 27, 2007 Posted July 27, 2007 (edited) Here's a little snippet I made from an algorithm. Look in the code for the algorithm, I am aware that it is simple, but I realized earlier that I knew virtually nothing about regular expressions and wanted to get to know them a bit more. After playing around a bit to make it fair (on my first try, the password 'a' was 'You call that a password?', yet 'a1' was 'Good', the best rating.)The ratings are:- You call that a password? You shouldn't trust this password for anything.- Fair Meh, any average computer user would have to spend a long time guessing this.- Normal It'll keep your parents away, unless they have the tools to bruteforce the password.- Good Your password is worthy of trust!- Very Good The best, obviously.And finally, the code:expandcollapse popup#cs -- Check Password Strength -- All results add or subtract from the final score. The score is then calculated to a level of Fair, Normal, and Good. Password length: += length * 2 Amount of numbers: += amt * 2 Alphanumeric: += 10 Non-alphanumeric: -= 10 #ce #include <GUIConstants.au3> $win = GUICreate("Password Checker", 293, 113, 193, 115) $prompt = GUICtrlCreateLabel("Enter a password to check:", 75, 10, 134, 17) $pwd = GUICtrlCreateInput("", 10, 30, 270, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL)) Global $lbl = GUICtrlCreateLabel("No Password Entered", 90, 70, 293, 17) GUISetState(@SW_SHOW) While 1 Dim $strength = "" $read = GUICtrlRead($pwd) ; Length $strength += StringLen($read) * 2 ; Amount of numbers $numexp = StringRegExp($read, "[123456789]", 3) If IsArray($numexp) Then $strength += UBound($numexp) * 2 EndIf ; Check alphanumeric $abcexp = StringRegExp($read, "[abcdefghijklmnopqrstuvwxyz]", 3) If IsArray($numexp) And IsArray($abcexp) Then $strength += 10 Else $strength -= 10 EndIf ; Check special characters $specexp = StringRegExp($read, "[`~!@#$%^&*_+=;':""]", 3) If IsArray($specexp) Then $strength += 10 EndIf If $strength > 0 And $strength < 15 Then GUICtrlSetData($lbl, "Fair") ElseIf $strength >= 15 And $strength < 30 Then GUICtrlSetData($lbl, "Normal") ElseIf $strength >= 30 And $strength < 45 Then GUICtrlSetData($lbl, "Good") ElseIf $strength >= 45 Then GUICtrlSetData($lbl, "Very Good") ElseIf $strength < 0 Then GUICtrlSetData($lbl, "You call that a password?") EndIf $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch Sleep(100) WEndUpdate: I added the little meter pictures. 4 GIFs to go with the ratings now. This EXE is decompilable, if anyone doesn't trust me P.S. There's no password for decompilation, just leave it blank. PasswordStrength.exe (434.1K) Number of downloads: Edited August 23, 2007 by sandman [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]
jvanegmond Posted July 27, 2007 Posted July 27, 2007 Funny, it rates Good even though there are no $%# signs in it.. I always thought that was required to make an exceptionally strong password. github.com/jvanegmond
sandman Posted July 27, 2007 Author Posted July 27, 2007 (edited) Funny, it rates Good even though there are no $%# signs in it.. I always thought that was required to make an exceptionally strong password.Well many sites and applications don't allow special characters so I didn't include that. I'll add it, though, hold on.Okay, now there's also a 'Very Good' option. Edited July 27, 2007 by sandman [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]
jvanegmond Posted July 27, 2007 Posted July 27, 2007 Awesome. It might be a bit more leanient. It requires a 10 character long password including @#$ and caps and non-caps? github.com/jvanegmond
sandman Posted July 28, 2007 Author Posted July 28, 2007 Anyone else? [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]
BrettF Posted July 28, 2007 Posted July 28, 2007 This is pretty cool . Awesome job. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
James Posted July 28, 2007 Posted July 28, 2007 Nifty I could use this alot Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
sandman Posted July 28, 2007 Author Posted July 28, 2007 This can be used in web-based scripts on registration forms, stuff like that. Feel free to use it as long as you give me some kind of credit, whether it's in the code, or in the About section, I don't care. [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]
cramaboule Posted July 28, 2007 Posted July 28, 2007 Wow, but does it consider the Capital letters as Well ? My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website
sandman Posted July 28, 2007 Author Posted July 28, 2007 No, I didn't mean it to, but according to Manadar it does. Hold on, I'll test it out. [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]
sandman Posted July 28, 2007 Author Posted July 28, 2007 (edited) Oops, here's a bug with the new EXE: Enter a password that gets a very good rating, then delete it. Some glitch with GUICtrlSetImage, I think, because after the bug presents itself if you minimize, then maximize the window, it'll go back to normal. Also, does anyone know who hosts trashbin.nfshost.com? If so, I'd like to request to take the hoster's IP address off the download page.. that's kind of confidential. Edited July 28, 2007 by sandman [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]
BinaryBrother Posted July 28, 2007 Posted July 28, 2007 A 24 character Alpha-numeric password shows 'Very Good' lol... SIGNATURE_0X800007D NOT FOUND
sandman Posted July 28, 2007 Author Posted July 28, 2007 A 24 character Alpha-numeric password shows 'Very Good' lol... Well it should, shouldn't it?I think that's a fair rating for that type of password. [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]
James Posted July 29, 2007 Posted July 29, 2007 Feel free to use it as long as you give me some kind of credit, whether it's in the code, or in the About section, I don't care. I meant that I could use it for password creation, when I signup for something new Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
Infinitex0 Posted July 29, 2007 Posted July 29, 2007 hmmm, I have some very weak passwords. Nice script The below statement is False.The above statement is True.a lesson I learned from Greenmachine; give a man a code and he'll solve one problem. Teach a man to code and he'll solve all his problems.P.S please don't use autoIt as a virus creator/spyware maker(keyLogger especially)Cick this and help me[center]My Scripts:[/center][center]Port Scanner[/center]
FuryCell Posted July 30, 2007 Posted July 30, 2007 Nice Job. Just tried it on some of my passwords. A little suggestion though. If you replace the following code the gui will not flicker anymore. If $strength > 0 And $strength < 15 Then GUICtrlSetData($lbl, "Fair") ElseIf $strength >= 15 And $strength < 30 Then GUICtrlSetData($lbl, "Normal") ElseIf $strength >= 30 And $strength < 45 Then GUICtrlSetData($lbl, "Good") ElseIf $strength >= 45 Then GUICtrlSetData($lbl, "Very Good") ElseIf $strength < 0 Then GUICtrlSetData($lbl, "You call that a password?") EndIfoÝ÷ Ù«¢+Ø%ÀÌØíÍÑÉ¹Ñ ÐìÀ¹ÀÌØíÍÑÉ¹Ñ ±ÐìÄÔQ¡¸(%Õ¥ ÑɱI ÀÌØí±°¤±ÐìÐìÅÕ½Ðí¥ÈÅÕ½ÐìÑ¡¸U% ÑɱMÑÑ ÀÌØí±°°ÅÕ½Ðí¥ÈÅÕ½Ðì¤(±Í%ÀÌØíÍÑÉ¹Ñ ÐìôÄÔ¹ÀÌØíÍÑÉ¹Ñ ±ÐìÌÀQ¡¸(%Õ¥ ÑɱI ÀÌØí±°¤±ÐìÐìÅÕ½Ðí9½Éµ°ÅÕ½ÐìÑ¡¸U% ÑɱMÑÑ ÀÌØí±°°ÅÕ½Ðí9½Éµ°ÅÕ½Ðì¤(±Í%ÀÌØíÍÑÉ¹Ñ ÐìôÌÀ¹ÀÌØíÍÑÉ¹Ñ ±ÐìÐÔQ¡¸(%Õ¥ ÑɱI ÀÌØí±°¤±ÐìÐìÅÕ½Ðí½½ÅÕ½ÐìÑ¡¸U% ÑɱMÑÑ ÀÌØí±°°ÅÕ½Ðí½½ÅÕ½Ðì¤(±Í%ÀÌØíÍÑÉ¹Ñ ÐìôÐÔQ¡¸(%Õ¥ ÑɱI ÀÌØí±°¤±ÐìÐìÅÕ½ÐíYÉä½½ÅÕ½ÐìÑ¡¸U% ÑɱMÑÑ ÀÌØí±°°ÅÕ½ÐíYÉä½½ÅÕ½Ðì¤(±Í%ÀÌØíÍÑÉ¹Ñ ±ÐìÀQ¡¸(%Õ¥ ÑɱI ÀÌØí±°¤±ÐìÐìÅÕ½Ðíe½Ô±°Ñ¡ÐÁÍÍݽÉüÅÕ½ÐìÑ¡¸U% ÑɱMÑÑ ÀÌØí±°°ÅÕ½Ðíe½Ô±°Ñ¡ÐÁÍÍݽÉüÅÕ½Ðì¤(¹% HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
mrbond007 Posted July 30, 2007 Posted July 30, 2007 Here's a little snippet I made from an algorithm. Look in the code for the algorithm, I am aware that it is simple, but I realized earlier that I knew virtually nothing about regular expressions and wanted to get to know them a bit more. After playing around a bit to make it fair (on my first try, the password 'a' was 'You call that a password?', yet 'a1' was 'Good', the best rating.)The test is too weak, i have already created a real strong password maker/tester here. You should make your's like this one Projects : Space Regain - Memory Fusion - PWGT - Chip-ITGames : BrainPain - BrainPain Director's Cut - ProSpeed Games Pack (New)Vista vs XP : the forbidden fight
Skrip Posted July 30, 2007 Posted July 30, 2007 Eehh...It's okay. But it rated 125793256482 as good. I think that's a Very good. [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now