Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Mon Dec 31, 2001 8:10 am Post subject: Random password generator |
|
|
Here's a VDS 4 script to generate a list of random passwords. The passwords will all consist of 6 characters and 2 numbers.
| Code: |
%%count = 300
%%chars1 = "abcdefghijklmnopqrstuvwxyz"
%%chars2 = "0123456789"
option decimalsep,.
option fieldsep,.
parse "%%day;%%part",@datetime()
random @format(@fmul(@fdiv(%%part,%%day),1.1),10.0)
list create,1
%n = 1
repeat
%%password =
%i = 1
repeat
%%password = %%password@substr(%%chars1,@random(1,@len(%%chars1)))
%i = @succ(%i)
until @equal(%i,7)
%i = 1
repeat
%%password = %%password@substr(%%chars2,@random(1,@len(%%chars2)))
%i = @succ(%i)
until @equal(%i,3)
list add,1,%%password
%n = @succ(%n)
until @equal(%n,@succ(%%count))
list savefile,1,list.txt
list close,1
|
Tommy |
|