- Impact
- 33
I was bored and happened to make this script. :P
It randomly scans for available 3-character domain names. It is currently configured to find COM, NET, ORG, INFO, BIZ, and US domains, but can easily be configured to look for others.
If you happen to accidently come accross an interesting domain using it, be sure to tell me Enjoy.
It randomly scans for available 3-character domain names. It is currently configured to find COM, NET, ORG, INFO, BIZ, and US domains, but can easily be configured to look for others.
If you happen to accidently come accross an interesting domain using it, be sure to tell me Enjoy.
PHP:
<?php
///////////////////////////////////////////////////////////////////////////////
// Jim's 3-Character Domain Scanner Script
// bellys|@|gmail|.|com - http://www.j-fx.ws
//
//
// Scans for .COM, NET, ORG, INFO, BIZ, US domains
// Easily configured for more.
//
// I make no guarantee of the validity of these results.
//
// For a list of whois servers, check out:
//http://www.domaininformation.de/whoisserver_list.html
//http://www.mit.edu/afs/athena/contrib/potluck/Net-Services/whois-servers.list
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// This is the number of domains the script will stop at.
// Try not to set it too high. You'll upset your host and the nameservers
$i = 25;
///////////////////////////////////////////////////////////////////////////////
// Here is the function for checking the availability of a domain
function checkdomain($xserver, $xdomain) {
$sock = fsockopen($xserver,43) or die("Error Connecting To Whois Server");
fputs($sock,"$xdomain\r\n");
while(!feof($sock))
$result .= fgets($sock,128);
fclose($sock);
if(eregi("No match",$result)||eregi("NOT FOUND",$result))
return true;
else
return false;
}
///////////////////////////////////////////////////////////////////////////////
// Here is the array that we will pull random characters from
$chars = array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p",
"q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9");
///////////////////////////////////////////////////////////////////////////////
// Here is some boring HTML/CSS. :P
echo "<style>.domains {font-size: 10px;font-family:Tahoma;color:black;font-weight:bold;}</style>
<div class=\"domains\"><u>Scanned and found</u> ".$i." <u>domains</u>:<br />\n";
///////////////////////////////////////////////////////////////////////////////
// Now, let's start scanning!
while($i > 0){
///////////////////////////////////////////////////////////////////////////////
// Here is where we generate a random string of 3 in the format XXX
// This can be changed easily to the format LLN with this code instead:
///// $current = $chars[rand(0,25)].$chars[rand(0,25)].rand(0,35);
// Or to L-N with this code:
///// $current = $chars[rand(0,25)]."-".rand(0,9);
// Mix and match. Get what you're looking for! :P
$current = $chars[rand(0,35)].$chars[rand(0,35)].$chars[rand(0,35)];
///////////////////////////////////////////////////////////////////////////////
// Here is where we start checking domains
// Feel free to add/remove domains or change whois servers
if(checkdomain("whois.nsiregistry.net",$current.".com")) {
echo $current.".COM\n<br />"; $i--; }
if(checkdomain("whois.nsiregistry.net",$current.".net")) {
echo $current.".NET\n<br />"; $i--; }
if(checkdomain("whois.pir.org",$current.".org")) {
echo $current.".ORG\n<br />"; $i--; }
if(checkdomain("whois.afilias.net",$current.".info")) {
echo $current.".INFO\n<br />"; $i--; }
if(checkdomain("whois.biz",$current.".biz")) {
echo $current.".BIZ\n<br />"; $i--; }
if(checkdomain("whois.nic.us",$current.".us")) {
echo $current.".US\n<br />"; $i--; }
ob_flush();
flush();
}
///////////////////////////////////////////////////////////////////////////////
// We're done! :)
echo "</div>";
?>
Last edited: