Monday, September 19, 2011

Tiny perl script for UDP flooding

Sometimes it is necessary to perform UDP flood towards some network device(s) in order to test its behavior in stress… Actually I am sure that every system administrator might use this small perl script for this purpose. Certainly there are many special programs for this but believe me that it is much more easier to do the following:
1. #touch > /tmp/
2. #chmod +x /tmp/
3. Copy the this code to /tmp/

4. Then /tmp/ 0 0 0, where is IP you would like to flood with huge amount of UDP datagrams.