themax90 Posted July 24, 2006 Share Posted July 24, 2006 (edited) If you need a random password, that has no logical method to it, and is COMPLETELY random. Here you go.CODE;============================================================================; Combine types using BitOr.Global Const $PasswordLettersUp = 1 ; UppercaseGlobal Const $PasswordLettersDown = 2 ; Lower CaseGlobal Const $PasswordNumbers = 4 ; Numbers; ============================================================================; AutoIt Version : 3.1.1.130; Author : Max Gardner(AutoIt Smith;king.of.all@comcast.net); Description :; This function will create a completely random password based on number of; characters and the type you want.;; $PassworcharLimit = Number of characters in your password; $PasswordType = Upper-Lower Case and Number mix.; 1 = Uppercase $PasswordLettersUp; 2 = Lowercase $PasswordLettersDown; 3 = Uppercase and Lowercase BitOr($PasswordLettersUp, $PasswordLettersDown); 4 = Numbers $PasswordNumbers; 5 = Uppercase and Numbers BitOr($PasswordLettersUp, $PasswordNumbers); 6 = Lowercase and Numbers BitOr($PasswordLettersDown, $PasswordNumbers); 7 = Uppercase, Lowercase, and Numbers BitOr($PasswordLettersUp, $PasswordLettersDown, $PasswordNumbers); ============================================================================Func GetPass($PasswordCharLimit = 16, $PasswordType = 7) Local $Track = 1 Local $Password = "" For $Track = 1 To $PasswordCharLimit Step 1 $Password = $Password & GetChar($PasswordType) Next Return $PasswordEndFunc ;==>GetPassFunc GetChar($PwType) Local $Pw[3] Select Case $PwType = 1 Return Chr(Random(65, 90, 1)) Case $PwType = 2 Return Chr(Random(97, 122, 1)) Case $PwType = 3 $Pw[0] = Random(65, 90, 1) $Pw[1] = Random(97, 122, 1) Return Chr($Pw[Random(0, 1, 1) ]) Case $PwType = 4 Return Chr(Random(48, 57, 1)) Case $PwType = 5 $Pw[0] = Random(48, 57, 1) $Pw[1] = Random(65, 90, 1) Return Chr($Pw[Random(0, 1, 1) ]) Case $PwType = 6 $Pw[0] = Random(48, 57, 1) $Pw[1] = Random(97, 122, 1) Return Chr($Pw[Random(0, 1, 1) ]) Case $PwType = 7 $Pw[0] = Random(48, 57, 1) $Pw[1] = Random(65, 90, 1) $Pw[2] = Random(97, 122, 1) Return Chr($Pw[Random(0, 2, 1) ]) EndSelectEndFunc ;==>GetCharHere is the demonstration script w/ GUI.;--------; Generated Box | Numbers Box | gen button; Checkbox1 | cbox2 | cbox 3;--------See my Fileman:http://www.autoitscript.com/fileman/users/AutoIt%20Smith/ Edited August 21, 2006 by AutoIt Smith Link to comment Share on other sites More sharing options...
B3TA_SCR1PT3R Posted July 24, 2006 Share Posted July 24, 2006 coulda saved alot of time by smackin' your hands on the keyboard [right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right] Link to comment Share on other sites More sharing options...
themax90 Posted July 24, 2006 Author Share Posted July 24, 2006 coulda saved alot of time by smackin' your hands on the keyboard As it turns out, I need a strong password that cannot be found out, and is completely random. I did not want to destroy my keyboard. This script took 5 minutes, and did exactly what I want. I am happy with it. I am sharing it with the forum. Please make a comment on the script directly, as adversed to saying what I could have done instead. If you do not like it, please say it directly. Otherwise, I will not know what that weird post means. Link to comment Share on other sites More sharing options...
OverloadUT Posted July 24, 2006 Share Posted July 24, 2006 Ironically, B3TA_SCR1PT3R's method is in some ways more random, because it contains unpredictable entropy. Food for thought. Link to comment Share on other sites More sharing options...
nfwu Posted July 24, 2006 Share Posted July 24, 2006 (edited) B3TA_SCR1PT3R's method also has a higher frequency of keys in the area being whacked. Depends on what you need... #) edit: Nice app, AutoIt Smith! Edited July 24, 2006 by nfwu TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
Paulie Posted July 24, 2006 Share Posted July 24, 2006 This function will create a completely random password based on number of characters and the type you want.Technically, computers are all logic, so it's not possible to be completely random, but "Pseudo-Random" like the number generated by the 'Random()' function.But nice App!Imma use it for my new Password folder Link to comment Share on other sites More sharing options...
Danny35d Posted July 24, 2006 Share Posted July 24, 2006 AutoIt Smith nice apps, to make it even stronger password I will add symbols "!@#$%*" to the random password. AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
GaryFrost Posted July 24, 2006 Share Posted July 24, 2006 Here's one i've been using for a long time, think Valik helped me with it when I 1st started on the forum ConsoleWrite(Random_Password(15) & @LF) Func Random_Password($MAXLENGTH) Local $PASSWORD = '', $LETTER, $I For $I = 1 To $MAXLENGTH $LETTER = Random(33, 126) $PASSWORD = $PASSWORD & Chr($LETTER) Next Return $PASSWORD EndFunc ;==>Random_Password SciTE for AutoItDirections for Submitting Standard UDFs  Don't argue with an idiot; people watching may not be able to tell the difference.  Link to comment Share on other sites More sharing options...
themax90 Posted July 24, 2006 Author Share Posted July 24, 2006 Yes I guess I will be adding a symbols option in a bit. It will require a bit more coding because I must beable to combine it will all the styles I'm just glad to be giving back to the community thats given me so much. Link to comment Share on other sites More sharing options...
gamerman2360 Posted July 24, 2006 Share Posted July 24, 2006 *Looks at picture*... *writes down password*... Link to comment Share on other sites More sharing options...
Paulie Posted July 24, 2006 Share Posted July 24, 2006 I'm seeing how many times it takes to find words with this little script Make sure you specify length before you run this thoug Sleep(5000) $count = 0 While 1 ControlClick("Password Generator", "", "Button1") $count = $count+1 ToolTip($count, 0, 0) Sleep(100) $text = WinGetText("Password Generator") If StringInStr($text, "paulie") Then;Change word here While 1 ToolTip($count, 0, 0) Wend EndIf WEnd Link to comment Share on other sites More sharing options...
Danny35d Posted July 24, 2006 Share Posted July 24, 2006 (edited) Yes I guess I will be adding a symbols option in a bit. It will require a bit more coding because I must beable to combine it will all the styles I'm just glad to be giving back to the community thats given me so much.To combine it with all the styles you can try something like: expandcollapse popup; AutoIt Version : 3.1.1.130 ; Author : Max Gardner(AutoIt Smith;king.of.all@comcast.net) ; Description : ; This function will create a completely random password based on number of ; characters and the type you want. ; ; $PassworcharLimit = Number of characters in your password ; $PasswordType = Upper-Lower Case and Number mix. ; 1 = Uppercase $PasswordLettersUp ; 2 = Lowercase $PasswordLettersDown ; 3 = Uppercase and Lowercase BitOr($PasswordLettersUp, $PasswordLettersDown) ; 4 = Numbers $PasswordNumbers ; 5 = Uppercase and Numbers BitOr($PasswordLettersUp, $PasswordNumbers) ; 6 = Lowercase and Numbers BitOr($PasswordLettersDown, $PasswordNumbers) ; 7 = Uppercase, Lowercase, and Numbers BitOr($PasswordLettersUp, $PasswordLettersDown, $PasswordNumbers) ; 8 = Symbols ; 9 = Uppercase and Symbols ; 10 = Lowercase and Symbols ; 11 = Uppercase, Lowercase and Symbols ; 12 = Numbers and Symbols ; 13 = Uppercase, Numbers and Symbols ; 14 = Lowercase, Numbers and Symbols ; 15 = Uppercase, Lowercase, Numbers and Symbols ; ============================================================================ Func GetChar($iPwType) Local $aPw = '', $MaxType = 0 Local $aType = StringSplit('1,2,4,8', ',') Local $sSymbols = StringSplit('! @ # $ % ^ & * ( ) \ | { } [ ] / " + - _ = < > : ; ? ' & Chr(96) & ' ' & Chr(39), ' ') Local $sRandom1 = Chr(Random(65, 90, 1)) ; Uppercase Local $sRandom2 = Chr(Random(97, 122, 1)) ; Lowercase Local $sRandom4 = Chr(Random(48, 57, 1)) ; Number Local $sRandom8 = $sSymbols[Random(1, $sSymbols[0], 1)] ; Symbols For $x = 1 To $aType[0] $MaxType += Int($aType[$x]) Next If Int($iPwType) > $MaxType Then Return('') For $x = $aType[0] To 1 Step -1 If Int($aType[$x]) <= Int($iPwType) Then $aPw &= Eval('sRandom' & $aType[$x]) & ',' $iPwType = Int($iPwType) - Int($aType[$x]) EndIf Next $aPw = StringSplit(StringTrimRight($aPw, 1), ',') Return $aPw[Random(1, $aPw[0], 1)] EndFunc Edit: Added a safety check if $iPwType > $MaxType return Null. Remove While statement. Edited July 25, 2006 by Danny35d AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
Richard Robertson Posted July 25, 2006 Share Posted July 25, 2006 Why not generate passwords using Up, Left, Down, Right, Left analog stick click, Right analog stick click, Left trigger, Right trigger, Left bumper, Right bumper? XD If you are lost, those are accepted XBOX 360 controller XBOX Live! password characters. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 25, 2006 Moderators Share Posted July 25, 2006 These are similar to what I did here:http://www.autoitscript.com/forum/index.ph...st&p=210971 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
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