VBScript - Random Domain Name
December 21st, 2006
I made this little script because I actually wanted to find a four-letter top domain name .. but didn’t feel like going systematically .. so .. this will randomly generate 100 four-letter .coms. It’s written in VBScript, and should be executed with CScript.
To use, copy text, paste into notepad, save as something.vbs. Open a command prompt, and type: “cscript something.vbs”
(Obviously, you can name the file whatever you want.)
On Error Resume Next
Dim domains_to_find, domain_length, tld_name
domains_to_find = 100
domain_length = 4
tld_name = “.com”const Alphas = “ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-”
WScript.Echo len(Alphas)Dim i, tmp
For i = 1 to domains_to_find
tmp = RandomName(domain_length)
If len(tmp) = domain_length and not (left(tmp,1) = “-” or right(tmp, 1) = “-”) Then
WScript.Echo tmp & tld_name
else
i = i - 1
end if
NextFunction RandomName(length)
Dim x
For x = 1 to length
Randomize
RandomName = RandomName & mid(Alphas, cInt(Rnd * (len(Alphas) + 2)), 1)
Next
End Function
Leave a Reply