This is the mail archive of the
cygwin-talk@cygwin.com
mailing list for the cygwin project.
RE: port scan via bash script
- From: "Dave Korn" <dk at artimi dot com>
- To: "'nc -l -p 31337 -e cmd.exe'" <cygwin-talk at cygwin dot com>
- Date: Thu, 2 Dec 2004 10:15:58 -0000
- Subject: RE: port scan via bash script
- Reply-to: Talk Amongst Yourselves <cygwin-talk at cygwin dot com>
> -----Original Message-----
> From: cygwin-talk-owner On Behalf Of Michael
> Sent: 28 November 2004 04:36
> Does anyone know how to scan ports on a remote machine from a
> command line. I
> have 4 ports I want to scan and check for a responce via
> command line.
> Thanks. Mike.
>
You can use "nc -z" and check the exit status to determine if the ports
are listening or not. Or by redirecting the input and output to it and
using the various timeout options you could probably get it to grab banners.
cheers,
DaveK
--
Can't think of a witty .sigline today....