Jump to content

Send random keys 2 ASCII and 2 Numbers.


Recommended Posts

Hi,

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
Link to comment
Share on other sites

Look ramdom function.

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

Func RandomKey()
Local $cadena=""

$cadena=Chr(Random(65,90,1))

For $i=1 to 6
    $cadena&=Random(0,9,1)
Next
$cadena&=chr(Random(97,122,1))
Return $cadena
EndFunc 

Saludos

Edited by Danyfirex
Link to comment
Share on other sites

not clear what should be the last character

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

EDIT:

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

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

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

Link to comment
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

Edited by MBALZESHARI
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...