arcker Posted October 26, 2005 Posted October 26, 2005 Hi evr1, i'm new to the forum. I would like to use Auto it to manage Active Directory, instead of using WSH. So, my first step is to create random passwords by default. I've used the function #include <GuiConstants.au3> chr(Random(Asc("A"), Asc("Z"), 1) It works, but i want to random one entirely word, with random number of characters. Thx for help ! -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]
Valuater Posted October 27, 2005 Posted October 27, 2005 not sure what you want....???? Maybe this #include <GuiConstants.au3> Dim $num, $x, $Pass, $Count_[13] $num = Random(4, 12, 1) for $x = 1 to $num $Count_[$x] = Chr(Random(65, 90, 1)) $Pass = $Pass & $Count_[$x] Next MsgBox(0,"Random Password", $Pass & " " ) 8)
Valuater Posted October 27, 2005 Posted October 27, 2005 or maybe this #include <GuiConstants.au3> HotKeySet("{F9}", "Get_pass") While 1 sleep(20) WEnd Func Get_pass() Dim $num, $Pass $num = Random(4, 12, 1) If $num = 4 Then $Pass = "Dave" If $num = 5 Then $Pass = "Frank" If $num = 6 Then $Pass = "Sammys" If $num = 7 Then $Pass = "Melissa" If $num = 8 Then $Pass = "Kurtland" If $num = 9 Then $Pass = "Who knows" If $num = 10 Then $Pass = "Who Cares" If $num = 11 Then $Pass = "OK I'm deparate" If $num = 12 Then $Pass = "Yea... Finally Done" MsgBox(0,"Random Password", $Pass & " " ) EndFunc 8)
Skruge Posted October 27, 2005 Posted October 27, 2005 You could easily expand this to include certain symbols, which will improve your chances against a brute force attack. Local $NewPW = "", $Charset For $x = 1 To Random(8, 16, 1); 8 to 16 characters $Charset = Random(0, 2, 1); Randomize Alphanumeric Select Case $Charset = 0 $NewPW = $NewPW & Chr(Random(Asc("A"), Asc("Z"), 1)) Case $Charset = 1 $NewPW = $NewPW & Chr(Random(Asc("0"), Asc("9"), 1)) Case Else $NewPW = $NewPW & Chr(Random(Asc("a"), Asc("z"), 1)) EndSelect Next MsgBox(0, "New Password", $NewPW) [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]
MSLx Fanboy Posted October 27, 2005 Posted October 27, 2005 Apparently I can't upload 181KB zip file, so I'll give you a link. Anyways, haxial.com has had this neat program that will generate random passwords that are actually pronounceable, a great feature that makes passwords easier to remember, yet remain secure (they have no personal meaning to the user). Maybe you can interface it with Autoit to randomly choose a line from 5 or 20 or 100 lines of passwords http://www.haxial.com/products/xyzzy/ Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate())
arcker Posted October 29, 2005 Author Posted October 29, 2005 thx a lot for the solution skruge ! and thx @ all ! I will continue my script to manage AD (a lot of work) Local $NewPW = "", $Charset For $x = 1 To Random(8, 16, 1); 8 to 16 characters $Charset = Random(0, 2, 1); Randomize Alphanumeric Select Case $Charset = 0 $NewPW = $NewPW & Chr(Random(Asc("A"), Asc("Z"), 1)) Case $Charset = 1 $NewPW = $NewPW & Chr(Random(Asc("0"), Asc("9"), 1)) Case Else $NewPW = $NewPW & Chr(Random(Asc("a"), Asc("z"), 1)) EndSelect Next MsgBox(0, "New Password", $NewPW) Autoit powaaaaa -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]
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