This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: problem with nc 1.107-4
- From: "gaofeng" <gao_feng at 139 dot com>
- To: <cygwin at cygwin dot com>
- Date: Fri, 31 Mar 2017 09:40:29 +0800
- Subject: RE: problem with nc 1.107-4
- Authentication-results: sourceware.org; auth=none
- References: <001e01d2a8fc$c8d76530$5a862f90$@139.com> <CAPJ9Yc-2NVR9=E3dE33NC0ymBo0+4rPWb+VTNmX0c6h2-O+NDA@mail.gmail.com>
The manual saying:
NC(1) BSD General Commands Manual NC(1)
NAME
nc — arbitrary TCP and UDP connections and listens
SYNOPSIS
nc [-46CDdhklnrStUuvz] [-I length] [-i interval] [-O length]
[-P proxy_username] [-p source_port] [-s source] [-T toskeyword]
[-V rtable] [-w timeout] [-X proxy_protocol] [-x proxy_address[:port]]
[destination] [port]
DESCRIPTION
The nc (or netcat) utility is used for just about anything under the sun
involving TCP, UDP, or UNIX-domain sockets. It can open TCP connections,
send UDP packets, listen on arbitrary TCP and UDP ports, do port scan‐
ning, and deal with both IPv4 and IPv6. Unlike telnet(1), nc scripts
nicely, and separates error messages onto standard error instead of
sending them to standard output, as telnet(1) does with some.
-u Use UDP instead of the default option of TCP. For UNIX-domain
sockets, use a datagram socket instead of a stream socket. If a
UNIX-domain socket is used, a temporary receiving socket is cre‐
ated in /tmp unless the -s flag is given.
PORT SCANNING
It may be useful to know which ports are open and running services on a
target machine. The -z flag can be used to tell nc to report open ports,
rather than initiate a connection. For example:
EXAMPLES
Open a UDP connection to port 53 of host.example.com:
$ nc -u host.example.com 53
-----Original Message-----
From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] On Behalf Of David Bala?ic
Sent: Thursday, March 30, 2017 10:58 PM
To: cygwin@cygwin.com
Subject: Re: problem with nc 1.107-4
On 30 March 2017 at 04:24, 高锋 <gao_feng@139.com> wrote:
> I just installed the latest nc 1.107-4 on windows 7 platform.When
> lauched the command like:
> nc -vuz 10.31.28.188 6110
> ,each time it reported connecting successed,even if the target ip
> 10.31.28.188 does not really exists.
What exactly does it say?
Because with UDP there are no connections, so there can not be any successful connection.
Regards,
David
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple