From 0d47952611198ef6b1163f366dc03922d20b1475 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 09:42:04 +0200 Subject: Adding upstream version 7.94+git20230807.3be01efb1+dfsg. Signed-off-by: Daniel Baumann --- ncat/docs/AUTHORS | 28 + ncat/docs/README | 146 ++ ncat/docs/THANKS | 29 + ncat/docs/examples/README | 15 + ncat/docs/examples/ipaccess | 23 + ncat/docs/examples/logs/ascii-output | 3 + ncat/docs/examples/logs/hex-output | 47 + ncat/docs/examples/scripts/README | 6 + ncat/docs/examples/scripts/http-proxy | 5 + ncat/docs/examples/scripts/http-scan/README | 14 + ncat/docs/examples/scripts/http-scan/get.request | 3 + ncat/docs/examples/scripts/http-scan/iplist | 5 + ncat/docs/examples/scripts/http-scan/scan-example | 7 + .../docs/examples/scripts/http-scan/scanner-output | 57 + ncat/docs/ncat-ascii-art.txt | 11 + ncat/docs/ncat.1 | 787 ++++++++ ncat/docs/ncat.usage.txt | 57 + ncat/docs/ncat.xml | 1225 ++++++++++++ ncat/docs/ncatguide.xml | 2008 ++++++++++++++++++++ ncat/docs/ncatguidehtml.xml | 12 + ncat/docs/ncatmanhtml.xml | 12 + 21 files changed, 4500 insertions(+) create mode 100644 ncat/docs/AUTHORS create mode 100644 ncat/docs/README create mode 100644 ncat/docs/THANKS create mode 100644 ncat/docs/examples/README create mode 100644 ncat/docs/examples/ipaccess create mode 100644 ncat/docs/examples/logs/ascii-output create mode 100644 ncat/docs/examples/logs/hex-output create mode 100644 ncat/docs/examples/scripts/README create mode 100755 ncat/docs/examples/scripts/http-proxy create mode 100644 ncat/docs/examples/scripts/http-scan/README create mode 100644 ncat/docs/examples/scripts/http-scan/get.request create mode 100644 ncat/docs/examples/scripts/http-scan/iplist create mode 100755 ncat/docs/examples/scripts/http-scan/scan-example create mode 100644 ncat/docs/examples/scripts/http-scan/scanner-output create mode 100644 ncat/docs/ncat-ascii-art.txt create mode 100644 ncat/docs/ncat.1 create mode 100644 ncat/docs/ncat.usage.txt create mode 100644 ncat/docs/ncat.xml create mode 100644 ncat/docs/ncatguide.xml create mode 100644 ncat/docs/ncatguidehtml.xml create mode 100644 ncat/docs/ncatmanhtml.xml (limited to 'ncat/docs') diff --git a/ncat/docs/AUTHORS b/ncat/docs/AUTHORS new file mode 100644 index 0000000..c0232c8 --- /dev/null +++ b/ncat/docs/AUTHORS @@ -0,0 +1,28 @@ +Ncat AUTHORS +============ + +Ncat is based in concept (but not code) on the original "Netcat" +written by Hobbit circa 1994. Ncat combines the original Netcat +feature set as well as various other ideas from other Netcat-like +products, such as CryptCat, Socat, GNU Netcat, etc. + +Ncat was originally written from the ground up by Chris Gibson +(chris@linuxops.net) and was funded by the Google Summer of Code Program +2005. + +Development, bug fixes, security auditing, improvements by Sean +(infamous42md@hotpop.com). + +Starting with the Google Summer of Code 2008, Ncat development was +picked back up by Mixter and Kris Katterjohn. This included many bug +fixes, new features and code cleanups. + +The Ncat requirements, ideas and general support and help were given by +Fyodor. + +Many helpful comments, suggestions and other useful information was +taken from the nmap-dev list (@insecure.org) as well as other +contributors via email. + +Ncat shares the Nmap infrastructure libraries (Nsock and Nbase) which +were originally written by Fyodor. diff --git a/ncat/docs/README b/ncat/docs/README new file mode 100644 index 0000000..77000fb --- /dev/null +++ b/ncat/docs/README @@ -0,0 +1,146 @@ + . . + \`-"'"-'/ + } 6 6 { + ==. Y ,== + /^^^\ . + / \ ) + ( )-( )/ _ + -""---""--- / + / Ncat \_/ + ( ____ + \_.=|____E + + +README for Ncat +--------------- + +Ncat is a reimplementation of the currently splintered and reasonably +unmaintained Netcat family. Ncat will do pretty much everything that +all the other Netcat's do, all in one place. Plus it has the added +benefit of spanky new features and ongoing development. + +Ncat was designed with the original Netcat interface in mind. Rather +than replacing the old Netcat interface with a brand new (and thus more +convoluted) set of options, the Ncat interface was intentionally kept +clean and simple to use, just like the original product. + +Ncat provides most of the features present in the original Netcat but with +a complete overhaul and rewrite, along with completely new features and a +combination of other well received features of other Netcat products, such +as IPv6 and SSL support. + +The port scanning support has been entirely removed from Ncat. The +reason for this is fairly obvious: there is a better port scanner out +there already... :) + +Ncat can act as either a client or server, using TCP or UDP over IPv4 or +IPv6. SSL support is provided for both the client and server mode. + +There is also a new "connection brokering" feature which enables two or +more hosts to connect that previously were unable to directly communicate +with each other. + +For example: "Host A" can connect to "Host B" but not "Host C" + "Host C" can connect to "Host B" but not "Host A" + +It is clear, then, that if you could connect to "Host B" then "Host A" +and "Host C" could directly communicate... + +[HostA] <------> [HostB-with-Ncat-Broker] <------> [HostC] + +Ncat's connection brokering will allow you to connect between Host A and +Host C via Host B without the trouble of having to have SOCKS support, +etc. This is still somewhat experimental behaviour. + +Ncat has support for HTTP "CONNECT" via an HTTP proxy server such as Squid. +It can also connect via a SOCKS4 server and is very flexible in terms of +how it shuffles your data around. + +Ncat can also spawn its own HTTP CONNECT proxy server for your +own relaying requirements. + +Ncat has the ability to execute a program and handle the I/O for its data +over the socket. In other words, Ncat can "add" networking support to +applications that currently have none. + +For example, you could: + +ncat --exec "/bin/bash" -l 5000 + +NOTE: This is exceptionally dangerous behaviour, as it leaves an open shell +sitting directly accessible to anyone who is able to connect to port 5000. +See the allow and deny options below for securing your Ncat processes. + +Ncat has a TCP and UDP "redir"-style redirection feature to allow the user +to redirect traffic from one host to another. + +For example: + +ncat --exec "/usr/local/bin/ncat www.example.com 80" -l 8888 + +This command binds Ncat to the local machine on port 8888 and redirects +connections to www.example.com. You may also find uses for this as a "host +hiding" system. Similar to SOCKS4 but without any of the hassle of having +to have SOCKS support in the application. + +This also begs the question of, "What would happen if you decided you wanted +to pass the --udp flag in to the above command somewhere?" + +In this case, you would have a TCP to UDP "gender changer". + +If you have an application that only makes only TCP connections, for example, +you could spawn a Ncat process to listen on a the applications TCP port and +then redirect the TCP connection out to the final destination, only over UDP. + +The --allow and --deny options are provided to prevent unauthorized access to +any Ncat process that is listening on a port. These options are also paired +with the --allowfile and --denyfile options, similar in behaviour to Nmap. + +The allow and deny options accept a number of different IP address formats +for maximum flexibility: + +A single IP address, of the format: + + ip.ip.ip.ip + +EG: 192.168.10.1 + +A CIDR-style IP address range, of the format: + + ip.ip.ip.ip/cidr + +EG: 192.168.10.0/24 + +An IP and full netmask, of the format: + + ip.ip.ip.ip:nm.nm.nm.nm + +EG: 192.168.10.4:255.255.255.255 + +An IP address with wildcards: + + ip.ip.ip.* + ip.ip.*.* + ip.*.*.* + +These rules may also be used in a flat file, delimited by newlines. An +example of a full ACL is included in docs/examples/ labelled 'iplist'. Also +note that comments start with a # and are perfectly acceptable for use in +the ACL's. + +For example, the file "ipaccess" might look like: + +# Abuse from ADSL user. +88.223.14.1/32 + +# This guy is scanning us for SOCKS4 servers to abuse, block his /24 +194.213.167.* + +To implement this IP address ACL simply run: + +ncat --denyfile /path/to/file/ipaccess -l 7000 + +For further documentation, please see the man page. + +--Chris Gibson and Kris Katterjohn + diff --git a/ncat/docs/THANKS b/ncat/docs/THANKS new file mode 100644 index 0000000..d8d1bc0 --- /dev/null +++ b/ncat/docs/THANKS @@ -0,0 +1,29 @@ +Ncat Acknowledgements +===================== + +This file is a short rambling of various "thank-you"'s to all +the very generous support and advice received from various +parties. + +First and foremost: Thanks go out to Fyodor for all the support +and great ideas throughout the course of development and no doubt +also in the future. + +Thanks to Google and the Summer of Code team. The points of +contact with Google being Chris DiBona, Natalie and Jude. Thanks to +you all for making this possible. Without whom I wouldn't even +be writing this. + +Also, thank you to all the folks from #c on Undernet who kicked +me in the right direction when things were at their most broken. + +Thanks to Jan for all her support and, well, general tolerance. :) + +Thanks to all the people who've submitted bug reports, given me +ideas, helped me test Ncat or just given me general encouragement +over the previous years. It is most appreciated. + +Finally, thanks to Hobbit for writing the original Netcat; it still +rocks. + +--Chris Gibson, diff --git a/ncat/docs/examples/README b/ncat/docs/examples/README new file mode 100644 index 0000000..7e253fc --- /dev/null +++ b/ncat/docs/examples/README @@ -0,0 +1,15 @@ +/examples/scripts +~~~~~~~~~~~~~~~~~ +These are a set of small scripts to further demonstrate some +uses for Ncat. You *will* have to change some values yourself, +such as in "http-proxy", if your proxy server requires authorization, +you'll have to add your own authorization information. + + +/examples/logs/ +~~~~~~~~~~~~~~~ +These are a set of output logfiles generated by Ncat to briefly +demonstrate Ncat's logging abilities. + + +--Chris Gibson, diff --git a/ncat/docs/examples/ipaccess b/ncat/docs/examples/ipaccess new file mode 100644 index 0000000..356bea1 --- /dev/null +++ b/ncat/docs/examples/ipaccess @@ -0,0 +1,23 @@ +# +# This is a sample IP access list that +# could potentially be used with Ncat +# to allow or deny specific users from +# connecting to an Ncat process, such as +# a standard listen operation to being +# able to access your newly spawned SOCKS4 +# server. +# +# Obviously, these IP addresses are pretty +# useless to most people. It is an example +# afterall. :) +# +# Chris Gibson, + +# lo interface. +127.0.0.1/8 + +# eth0 internal network. +192.168.0.0/24 + +# eth1 to outside world. +55.20.30.1/32 diff --git a/ncat/docs/examples/logs/ascii-output b/ncat/docs/examples/logs/ascii-output new file mode 100644 index 0000000..324f2a1 --- /dev/null +++ b/ncat/docs/examples/logs/ascii-output @@ -0,0 +1,3 @@ +HELO xxx.xxx.xxx +220 smtp.google.com ESMTP +250 smtp.google.com Hello xxx.xxx.xxx [xxx.xxx.xxx.xxx], pleased to meet you diff --git a/ncat/docs/examples/logs/hex-output b/ncat/docs/examples/logs/hex-output new file mode 100644 index 0000000..0114db5 --- /dev/null +++ b/ncat/docs/examples/logs/hex-output @@ -0,0 +1,47 @@ +[0000] 47 45 54 20 2F 69 6E 64 65 78 2E 68 74 6D 6C 20 GET..ind ex.html. +[0010] 48 54 54 50 2F 31 2E 30 0A HTTP.1.0 . +[0000] 55 73 65 72 2D 41 67 65 6E 74 3A 20 4E 63 61 74 User.Age nt..Ncat +[0010] 0A . +[0000] 48 6F 73 74 3A 20 77 77 77 2E 67 6F 6F 67 6C 65 Host..ww w.google +[0010] 2E 63 6F 6D 0A .com. +[0000] 0A . +[0000] 48 54 54 50 2F 31 2E 30 20 33 30 32 20 46 6F 75 HTTP.1.0 .302.Fou +[0010] 6E 64 0D 0A 4C 6F 63 61 74 69 6F 6E 3A 20 68 74 nd..Loca tion..ht +[0020] 74 70 3A 2F 2F 77 77 77 2E 67 6F 6F 67 6C 65 2E tp...www .google. +[0030] 63 6F 2E 75 6B 2F 63 78 66 65 72 3F 63 3D 50 52 co.uk.cx fer.c.PR +[0040] 45 46 25 33 44 3A 54 4D 25 33 44 31 31 32 34 37 EF.3D.TM .3D11247 +[0050] 35 35 38 30 32 3A 53 25 33 44 48 75 52 73 51 62 55802.S. 3DHuRsQb +[0060] 51 69 43 59 52 71 4A 6E 5A 32 26 70 72 65 76 3D QiCYRqJn Z2.prev. +[0070] 2F 69 6E 64 65 78 2E 68 74 6D 6C 0D 0A 53 65 74 .index.h tml..Set +[0080] 2D 43 6F 6F 6B 69 65 3A 20 50 52 45 46 3D 49 44 .Cookie. .PREF.ID +[0090] 3D 31 63 31 31 36 32 63 66 36 63 63 33 65 35 63 .1c1162c f6cc3e5c +[00a0] 64 3A 43 52 3D 31 3A 54 4D 3D 31 31 32 34 37 35 d.CR.1.T M.112475 +[00b0] 35 38 30 32 3A 4C 4D 3D 31 31 32 34 37 35 35 38 5802.LM. 11247558 +[00c0] 30 32 3A 53 3D 5F 38 33 69 47 45 53 67 6F 7A 6E 02.S..83 iGESgozn +[00d0] 33 49 4F 6D 34 3B 20 65 78 70 69 72 65 73 3D 53 3IOm4..e xpires.S +[00e0] 75 6E 2C 20 31 37 2D 4A 61 6E 2D 32 30 33 38 20 un..17.J an.2038. +[00f0] 31 39 3A 31 34 3A 30 37 20 47 4D 54 3B 20 70 61 19.14.07 .GMT..pa +[0100] 74 68 3D 2F 3B 20 64 6F 6D 61 69 6E 3D 2E 67 6F th....do main..go +[0110] 6F 67 6C 65 2E 63 6F 6D 0D 0A 43 6F 6E 74 65 6E ogle.com ..Conten +[0120] 74 2D 54 79 70 65 3A 20 74 65 78 74 2F 68 74 6D t.Type.. text.htm +[0130] 6C 0D 0A 53 65 72 76 65 72 3A 20 47 57 53 2F 32 l..Serve r..GWS.2 +[0140] 2E 31 0D 0A 43 6F 6E 74 65 6E 74 2D 4C 65 6E 67 .1..Cont ent.Leng +[0150] 74 68 3A 20 32 32 37 0D 0A 44 61 74 65 3A 20 54 th..227. .Date..T +[0160] 75 65 2C 20 32 33 20 41 75 67 20 32 30 30 35 20 ue..23.A ug.2005. +[0170] 30 30 3A 31 30 3A 30 32 20 47 4D 54 0D 0A 43 6F 00.10.02 .GMT..Co +[0180] 6E 6E 65 63 74 69 6F 6E 3A 20 4B 65 65 70 2D 41 nnection ..Keep.A +[0190] 6C 69 76 65 0D 0A 0D 0A 3C 48 54 4D 4C 3E 3C 48 live.... .HTML..H +[01a0] 45 41 44 3E 3C 54 49 54 4C 45 3E 33 30 32 20 4D EAD..TIT LE.302.M +[01b0] 6F 76 65 64 3C 2F 54 49 54 4C 45 3E 3C 2F 48 45 oved..TI TLE...HE +[01c0] 41 44 3E 3C 42 4F 44 59 3E 0A 3C 48 31 3E 33 30 AD..BODY ...H1.30 +[01d0] 32 20 4D 6F 76 65 64 3C 2F 48 31 3E 0A 54 68 65 2.Moved. .H1..The +[01e0] 20 64 6F 63 75 6D 65 6E 74 20 68 61 73 20 6D 6F .documen t.has.mo +[01f0] 76 65 64 0A 3C 41 20 48 52 45 46 3D 22 68 74 74 ved..A.H REF..htt +[0200] 70 3A 2F 2F 77 77 77 2E 67 6F 6F 67 6C 65 2E 63 p...www. google.c +[0210] 6F 2E 75 6B 2F 63 78 66 65 72 3F 63 3D 50 52 45 o.uk.cxf er.c.PRE +[0220] 46 25 33 44 3A 54 4D 25 33 44 31 31 32 34 37 35 F.3D.TM. 3D112475 +[0230] 35 38 30 32 3A 53 25 33 44 48 75 52 73 51 62 51 5802.S.3 DHuRsQbQ +[0240] 69 43 59 52 71 4A 6E 5A 32 26 61 6D 70 3B 70 72 iCYRqJnZ 2.amp.pr +[0250] 65 76 3D 2F 69 6E 64 65 78 2E 68 74 6D 6C 22 3E ev..inde x.html.. +[0260] 68 65 72 65 3C 2F 41 3E 2E 0D 0A 3C 2F 42 4F 44 here..A. .....BOD +[0270] 59 3E 3C 2F 48 54 4D 4C 3E 0D 0A Y...HTML ... diff --git a/ncat/docs/examples/scripts/README b/ncat/docs/examples/scripts/README new file mode 100644 index 0000000..e50372f --- /dev/null +++ b/ncat/docs/examples/scripts/README @@ -0,0 +1,6 @@ +These are various scripts that demonstrate some +potential usage for Ncat. + +If you find a neat usage for Ncat and possibly +write a few lines of code to automate something, +then please email them over to Chris Gibson (chris@linuxops.net) diff --git a/ncat/docs/examples/scripts/http-proxy b/ncat/docs/examples/scripts/http-proxy new file mode 100755 index 0000000..904c20f --- /dev/null +++ b/ncat/docs/examples/scripts/http-proxy @@ -0,0 +1,5 @@ +NCAT_PATH=../../.. +PROXY_HOST=www.cnn.com:80 +PROXY_AUTH=user:pass + +$NCAT_PATH/ncat --http-proxy "$PROXY_HOST" --proxy-auth "$PROXY_AUTH" localhost 3128 diff --git a/ncat/docs/examples/scripts/http-scan/README b/ncat/docs/examples/scripts/http-scan/README new file mode 100644 index 0000000..bb5c8be --- /dev/null +++ b/ncat/docs/examples/scripts/http-scan/README @@ -0,0 +1,14 @@ +HTTP-SCAN with Ncat +~~~~~~~~~~~~~~~~~~~ + +This is a simple exercise that uses a small amount of +scripted automation that will throw out the banner +information of n number of hosts listed in the file "iplist". + +Ncat uses the "get.request" HTTP header to get the newly +connected webserver to tell you about itself. + +Usage: ./scan-example + +Variables to change: None, but you may want to change "iplist" + to other more informative hosts. diff --git a/ncat/docs/examples/scripts/http-scan/get.request b/ncat/docs/examples/scripts/http-scan/get.request new file mode 100644 index 0000000..778a569 --- /dev/null +++ b/ncat/docs/examples/scripts/http-scan/get.request @@ -0,0 +1,3 @@ +HEAD / HTTP/1.0 + + diff --git a/ncat/docs/examples/scripts/http-scan/iplist b/ncat/docs/examples/scripts/http-scan/iplist new file mode 100644 index 0000000..f0417e9 --- /dev/null +++ b/ncat/docs/examples/scripts/http-scan/iplist @@ -0,0 +1,5 @@ +www.google.com +www.microsoft.com +www.apache.org +www.freebsd.org +www.apple.com diff --git a/ncat/docs/examples/scripts/http-scan/scan-example b/ncat/docs/examples/scripts/http-scan/scan-example new file mode 100755 index 0000000..1fe7f75 --- /dev/null +++ b/ncat/docs/examples/scripts/http-scan/scan-example @@ -0,0 +1,7 @@ +NCAT_PATH=../../../.. +if [ -a "$NCAT_PATH/ncat" ] + then + for addr in `cat iplist`; do $NCAT_PATH/ncat --disable-eof-exit $addr 80 < get.request; done; +else + echo "Ncat is not buit. Please build Ncat before you use these scripts"; +fi diff --git a/ncat/docs/examples/scripts/http-scan/scanner-output b/ncat/docs/examples/scripts/http-scan/scanner-output new file mode 100644 index 0000000..5c69d59 --- /dev/null +++ b/ncat/docs/examples/scripts/http-scan/scanner-output @@ -0,0 +1,57 @@ +Connected to 66.102.9.147:80 +HTTP/1.0 302 Found +Location: http://www.google.co.uk/ +Set-Cookie: PREF=ID=b6262fee80b28ffc:TM=1137945347:LM=1137945347:S=s7TLf6mcMNGW-33R; expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com +Content-Type: text/html +Server: GWS/2.1 +Content-Length: 224 +Date: Sun, 22 Jan 2006 15:55:47 GMT +Connection: Keep-Alive + +Connected to 207.46.198.30:80 +HTTP/1.1 200 OK +Connection: close +Date: Sun, 22 Jan 2006 15:55:48 GMT +Server: Microsoft-IIS/6.0 +P3P: CP="ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI" +X-Powered-By: ASP.NET +X-AspNet-Version: 2.0.50727 +Cache-Control: private +Content-Type: text/html; charset=utf-8 +Content-Length: 21061 + +Connected to 209.237.227.195:80 +HTTP/1.1 200 OK +Date: Sun, 22 Jan 2006 15:55:48 GMT +Server: Apache/2.2.0 (Unix) +Last-Modified: Wed, 18 Jan 2006 03:00:54 GMT +ETag: "997bf1-2d93-419e2580" +Accept-Ranges: bytes +Content-Length: 11667 +Cache-Control: max-age=86400 +Expires: Mon, 23 Jan 2006 15:55:48 GMT +Connection: close +Content-Type: text/html; charset=ISO-8859-1 + +Connected to 216.136.204.117:80 +HTTP/1.1 200 OK +Date: Sun, 22 Jan 2006 15:55:49 GMT +Server: Apache/1.3.x LaHonda (Unix) +Last-Modified: Fri, 20 Jan 2006 21:24:33 GMT +ETag: "26f8f7-9839-43d15511" +Accept-Ranges: bytes +Content-Length: 38969 +Connection: close +Content-Type: text/html +X-Pad: avoid browser bug + +Connected to 17.112.152.32:80 +HTTP/1.0 200 OK +Age: 328 +Date: Sun, 22 Jan 2006 15:50:20 GMT +Content-Length: 26131 +Content-Type: text/html +Expires: Sun, 22 Jan 2006 16:10:20 GMT +Cache-Control: max-age=1200 +Server: Apache/1.3.29 (Darwin) PHP/4.3.1 + diff --git a/ncat/docs/ncat-ascii-art.txt b/ncat/docs/ncat-ascii-art.txt new file mode 100644 index 0000000..1621079 --- /dev/null +++ b/ncat/docs/ncat-ascii-art.txt @@ -0,0 +1,11 @@ + . . + \`-"'"-'/ + } 6 6 { + ==. Y ,== + /^^^\ . + / \ ) Ncat: A modern interpretation of classic Netcat + ( )-( )/ + -""---""--- / + / Ncat \_/ + ( ____ + \_.=|____E diff --git a/ncat/docs/ncat.1 b/ncat/docs/ncat.1 new file mode 100644 index 0000000..7fbc5b5 --- /dev/null +++ b/ncat/docs/ncat.1 @@ -0,0 +1,787 @@ +'\" t +.\" Title: Ncat +.\" Author: [see the "Authors" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/17/2023 +.\" Manual: Ncat Reference Guide +.\" Source: Ncat +.\" Language: English +.\" +.TH "NCAT" "1" "05/17/2023" "Ncat" "Ncat Reference Guide" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ncat \- Concatenate and redirect sockets +.SH "SYNOPSIS" +.HP \w'\fBncat\fR\ 'u +\fBncat\fR [\fIOPTIONS\fR...] [\fIhostname\fR] [\fIport\fR] +.SH "DESCRIPTION" +.PP +Ncat is a feature\-packed networking utility which reads and writes data across networks from the command line\&. Ncat was written for the Nmap Project and is the culmination of the currently splintered family of Netcat incarnations\&. It is designed to be a reliable back\-end tool to instantly provide network connectivity to other applications and users\&. Ncat will not only work with IPv4 and IPv6 but provides the user with a virtually limitless number of potential uses\&. +.PP +Among Ncat\*(Aqs vast number of features there is the ability to chain Ncats together; redirection of TCP, UDP, and SCTP ports to other sites; SSL support; and proxy connections via SOCKS4, SOCKS5 or HTTP proxies (with optional proxy authentication as well)\&. Some general principles apply to most applications and thus give you the capability of instantly adding networking support to software that would normally never support it\&. +.SH "OPTIONS SUMMARY" +.PP +.if n \{\ +.RS 4 +.\} +.nf +Ncat 7\&.94 ( https://nmap\&.org/ncat ) +Usage: ncat [options] [hostname] [port] + +Options taking a time assume seconds\&. Append \*(Aqms\*(Aq for milliseconds, +\*(Aqs\*(Aq for seconds, \*(Aqm\*(Aq for minutes, or \*(Aqh\*(Aq for hours (e\&.g\&. 500ms)\&. + \-4 Use IPv4 only + \-6 Use IPv6 only + \-U, \-\-unixsock Use Unix domain sockets only + \-\-vsock Use vsock sockets only + \-C, \-\-crlf Use CRLF for EOL sequence + \-c, \-\-sh\-exec Executes the given command via /bin/sh + \-e, \-\-exec Executes the given command + \-\-lua\-exec Executes the given Lua script + \-g hop1[,hop2,\&.\&.\&.] Loose source routing hop points (8 max) + \-G Loose source routing hop pointer (4, 8, 12, \&.\&.\&.) + \-m, \-\-max\-conns Maximum simultaneous connections + \-h, \-\-help Display this help screen + \-d, \-\-delay