for the new entry of users i have a csv file, but this year it has nothing in i want to use as passwords. i made a vbscript to append paswords onto the file but it doesnt work properly. i mean it works but the output isnt right. only the first two items in each array are used in generating the password.
what have i done wrong?
wordbank1 = Array("red","green","blue"
,"yellow",
"pink","or
ange","pur
ple","blue
","black",
"white","a
ngry","sca
ry","sport
y","posh",
"lazy","bi
g","crazy"
,"dizzy","
dull","fun
ny","great
","giganti
c","jolly"
,"kind","m
ighty","ne
w","nice",
"odd","qua
int","quic
k","rare",
"roasted",
"round","s
ad","short
","silly",
"strange",
"tricky","
tough","wo
nderful","
zany","str
iped","itc
hy")
wordbank2= Array("elephant","donkey",
"wolf","ra
bbit","rat
","hamster
","mouse",
"cat","dog
","sparrow
","magpie"
,"alligato
r","bison"
,"condor",
"fox","eag
le","swan"
,"duck","o
wl","snake
","hedgeho
g","kinkaj
ou","bear"
,"shark","
llama","fr
og","lemur
","hawk","
tiger","li
on","boar"
)
Const ForReading = 1, ForWriting = 2
inputfile="2005admissions.
csv"
Set fso = CreateObject("Scripting.Fi
leSystemOb
ject")
Set MyFile = fso.OpenTextFile(inputfile
, ForReading)
Do While MyFile.AtEndOfStream <> True
retstring = MyFile.ReadLine
password = wordbank1(rnd(ubound(wordb
ank1))) & wordbank2(rnd(ubound(wordb
ank2)))
wscript.echo retstring & "," & password
Loop
MyFile.Close
the output looks like
lizabeth,Allen,EAllen,gree
ndonkey
Peter,Allen,PAllen,redelep
hant
Dyson,Allen,DAllen,greendo
nkey
Jennifer,Allport,JAllport,
reddonkey
Charlotte,Anderson,CAnders
on,greenel
ephant
Simone,Anderson,SAnderson,
greeneleph
ant
Start Free Trial