Government Security
Network Security Resources

Jump to content


Port Hijacking

- - - - -
  • Please log in to reply
No replies to this topic

#1 beej


    Private First Class

  • Members
  • 38 posts

Posted 11 April 2008 - 10:17 PM

</P> <P>use IO::Socket::INET;
my $socket = IO::Socket::INET->new(
   Proto => 'udp', 
   Type => SOCK_DGRAM,
   LocalPort => 796) ||
die "Error: - $!";

</P> <P>

This simple code snippet is causing problems. It works fine normally, but it gives an "Unknown Error" when another program is already bound to the port.

Creating a TCP connection on an already bound port works fine, but UDP just fails. Anyone know of some kind of work around?