Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UDP Datagrams

Status
Not open for further replies.

paretek

Programmer
Oct 25, 2005
1
0
0
CO
hi, my question is how to make UDP datagrams, I am trying to make software to test my network, and one of the points is to simulate a DDoS attack, so how to make those UDP datagrams in order to make a UDP flood?
 
I ran 10 instances of this program on my 2.0ghz P4 and it was enough to get system usage to 37% and have the load climbing steadily:

Code:
#!/usr/bin/perl -w
use strict;
use IO::Socket::INET;
my $socket=new IO::Socket::INET->new(PeerPort=>1234,
        Proto=>'udp',
        PeerAddr=>'localhost');
while(1){$socket->send("this is a test")}

Kordaff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top