Re: PortQry and port scanning
From: Alexander Nickolov (agnickolov_at_mvps.org)
Date: 09/14/04
- Next message: Alexander Nickolov: "Re: Monitoring Current Connections"
- Previous message: Alexander Nickolov: "Re: CRC when transferring files over a TCP connection"
- In reply to: Suresh: "PortQry and port scanning"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 14 Sep 2004 10:21:40 -0700
You need to use non-blocking connect. Then if you don't get
WSAECONNREFUSED or a successful connect within a short
timeout you can assume the macine is simply not there. The
former response means the port is not in use, the latter means
there's somebody listening. This assumes you are interested
in TCP ports of course, there's no reliable way of detecting
UDP ports.
-- ===================================== Alexander Nickolov Microsoft MVP [VC], MCSD email: agnickolov@mvps.org MVP VC FAQ: http://www.mvps.org/vcfaq ===================================== "Suresh" <Suresh@discussions.microsoft.com> wrote in message news:7620A586-6BCB-45F2-9619-D8FAC179A6DA@microsoft.com... > Hi All, > > I need to find out a port on a remote machine is in listening mode or not. > I found that PortQry application does it very fast. Any idea how portQry > achieve this? I tried connecting to the trarget machine and select-timeout > for response but it takes atleast 30+ seconds to get the reliable > response. I > think it is not the right way to do it. > > -Suresh
- Next message: Alexander Nickolov: "Re: Monitoring Current Connections"
- Previous message: Alexander Nickolov: "Re: CRC when transferring files over a TCP connection"
- In reply to: Suresh: "PortQry and port scanning"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|