短位垃圾域名爆破机

 

想注册个3位的cn域名 于是就写个个这个玩意

 

 

<?php
print_r( 
" 
+------------------------------------+ 
垃圾域名爆破机
By :Sunshie 
blog:http:/phpinfo.me/
Usage: $argv[0] 后缀 域名位数
Example: php.exe $argv[0] .cn 3
+------------------------------------+ 
\r\n\r\n\r\n" 
); 
$houzhui=isset($argv[1])?$argv[1]:".cn";
 $len=isset($argv[2])?$argv[2]:3;
 echo "你爆破的域名后缀为:$houzhui,长度为$len\r\n+------------------------------------+\r\n";
 while(1){
 $xxoo=sb($len).$houzhui;
$api="http://panda.www.net.cn/cgi-bin/check.cgi?area_domain=".$xxoo;
 
echo "\r正在测试:$xxoo";
$url=file_get_contents($api);
preg_match("/<original>(.*)<\/original>/", $url, $arr); 
//print_r($arr);
 
if(@$arr['1']=="210 : Domain name is available"){
 
    echo "可以注册,结果以保存到ok.txt\r\n";
    file_put_contents("ok.txt", $xxoo."\r\n",FILE_APPEND);
    }
 
 }
 
function sb( $length = 3 ) {  
 
 $chars = 'abcdefghijklmnopqrstuvwxyz0123456789_'; 
 $password = "";  
 for ( $i = 0; $i < $length; $i++ )  { 
  $password .= $chars[ mt_rand(0, strlen($chars) - 1) ];
 }  
 return $password;  } 
 
 ?>

 

效果如下
aaa

Tags:
文 / admin
1 COMMENTS
  1. 2014/08/19

    感觉php和js很像啊

LEAVE A REPLY

loading