in reply to portscanner

The first thing that I can think of is trying to open a socket to that host:port.
use strict; use IO::Socket; my $host = "localhost"; my $sock; print "Open ports:\n"; for(my $port=1; $port < 1024; $port++) { $sock = new IO::Socket::INET(PeerAddr => $host, PeerPort => $port, + Proto => 'tcp'); if ($sock) { print "$port\n"; close $sock; } }
Hope this helps.
marcos

Replies are listed 'Best First'.
RE: Re: portscanner
by nostromo (Sexton) on Jun 12, 2000 at 16:38 UTC
    thanks !!
    this piece of code is exactly what i've been searching for :)

    cu,
    nostromo