goldenix Posted November 19, 2008 Posted November 19, 2008 (edited) will this do or should i try make it better? Btw does it mater if i have 100 key files or 10 key files in terms of security? $string = "!'#$%&/()+,-.:;\@[]" & "^{" & "|}~" & '"' For $a=1 To 9999 $upper = Chr(Random(Asc("A"), Asc("z"), 1)) $lower = Random(1,9,1) If Random() < 0.5 Then ; Returns a value between 0 and 1. ConsoleWrite($upper) ElseIf Random() > 0.5 Then ConsoleWrite($lower) ElseIf Random() > 0.9 Then ConsoleWrite(' ') Else ConsoleWrite(StringMid($string,Random(1,25),1)) Endif Next ConsoleWrite(@CRLF) Edited November 19, 2008 by goldenix My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
theyranos Posted November 20, 2008 Posted November 20, 2008 (edited) You might want to seed your random number generator with something difficult to predict first.local $seed = TimerInit() for $ii = 0 to 100 ToolTip("Move the mouse around to generate randomness") $seed = BitRotate(BitXOR($seed, MouseGetPos(0) * MouseGetPos(1)), 1, "D") sleep(10) next ToolTip("") SRandom($seed)I'm sure there's a better way, but I'm not sure what it would be.Edit: Revised the code to make the mouse motion have more of an effect on the randomness Edited November 20, 2008 by theyranos
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