IPB
>  Man Pages > Linux > openSUSE 10.2 > Section 1 > /netcat man page

/netcat man page

Section 1 - openSUSE 10.2 Man Pages

Other operating system man pages available here


Advanced Search

Hopefully, this page is exactly what you are looking for, but if not, you can always find further assistance on Unix/Linux Forum!


NETCAT(1)                                                            NETCAT(1)



NAME
       netcat - TCP/IP swiss army knife

SYNOPSIS
       netcat [-options] hostname port[s] [ports] ...
       netcat -l -p port [-options] [hostname] [port]

DESCRIPTION
       netcat is a simple unix utility which reads and writes data across net-
       work connections, using TCP or UDP protocol. It is  designed  to  be  a
       reliable  "back-end" tool that can be used directly or easily driven by
       other programs and scripts.  At the same time,  it  is  a  feature-rich
       network  debugging and exploration tool, since it can create almost any
       kind of connection you would need and has several interesting  built-in
       capabilities.   Netcat,  or  "netcat"  as  the actual program is named,
       should have been supplied long ago as another one of those cryptic  but
       standard Unix tools.

       In  the  simplest usage, "netcat host port" creates a TCP connection to
       the given port on the given target host.  Your standard input  is  then
       sent to the host, and anything that comes back across the connection is
       sent to your standard output.  This continues indefinitely,  until  the
       network  side of the connection shuts down.  Note that this behavior is
       different from most other applications which shut everything  down  and
       exit after an end-of-file on the standard input.

       Netcat  can also function as a server, by listening for inbound connec-
       tions on arbitrary ports and then doing the same reading  and  writing.
       With  minor  limitations,  netcat  doesn't  really  care  if it runs in
       "client" or "server" mode -- it still shovels data back and forth until
       there isn't any more left. In either mode, shutdown can be forced after
       a configurable time of inactivity on the network side.

       And it can do this via UDP too, so netcat is possibly the "udp  telnet-
       like"  application you always wanted for testing your UDP-mode servers.
       UDP, as the "U" implies, gives less reliable data transmission than TCP
       connections  and some systems may have trouble sending large amounts of
       data that way, but it's still a useful capability to have.

       You may be asking "why not just use  telnet  to  connect  to  arbitrary
       ports?"  Valid  question,  and  here  are some reasons.  Telnet has the
       "standard input EOF" problem, so one must introduce  calculated  delays
       in driving scripts to allow network output to finish.  This is the main
       reason netcat stays running until the *network*  side  closes.   Telnet
       also  will  not transfer arbitrary binary data, because certain charac-
       ters are interpreted as telnet options and are thus  removed  from  the
       data  stream.   Telnet  also  emits  some of its diagnostic messages to
       standard output, where netcat keeps such things  religiously  separated
       from its *output* and will never modify any of the real data in transit
       unless you *really* want it to.  And of course telnet is  incapable  of
       listening  for  inbound  connections,  or  using  UDP  instead.  Netcat
       doesn't have any of these limitations, is much smaller and faster  than
       telnet, and has many other advantages.

OPTIONS
       -g gateway   source-routing hop point[s], up to 8

       -G num       source-routing pointer: 4, 8, 12, ...

       -h           display help

       -i secs      delay interval for lines sent, ports scanned

       -l           listen mode, for inbound connects

       -n           numeric-only IP addresses, no DNS

       -o file      hex dump of traffic

       -p port      local  port  number  (port  numbers  can  be individual or
                    ranges: lo-hi [inclusive])

       -r           randomize local and remote ports

       -s addr      local source address

       -t           enable telnet negotiation

       -u           UDP mode

       -v           verbose [use twice to be more verbose]

       -w secs      timeout for connects and final net reads

       -z           zero-I/O mode [used for scanning]

COPYRIGHT
       Netcat is entirely my own creation, although plenty of other  code  was
       used as examples.  It is freely given away to the Internet community in
       the hope that it will be useful, with  no  restrictions  except  giving
       credit  where  it  is due.  No GPLs, Berkeley copyrights or any of that
       nonsense.  The author assumes NO responsibility for how anyone uses it.
       If netcat makes you rich somehow and you're feeling generous, mail me a
       check.  If you are affiliated in any way with Microsoft Network, get  a
       life.  Always ski in control.  Comments, questions, and patches to hob-
       bit@avian.org.

BUGS
       Efforts have been made to have netcat "do the right thing" in  all  its
       various  modes.   If you believe that it is doing the wrong thing under
       whatever circumstances, please notify me and tell me how you  think  it
       should  behave.   If  netcat  is not able to do some task you think up,
       minor tweaks to the code will probably fix that.  It provides  a  basic
       and  easily-modified  template  for writing other network applications,
       and I certainly encourage people to make custom mods and  send  in  any
       improvements they make to it. Continued feedback from the Internet com-
       munity is always welcome!

       Some port names in /etc/services contain hyphens  --  netcat  currently
       will  not correctly parse those, so specify ranges using numbers if you
       can.

SEE ALSO
       /usr/share/doc/netcat/README

AUTHOR
       This manual page was written by Joey Hess <joeyh@debian.org> and Robert
       Woodcock  <rcw@debian.org>, cribbing heavily from Netcat's README file.

       Netcat was written by a guy we know as the Hobbit <hobbit@avian.org>.



                                                                     NETCAT(1)


Man(1) output converted with man2html and wrapped by fishsponge

This page was generated on Sat Sep 8 16:34:30 GMT 2007

Your favourite pages:

No pages logged yet.
Trying to save cookie...

Top 10 most popular pages:

svn man page (6110 hits)
(FreeBSD 6.2)

sqlite3 man page (5590 hits)
(openSUSE 10.2)

adv_cap_autoneg man page (5039 hits)
(Solaris 10 11_06)

CPAN man page (4784 hits)
(Suse Linux 10.1)

ssh man page (4434 hits)
(Suse Linux 10.1)

ssh-socks5-proxy-connect man page (3494 hits)
(Solaris 10 11_06)

signal man page (3349 hits)
(Suse Linux 10.1)

netcat man page (3338 hits)
(Suse Linux 10.1)

pprosetup man page (2847 hits)
(Solaris 10 11_06)

startproc man page (2725 hits)
(Suse Linux 10.1)

Useful Links

Go Back

Visitor Statistics


Valid XHTML 1.0 Transitional     Valid CSS!

Partners: Cambridge Plus :: Pyrenees Mountain Holidays :: Server Room Temperature Monitor :: <Link Available>
Unix Man Pages / Linux Man Pages :: HiFi Forum :: SIP VoIP Phone & Provider Reviews :: UNIX/Linux Forum Archives

More info on advertising on Unix/Linux Forum