Manual Pages for UNIX Darwin command on man nc
MyWebUniversity

Manual Pages for UNIX Darwin command on man nc

NC(1) BSD General Commands Manual NC(1)

NAME

nncc ((nneettccaatt)) - use network sockets from the command line

SYNOPSIS

nncc [-hh]

[-rruuvvzz] [-gg gateway] [-GG num] [-ii secs] [-pp port] [-oo file] [-ss addr]

[-ww secs] hostname port[s] [ports] ...

-l -p port [-nnssuuvvwwzz] [-oo file] [hostname] [port]

DESCRIPTION

nncc allows you to use network sockets (tcp or udp) from the shell.

For connecting to remote sites, it's usually only necessary to supply the host or ip address and port for the connection. For a listening on a

socket, you must specify -l for listening, and -p port to specify the

port on which you want to listen. The options are as follows (with C and S indicating whether the option applies to the "client" or "server" roles in a tcp conversation):

-gg gateway (C)

Specifies a source routing hop for outbound connections.

-GG num (C)

Can be used to specify the source routing pointer in the ip header, presumably in order to forge unused previous steps in the source routed path.

-hh Minor help.

-ii secs (C)

Delay interval for lines sent or ports scanned.

-ll (S) Selects "listen" mode instead of connect mode so that people can

connect to you.

-nn (S) The -nn option indicates that all ip addresses should be printed

out instead of being looked up in the DNS.

-oo file (CS)

Sends a hex-dump of the traffic to the specified file.

-pp local port number (CS)

When connecting to a remote service, this is the port from which the connection will originate. When listening for remote clients, this specifies the local port on which to listen.

-rr (C) Randomizes local source ports and addresses for outbound connec-

tions.

-ss source address (CS)

Specifies the local source address on which to listen, or from which to connect.

-uu (CS)

Selects UDP transport as opposed to TCP (the default).

-vv (CS)

Turns on verbosity. Use two (or more) for more verbosity.

-ww secs (CS)

This sets a timeout for connects or for final net reads.

-zz (CS)

Zero I/O mode. While mostly used for scanning, I'm sure you could find a way to use it for connect mode.

The nncc utility exits after both input streams (it's stdin and the remote

socket) have been closed. It doesn't do this very well, and relies rather heavily on the network layers at both ends for this.

SEE ALSO

cat(1) HISTORY

The nncc utility, a "damn useful little backend utility" begun 950915 or

thereabouts, as *Hobbit*'s first real stab at some sockets programming. Something that should have and indeed may have existed ten years ago, but

never became a standard Unix utility. IMHO, nncc could take its place

right next to cat, cp, rm, mv, dd, ls, and all those other cryptic and

Unix-like things.

October 1, 1999




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™