Ch1ldProd1gy Posted April 5, 2007 Share Posted April 5, 2007 a GUI based pass maker... chars (0-9, A-Z), from x to x characters in length then saves all the possibilities to a .txt file? can anyone help? Link to comment Share on other sites More sharing options...
Hyflex Posted April 5, 2007 Share Posted April 5, 2007 Random Password?? If you check out MsgBox(0, "RandomStringTest", "5 characters: " & @TAB & RandomString(5) & @CRLF & _ "10 characters: " & @TAB & RandomString(10) & @CRLF & _ "20 characters: " & @TAB & RandomString(20) ) Func RandomString($sLenght) Local $Return For $x = 1 to $sLenght $Return &= Chr(Random(65,90,1)) Next Return $Return EndFunc Link to comment Share on other sites More sharing options...
Ch1ldProd1gy Posted April 5, 2007 Author Share Posted April 5, 2007 Random Password?? If you check out MsgBox(0, "RandomStringTest", "5 characters: " & @TAB & RandomString(5) & @CRLF & _ "10 characters: " & @TAB & RandomString(10) & @CRLF & _ "20 characters: " & @TAB & RandomString(20) ) Func RandomString($sLenght) Local $Return For $x = 1 to $sLenght $Return &= Chr(Random(65,90,1)) Next Return $Return EndFunc sorry, was looking for a program like this: CODEopt("TrayIconDebug", 1) $let = "0123456789abcdefghijklmnopqrstuvwxyz" $file = FileOpen("output.txt", 2) If $file = -1 Then Exit For $a = 1 To StringLen($let) For $b = 1 To StringLen($let) For $c = 1 To StringLen($let) $out = StringStripWS(StringMid($let, $a, 1) & StringMid($let, $b, 1) & StringMid($let, $c, 1), 8); & StringMid($let, $d, 1) & StringMid($let, $e, 1) & StringMid($let, $f, 1) & StringMid($let, $g, 1), 8) If StringLen($out) > 3 Then Exit FileWriteLine($file, $out) Next Next Next Func OnAutoItExit() FileClose($file) EndFunc ;==>OnAutoItExit but...I want the user to be able to define the amount of char's the program generates, ie, this is from 3 to 3, Link to comment Share on other sites More sharing options...
Hyflex Posted April 5, 2007 Share Posted April 5, 2007 Use the onliine documentations, and search for the IniRead Then they can define it from the IniRead, or you could make a GUI and use GuiRead, if you search for them on the online documenation, they will help you alot Link to comment Share on other sites More sharing options...
Ch1ldProd1gy Posted April 5, 2007 Author Share Posted April 5, 2007 Use the onliine documentations, and search for the IniReadThen they can define it from the IniRead, or you could make a GUI and use GuiRead, if you search for them on the online documenation, they will help you alotI made Gui's before, I just cant fathom how to make it work correctly, damn I suck @ this lol Link to comment Share on other sites More sharing options...
Hyflex Posted April 5, 2007 Share Posted April 5, 2007 Then Download Scite and use the easy GuI Creator tool with it, and chceck out the gui stuff on help files Link to comment Share on other sites More sharing options...
Ch1ldProd1gy Posted April 5, 2007 Author Share Posted April 5, 2007 Then Download Scite and use the easy GuI Creator tool with it, and chceck out the gui stuff on help filesgot msn? add me, I will show u what I meandiablo_rules78@hotmail.com Link to comment Share on other sites More sharing options...
Ch1ldProd1gy Posted April 5, 2007 Author Share Posted April 5, 2007 (edited) got msn? add me, I will show u what I meandiablo_rules78@hotmail.combump,to clear up any confusion, I need a file that will create a .txt file with every character possability (0-9 and A-Z) based on what the user puts in,1 - 2 would be0123456789abcdefghijklmnopqrstuvwxyz000102030405060708090a0b0c0d0e0f0g0h0i0j0k0l0m0n0o0p0q0r0s0t0u0v0w0x0y0z101112131415161718191a1b1c1d1e1f1g1h1i1j1k1l1m1n1o1p1q1r1s1t1u1v1w1x1y1z202122232425262728292a2b2c2d2e2f2g2h2i2j2k2l2m2n2o2p2q2r2s2t2u2v2w2x2y2z303132333435363738393a3b3c3d3e3f3g3h3i3jall the way down to ZZ Edited April 5, 2007 by Ch1ldProd1gy Link to comment Share on other sites More sharing options...
GEOSoft Posted April 5, 2007 Share Posted April 5, 2007 a GUI based pass maker...chars (0-9, A-Z), from x to x characters in lengththen saves all the possibilities to a .txt file?can anyone help?I don't know if you can make use of it or not but I do have a sequental number generator that generates 2 and 3 character length numbers. So it will generate 00 to 999 sequentialy. You could always generate them to an array and then use Random() to get a number. I'm not sure without checking but I suspect that I may have even added 4 Character generation to it. I put that code away when I got to the part where I had to generate 2 and 3 character length alphas (AA to ZZZ). George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Developers Jos Posted April 5, 2007 Developers Share Posted April 5, 2007 (edited) Made this a long time ago and posted it before i believe... It Generates all posible options and till the lenght specified and dumps it into file test.txt: expandcollapse popup$STR = "123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" $MLEN = 2 ; max length of the output $CHARS = StringSplit($STR, "") $FILE = FileOpen("test.txt", 2) $TOUT = "" Dim $NTOUT[$MLEN + 1] $t = TimerInit() For $X = 1 To $MLEN $NTOUT[$X] = Chr(0) Next $NTOUT[1] = Chr(0) ; endless loop $out = "" While 1 For $X = 1 To $CHARS[0] $out = $out & $TOUT & $CHARS[$X] & @LF Next $TOUT = "" $N2 = 0 For $X = 1 To $MLEN If $X = 1 Then $N = Asc($NTOUT[$X]) + 1 Else $N = Asc($NTOUT[$X]) + $N2 EndIf $N2 = 0 If $N > $CHARS[0] Then $N = 1 $N2 = 1 EndIf $NTOUT[$X] = Chr($N) If $N > 0 Then $TOUT = $CHARS[$N] & $TOUT EndIf Next If StringLen($TOUT) = $MLEN Then ExitLoop EndIf WEnd FileWriteLine($FILE, $out) FileClose($FILE) MsgBox(0, 'time', TimerDiff($t)) Exit Edited April 5, 2007 by JdeB SciTE4AutoIt3 Full installer Download page  - Beta files    Read before posting   How to post scriptsource   Forum etiquette Forum Rules  Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
GEOSoft Posted April 5, 2007 Share Posted April 5, 2007 Made this a long time ago and posted it before i believe... It Generates all posible options and till the lenght specified and dumps it into file test.txt: expandcollapse popup$STR = "123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" $MLEN = 2 ; max length of the output $CHARS = StringSplit($STR, "") $FILE = FileOpen("test.txt", 2) $TOUT = "" Dim $NTOUT[$MLEN + 1] $t = TimerInit() For $X = 1 To $MLEN $NTOUT[$X] = Chr(0) Next $NTOUT[1] = Chr(0) ; endless loop $out = "" While 1 For $X = 1 To $CHARS[0] $out = $out & $TOUT & $CHARS[$X] & @LF Next $TOUT = "" $N2 = 0 For $X = 1 To $MLEN If $X = 1 Then $N = Asc($NTOUT[$X]) + 1 Else $N = Asc($NTOUT[$X]) + $N2 EndIf $N2 = 0 If $N > $CHARS[0] Then $N = 1 $N2 = 1 EndIf $NTOUT[$X] = Chr($N) If $N > 0 Then $TOUT = $CHARS[$N] & $TOUT EndIf Next If StringLen($TOUT) = $MLEN Then ExitLoop EndIf WEnd FileWriteLine($FILE, $out) FileClose($FILE) MsgBox(0, 'time', TimerDiff($t)) ExitActually I think I had seen this once before and I was going to re-visit it when I get back to working on that project. Thanks for posting it again. What my app has to do is query a database using any portion of the possible combinations of license plate numbers and letters to identify a possible vehicle when ony a portion of the plate was obtained. For example if the vehicle is a car then the plate could either be 3 numbers and then 3 letters OR 3 letters and then 3 numbers. If some one says I know that the plate had the letter G and two of the numbers wer 5 and 8 Then I have to pull all possible combibations where the first part contains G and the second part contains 5 and 8 AND the reverse of that. Then It gets trickier by querying the database and ranking the possibilities by region. 8) George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Ch1ldProd1gy Posted April 5, 2007 Author Share Posted April 5, 2007 how can I make that program generate all possibilities from X Char (user's input) in length, to X Char (user's input) in length? Link to comment Share on other sites More sharing options...
Developers Jos Posted April 5, 2007 Developers Share Posted April 5, 2007 how can I make that program generate all possibilities from X Char (user's input) in length, to X Char (user's input) in length?What have you tried? ... because that is a simple task so a good opportunity to learn .. SciTE4AutoIt3 Full installer Download page  - Beta files    Read before posting   How to post scriptsource   Forum etiquette Forum Rules  Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Ch1ldProd1gy Posted April 5, 2007 Author Share Posted April 5, 2007 What have you tried? ... because that is a simple task so a good opportunity to learn ..I was discussing it with my friend, and the only thing he could come up with was a massive amount of loops, and I read it, and it wouldnt work right anyways lol.atleast he tried,I on the other hand, wrote a script, took me 1 hour, and it didnt work, I got frustrated and deleted it, I could only get it to do 3 digits in length, no more, no less lolwould you mind adding me to your msn? I would enjoy a tutor lol (faster replies) Link to comment Share on other sites More sharing options...
Developers Jos Posted April 5, 2007 Developers Share Posted April 5, 2007 (edited) I was discussing it with my friend, and the only thing he could come up with was a massive amount of loops, and I read it, and it wouldnt work right anyways lol.atleast he tried,I on the other hand, wrote a script, took me 1 hour, and it didnt work, I got frustrated and deleted it, I could only get it to do 3 digits in length, no more, no less lolwould you mind adding me to your msn? I would enjoy a tutor lol (faster replies)The logic for the generation is posted .... all you need is the user interaction .... Have a look at InputBox() or GUI..() Edited April 5, 2007 by JdeB SciTE4AutoIt3 Full installer Download page  - Beta files    Read before posting   How to post scriptsource   Forum etiquette Forum Rules  Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Ch1ldProd1gy Posted April 5, 2007 Author Share Posted April 5, 2007 The logic for the generation is posted .... all you need is the user interaction .... Have a look at InputBox() or GUI..()by changingCODE$MLEN = 1 ; max length of the outputit doesnt create any char'sand by having it set to more than 2, it just sits there Link to comment Share on other sites More sharing options...
Uten Posted April 5, 2007 Share Posted April 5, 2007 (edited) Actually I think I had seen this once before and I was going to re-visit it when I get back to working on that project. Thanks for posting it again. What my app has to do is query a database using any portion of the possible combinations of license plate numbers and letters to identify a possible vehicle when ony a portion of the plate was obtained. For example if the vehicle is a car then the plate could either be 3 numbers and then 3 letters OR 3 letters and then 3 numbers. If some one says I know that the plate had the letter G and two of the numbers wer 5 and 8 Then I have to pull all possible combibations where the first part contains G and the second part contains 5 and 8 AND the reverse of that.Then It gets trickier by querying the database and ranking the possibilities by region. 8)Should be an easy match with regexp against a text file. Unfortunately sql does not support regexp searches ( as fare as I know, correct me if I'm wrong ). But it in the case of license plate numbers it should be achievable against a flat file. I have a project running against 44k words and it is reasonably fast.@GEOSoft, I don't monitor this thread so PM me if you need further input.. Edited April 5, 2007 by Uten Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Alek Posted April 5, 2007 Share Posted April 5, 2007 (edited) not sure if this is what your looking for but here is a program is use to make passwords expandcollapse popupGlobal $random[17],$pass #include <GuiConstants.au3> GuiCreate("", 140, 100,-1, -1 , $WS_POPUP,$WS_EX_TOOLWINDOW) GUiSetBkColor(0x00000) $Input_2 = GuiCtrlCreateInput("1", 100, 20, 40, 20) GUICtrlCreateUpdown(-1) GUICtrlSetLimit(-1,16,1) $Input_1 = GuiCtrlCreateInput($pass, 0, 20, 100, 20) GUICtrlCreateLabel("",0,0,140,20,$SS_CENTER ,$GUI_WS_EX_PARENTDRAG) $Button_2 = GuiCtrlCreateButton("Copy to clipboard", 00, 40, 140, 20) $Button_3 = GuiCtrlCreateButton("Create password", 0, 60, 140, 20) $Button_4 = GuiCtrlCreateButton("Exit", 0, 80, 140, 20) GuiSetState() do $msg = GuiGetMsg() if $msg = $Button_2 then ClipPut(GUICtrlRead($Input_1)) if $msg = $Button_4 then Exit if $msg = $Button_3 Then passcreate() GUICtrlSetData($Input_1,$pass) EndIf until $msg = $GUI_EVENT_CLOSE func passcreate() for $B = 1 to 16 $random[$B] = "" Next for $C = 1 to GUICtrlRead($Input_2) if Random(1,3,1) = 1 Then $random[$C] = random(48,57,1) Elseif Random(1,3,1) = 2 then $random[$C] = random(65,90,1) Else $random[$C]= random(97,122,1) EndIf Next $pass = chr($random[1]) & chr($random[2]) & chr($random[3]) & chr($random[4]) & chr($random[5]) & chr($random[6]) & chr($random[7]) & chr($random[8]) & chr($random[9]) & chr($random[10]) & chr($random[11]) & chr($random[12]) & chr($random[13]) & chr($random[14]) & chr($random[15]) & chr($random[16]) EndFunc Edited April 5, 2007 by Alek [font="Impact"]Never fear, I is here.[/font] Link to comment Share on other sites More sharing options...
Ch1ldProd1gy Posted April 5, 2007 Author Share Posted April 5, 2007 not sure if this is what your looking for but here is a program is use to make passwords expandcollapse popupGlobal $random[17],$pass #include <GuiConstants.au3> GuiCreate("", 140, 100,-1, -1 , $WS_POPUP,$WS_EX_TOOLWINDOW) GUiSetBkColor(0x00000) $Input_2 = GuiCtrlCreateInput("1", 100, 20, 40, 20) GUICtrlCreateUpdown(-1) GUICtrlSetLimit(-1,16,1) $Input_1 = GuiCtrlCreateInput($pass, 0, 20, 100, 20) GUICtrlCreateLabel("",0,0,140,20,$SS_CENTER ,$GUI_WS_EX_PARENTDRAG) $Button_2 = GuiCtrlCreateButton("Copy to clipboard", 00, 40, 140, 20) $Button_3 = GuiCtrlCreateButton("Create password", 0, 60, 140, 20) $Button_4 = GuiCtrlCreateButton("Exit", 0, 80, 140, 20) GuiSetState() do $msg = GuiGetMsg() if $msg = $Button_2 then ClipPut(GUICtrlRead($Input_1)) if $msg = $Button_4 then Exit if $msg = $Button_3 Then passcreate() GUICtrlSetData($Input_1,$pass) EndIf until $msg = $GUI_EVENT_CLOSE func passcreate() for $B = 1 to 16 $random[$B] = "" Next for $C = 1 to GUICtrlRead($Input_2) if Random(1,3,1) = 1 Then $random[$C] = random(48,57,1) Elseif Random(1,3,1) = 2 then $random[$C] = random(65,90,1) Else $random[$C]= random(97,122,1) EndIf Next $pass = chr($random[1]) & chr($random[2]) & chr($random[3]) & chr($random[4]) & chr($random[5]) & chr($random[6]) & chr($random[7]) & chr($random[8]) & chr($random[9]) & chr($random[10]) & chr($random[11]) & chr($random[12]) & chr($random[13]) & chr($random[14]) & chr($random[15]) & chr($random[16]) EndFunc kind of, but not random, and saved to a file, the user input is right accept, a minimum # and a max #, the file would give EVERY possibility from 0-9 A-z Link to comment Share on other sites More sharing options...
Uten Posted April 5, 2007 Share Posted April 5, 2007 kind of, but not random, and saved to a file,the user input is rightaccept, a minimum # and a max #,the file would give EVERY possibility from 0-9 A-z sounds like you want someone to do your homework? Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling 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