usr bin env php php domain argv words array_splice argv num_words coun

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env php
<?php
$domain = $argv[1];
$words = array_splice($argv, 2);
$num_words = count($words);
echo "\n-------------------------------------\n";
for ($i=0; $i<$num_words; $i++)
{
for ($j=0; $j<$num_words; $j++)
{
if ($i == $j) {
$addr = $words[$j] . '.' . $domain;
}
else
{
$addr = $words[$i] . $words[$j] . '.' . $domain;
}
if (check($addr))
{
echo "\n";
echo $addr . ' ';
}
else
{
echo '.';
}
echo (check($addr) ? 'FREE' : ' NO') . ' ' . $addr;
echo "\n";
echo "\033[1;35m";
usleep(500000);
}
}
echo "\n\n";
function check($addr)
{
return (`whois $addr | grep paid-till` ? FALSE : TRUE);
}
?>