Here is an example that i posted some time ago, :
<~~ cut
use Socket;
use Fcntl;
use POSIX;
my $PORT=2100;
my $proto=getprotobyname('tcp');
socket($socket,AF_INET,SOCK_STREAM,$proto) || die "couldn't get socket:
$!\n";
bind($socket,sockaddr_in($PORT,INADDR_ANY)) || die "couldn't bind: $!\n";;
listen($socket,5) || die "couldn't listen: $!\n";;
print "connected to: " .inet_ntoa( (sockaddr_in(
accept($remote_socket,$socket)
))[1] );
<~~~ paste
----- Original Message -----
From: "Kipp, James" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 11, 2003 3:50 PM
Subject: RE: very beginner
> > >
> > > Could someone direct me to the correct module to use for
> > monitoring an
> > > Internet connection? I just want to see the IP addresses
> > of the machines
> > > trying to get into my PC.
> >
> > Get a progam like Ethereal: http://www.ethereal.com/
>
> or:
> netstat
> tcpdump
> lsof
>
> and roll your own with Socket or IO::Socket.
>
>
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]