The data is random, so each record will be different.
Demo Code:
[Code]
#!/usr/bin/env Ruby
COUNT = Ten
require ' benchmark '
$account _chars = (' A ' ... ') Z '). to_a.delete_if {|c| c =~/[aeiouy]/}
# $password _chars = (' 0 '. 9 '). To_a
$password _chars = array.new
$password _chars[0..9] = (' 0 ' ... ') 9 '). To_a
$password _chars[10..36] = (' a ' ... ') Z '). To_a
def Account_char
$account _chars[rand ($account _chars.length)]
End
def Password_char
$ Password_chars[rand ($password _chars.length)]
End
def account_chars
Account_chars = []
6.times {|c| Account_chars << Account_char}
Account_chars
end
def password
begin
Begin
Password = '
Password << password_char
End While password = = ' 0 '
4.times {password << password_char}
End WHI Le password =~/^ (.) \1\1\1\1$/
Password
End
accounts = {}
lines = []
puts Benchmark::caption
puts benchmark.measure { br> count.times do
i = 0
Account_chars.inject (accounts) do |a, c|
i = 1
i = 6? A[C] = Password:a[c] | | = {}
End
End
}
puts benchmark.measure {
Accounts.each does |char, chars|
account = [char]
chars. Each do |char, chars|
Account << Char
Chars.each does |char, chars|
Account << char
Chars.each do |char, chars|
A Ccount << Char
Chars.each do |char, chars|
Account << char
Chars.each do |char, password|
Acco Unt << Char
lines << "#{account.join}\t#{password}\r\n"
Account.pop
End
Account.pop
End
Account.pop
End
Account.pop
End
Account.pop
End
End
puts benchmark.measure {
op En ' account.txt ', ' WB ' do |f|
F.print Lines.delete_at (rand (lines.length)) until Lines.empty?
End
}
Run after output to: Account.txt file.
The output information is formatted as follows:
The data is random, so each record will be different.
SZQGMC XC6KP
HLVGTZ HCU30
KTSNNF LSNVS
KWMHRQ 3SM07
BTTZCZ DYMUH
DMKPVN GMJHL
KCFKDR X8X8V
VMMJHB X1D65
SRCPGZ T2IP6
WLRMBT 7YA2Y