Guest User

Untitled

a guest
Jul 19th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. <?php
  2. ///////////////////////////////////////////////////////////////////////////////
  3. //
  4. // Scans for 3-letter domain names.
  5. //
  6. ///////////////////////////////////////////////////////////////////////////////
  7. // This is the number of domains the script will stop at.
  8. $i = 100;
  9.  
  10. ob_start();
  11.  
  12. function checkdomain($xserver, $xdomain) {
  13. $sock = fsockopen($xserver,43) or die("Error Connecting To Whois Server");
  14. fputs($sock,"$xdomain\r\n");
  15. $result = '';
  16. while(!feof($sock))
  17. $result .= fgets($sock,128);
  18. fclose($sock);
  19. return (strpos($result, "No match") !== FALSE ||
  20. strpos($result, "no matches") !== FALSE ||
  21. strpos($result, "NO MATCH") !== FALSE ||
  22. strpos($result, "not found") !== FALSE ||
  23. strpos($result, "Not found") !== FALSE ||
  24. strpos($result, "NOT FOUND") !== FALSE ||
  25. strpos($result, "Status: FREE") !== FALSE ||
  26. strpos($result, "Status: free") != FALSE ||
  27. strpos($result, "No entries found") != FALSE);
  28. }
  29.  
  30. Header("Content-Type: text/plain");
  31.  
  32. $chars = str_split("abcdefghijklmnopqrstuvwxyz");
  33.  
  34. $registrars = array(
  35. //"com" => "whois.nsiregistry.net",
  36. //"net" => "whois.nsiregistry.net",
  37. //"org" => "whois.pir.org",
  38. //"info" => "whois.afilias.net",
  39. //"biz" => "whois.biz",
  40. //"us" => "whois.nic.us",
  41. //"nu" => "whois.nic.nu",
  42. "se" => "whois.iis.se",
  43. "no" => "whois.norid.no",
  44. "dk" => "whois.dk-hostmaster.dk",
  45. //"be" => "whois.dns.be",
  46. //"de" => "whois.denic.de",
  47. );
  48.  
  49. set_time_limit(30);
  50.  
  51. while($i > 0){
  52. $current = $chars[array_rand($chars)].
  53. $chars[array_rand($chars)].
  54. $chars[array_rand($chars)];
  55.  
  56. $found = false;
  57.  
  58. foreach ($registrars as $tld => $server) {
  59. if (checkdomain($server,"$current.$tld")) {
  60. $found = true;
  61. echo "$current.$tld\n";
  62. $i-=1;
  63. }
  64. }
  65.  
  66. if ($found)
  67. echo "\n";
  68.  
  69. ob_flush();
  70. flush();
  71. }
  72.  
  73. echo "\nDone.\n";
  74. ob_flush();
  75. flush();
  76.  
  77. ?>
Add Comment
Please, Sign In to add comment