Jump to content
Sign in to follow this  

Send random keys 2 ASCII and 2 Numbers.

Recommended Posts


I`m trying to generate "fake passwords" that will be input inside notepad.

But I am having difficulty doing the following :

The first character must be A to Z, Uppercase.

The next 6 are numbers.

The last one is a to z Lowercase.

Any idea how to proceed?

Thank you

Edited by PinetSebastien

Share this post

Link to post
Share on other sites

Look ramdom function.

for $i=1 to 100
ConsoleWrite(RandomKey() & @CRLF)

Func RandomKey()
Local $cadena=""


For $i=1 to 6
Return $cadena


Edited by Danyfirex

Share this post

Link to post
Share on other sites

not clear what should be the last character

from A to z either upper or lowercase? or only lowercase?


if should be A to z , either upper or lowercase then use this in Danyfirex listing to get last character:

$cadena &= Chr(Random(65, 90, 1) + (32 * Random(0, 1, 1)))
Edited by Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Share this post

Link to post
Share on other sites

I did it in Excel with a few formulas and the RANDBETWEEN function. Seeing how you want to use notepad to store your values, it appears to me using Excel would be easier to go with.

Cell A1 has this formula: =C1&D1&E1&F1&G1&H1&I1&K1 (displays the password string you want)

Cell B1 has this formula: =RANDBETWEEN(1,26)

Cell C1 has =IF(B1=1, "A",  IF(B1=2, "B",.....and so on to  IF(B1=26, "Z",""))))))...) (this gives the capital letter in the string)

Cell D1 thru I1 have the same formula: =RANDBETWEEN(0,9)

Cell J1 has this formula: =RANDBETWEEN(1,26)

Cell K1 has this formula: IF(J1=1, "a",IF(J1=2, "b",,.....and so on to  IF(J1=26, "z",""))))))...) (this gives the lower case letter in the string)

Just copy and paste the cells to other rows to generate as many as you want. Just copy and past the values generated by column A to a different row to make the values static. When you need more passwords, just press F9


Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Create New...