Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Add -M and -m options to specify the outgoing and incoming minimum TTL | jca | 2016-06-28 | 2 | -9/+52 | |
| | | | | Req by and ok blumh@ | |||||
* | If an error path if close() is called, save errno so that original error | deraadt | 2016-06-28 | 1 | -5/+13 | |
| | | | | | is shown by errx ok millert krw | |||||
* | Be more careful initializing and tracking socket s through main, this is | deraadt | 2016-06-27 | 1 | -7/+6 | |
| | | | | | so complicated that a future refactoring could easily in introduce a bug. ok millert krw | |||||
* | whitespace | deraadt | 2016-06-27 | 1 | -2/+2 | |
| | ||||||
* | Let netcat support the use of service names instead of port numbers. | beck | 2016-06-02 | 2 | -18/+34 | |
| | | | | | based on a diff from Andras Farkas <deepbluemistake@gmail.com> ok deraadt@ | |||||
* | Fix pledge violation with -P s used and we need to supply a password | beck | 2016-05-28 | 1 | -3/+12 | |
| | | | | | | for an http proxy - we need tty in this case. Found and fixed by Anthony Coulter <bsd@anthonycoulter.name>. ok tb@ | |||||
* | Fix nc -verbose mode when used on a unix domain socket. | beck | 2016-05-28 | 1 | -5/+11 | |
| | | | | Noticed by and a modified version of fix from <attila@stalphonsos.com> | |||||
* | Use the correct values for TLS certificate / private key flags. | bcook | 2016-01-04 | 1 | -5/+5 | |
| | | | | fix from Andreas Bartelt <obsd at bartula.de> | |||||
* | include time.h over sys/time.h for ctime(3) | bcook | 2015-12-28 | 1 | -2/+2 | |
| | | | | ok beck@ | |||||
* | Add missing colon after "Peer name" in verbose output. Mentioned on the | mmcc | 2015-12-17 | 1 | -2/+2 | |
| | | | | lists recently. | |||||
* | clean up some unused variables, and add the printing of the certificate validity | beck | 2015-12-16 | 1 | -4/+7 | |
| | | | | | to the verbose output when using tls - from rob@2keys.ca ok mmcc@ jsing@ deraadt@ | |||||
* | Specify SOCKS version in error messages. ok deraadt@ | mmcc | 2015-12-10 | 1 | -3/+3 | |
| | ||||||
* | Map SOCKS error codes to error strings. With input from deraadt@ | mmcc | 2015-12-10 | 1 | -5/+61 | |
| | ||||||
* | pledge nc better - Load the certificate into memory and then do the pledge, | beck | 2015-12-08 | 1 | -5/+21 | |
| | | | | | this allows us to drop the rpath fromt the nc pledge. ok deraadt@, tedu@ | |||||
* | Get rid of modulo bias and replace the naive shuffle by the | tb | 2015-12-07 | 1 | -20/+16 | |
| | | | | | | | | Knuth-Fisher-Yates shuffle to make the random sequence of ports less biased. Based on the implementation in sys/netinet/ip_id.c. With helpful input from daniel@ and beck@ ok beck@ despite eye twitching | |||||
* | rename variable 'sun' to allow building on Solaris | bcook | 2015-11-23 | 1 | -13/+13 | |
| | | | | ok deraadt@ | |||||
* | Since rtable was hoisted to the top with setrtable, it should have no | deraadt | 2015-11-13 | 1 | -10/+7 | |
| | | | | | bearing on the following pledge setups anymore. ok benno | |||||
* | with -V argument, dont set rtable on the socket, instead set if for the whole | benno | 2015-11-12 | 1 | -15/+4 | |
| | | | | | | | | | process, before pledge(). This way the rtable can be pledged too. the discussion about removing -V is postponed. diff from beck@, i wrote the same diff without seeing his, and various people at u2k15 agreed this is the right thing to do. ok phessler@ | |||||
* | KNF; from Rob Pierce | deraadt | 2015-11-01 | 1 | -3/+3 | |
| | ||||||
* | Initial pledge of netcat - unfortunately flawed because fiddling the rtableid | beck | 2015-10-23 | 1 | -1/+27 | |
| | | | | | | | in a socket option can be pretty scary and there is no better interface for this. so if the -V option is used you get no pledge at all.. Otherwise, do what works for the various options. Still needs refinement for tls to drop rpath, and a better solution for the routing table stuff | |||||
* | Userspace doesn't need to use SUN_LEN(): connect() and bind() must accept | guenther | 2015-10-11 | 1 | -8/+3 | |
| | | | | | | sizeof(struct sockaddr_un), so do the simple, portable thing ok beck@ deraadt@ | |||||
* | avoid trailing .Ns, reduce .Xo and .Sm, drop redundant .Bk | schwarze | 2015-09-25 | 1 | -12/+4 | |
| | ||||||
* | display negotiated TLS version and cipher suite in verbose mode. | beck | 2015-09-13 | 1 | -2/+3 | |
| | | | | ok jsing@ | |||||
* | Adapt to just committed libtls api change | beck | 2015-09-12 | 1 | -21/+14 | |
| | ||||||
* | use SOCK_CLOEXEC instead of fnctl; ok guenther beck jsing | deraadt | 2015-09-12 | 1 | -12/+16 | |
| | ||||||
* | fix previous; | jmc | 2015-09-12 | 2 | -31/+48 | |
| | ||||||
* | spaces found during a read | deraadt | 2015-09-11 | 1 | -19/+18 | |
| | ||||||
* | Add TLS suppport to nc. Provides a useful little test and script tool. | beck | 2015-09-11 | 3 | -45/+346 | |
| | | | | ok jsing@ bluhm@ | |||||
* | Netcat could hang during write(2) although poll(2) reports that the | bluhm | 2015-09-08 | 1 | -15/+6 | |
| | | | | | | | | | socket is writeable. This happens because netcat tries to write more than the low water mark of the socket write buffer. With a non-blocking socket you may get a short write, otherwise it blocks. The latter could cause a total hang of the netcat process depending on the upper protocol. So make the network connection non-blocking. OK claudio@ millert@ | |||||
* | synchronize synopsis and usage. | sobrado | 2015-09-03 | 1 | -2/+2 | |
| | ||||||
* | remove unused variable | chl | 2015-07-26 | 1 | -2/+2 | |
| | | | | ok tedu@ | |||||
* | The code in socks.c writes multiple times in a row to a socket. If the | tobias | 2015-03-26 | 1 | -3/+6 | |
| | | | | | | | | | socket becomes invalid between these calls (e.g. connection closed), write will throw SIGPIPE. With this patch, SIGPIPE is ignored so we can handle write's -1 return value (errno will be EPIPE). Ultimately, it leads to program exit, too -- but with nicer error message. :) with input by and ok djm | |||||
* | Fix error message in case of write failure. | tobias | 2015-03-26 | 1 | -3/+3 | |
| | | | | ok djm | |||||
* | Check for short writes in fdpass(). Clean up while at it. | tobias | 2015-03-26 | 1 | -4/+3 | |
| | | | | ok djm | |||||
* | Sync camel case of "ProxyUseFdpass" with ssh_config(5). | tobias | 2015-03-26 | 1 | -3/+3 | |
| | | | | ok djm | |||||
* | Support for nc -T on IPv6 addresses. | jca | 2015-02-14 | 1 | -7/+16 | |
| | | | | ok sthen@ | |||||
* | my mistake. we already did increase buffers to 16k; increasing to 64k | tedu | 2014-10-30 | 1 | -2/+2 | |
| | | | | would be the next stage of embiggening. restore 16k. | |||||
* | rework the poll loop to poll in both directions so it doesn't get stuck | tedu | 2014-10-30 | 1 | -47/+211 | |
| | | | | | if one pipe stalls out. from a diff by Arne Becker. (buffer size left alone for now) | |||||
* | POLLIN is not guaranteed to be set in revents for EOF so check for | millert | 2014-10-26 | 1 | -3/+3 | |
| | | | | POLLHUP too. OK deraadt@ | |||||
* | Remove unnecessary include: netinet/in_systm.h is not needed by these | lteo | 2014-10-24 | 1 | -2/+1 | |
| | | | | | | programs. ok deraadt@ millert@ | |||||
* | Make sure the correct errno is reported by warn* or err* and not | guenther | 2014-07-20 | 1 | -2/+3 | |
| | | | | | | the errno of an intervening cleanup operation like close/unlink/etc. Diff from Doug Hogan (doug (at) acyclic.org) | |||||
* | stick with 16k buffers for a little while to avoid bufferbloat. | tedu | 2014-06-10 | 1 | -2/+2 | |
| | | | | | atomicio writing out 64k in one direction will cause traffic in the other direction to stall until it's complete. discussion with deraadt | |||||
* | increase buffer size to 64k, and actually use it. ok deraadt | tedu | 2014-06-10 | 1 | -3/+3 | |
| | | | | from John-Mark Gurney | |||||
* | Use errc/warnc to simplify code. | guenther | 2014-05-20 | 1 | -2/+2 | |
| | | | | | | Also, in 'ftp', always put the error message last, after the hostname/ipaddr. ok jsing@ krw@ millert@ | |||||
* | Unbreak nc -6 -l. Don't retrieve and thus later set the routing table | jca | 2014-03-12 | 1 | -3/+2 | |
| | | | | | unless -V is passed (intent of the previous commit), and use SOL_SOCKET instead of IPPROTO_IP to set the rtable in local_listen(). ok sthen@ | |||||
* | Once more, the default routing table id is inherited from the process | claudio | 2014-02-26 | 1 | -3/+2 | |
| | | | | like for any other process as well. OK by many | |||||
* | one of the examples needs -N to work again; | jmc | 2014-02-10 | 1 | -3/+3 | |
| | | | | | | | the paper trail appears to be: reported in feebsd pr docs/185353 by rol robert-eckardt de fix suggested by peter wemm diff submitted to tech by allan jude | |||||
* | Only use setsockopt(..SO_RTABLE..) if the -V flag is given to nc/telnet, | sthen | 2013-10-26 | 1 | -7/+7 | |
| | | | | | same style as traceroute6 (change to int and use -1 as a flag, so rtable 0 can still be used as an explicit parameter). | |||||
* | Oups, a little bit overzealous. If we "route -T4 exec telnet foo", then | phessler | 2013-10-21 | 1 | -1/+2 | |
| | | | | make sure telnet runs in rdomain 4 as expected. Same for nc. | |||||
* | Set the requested rdomain on the socket instead of only on the IPv4 part. | phessler | 2013-10-21 | 1 | -11/+7 | |
| | | | | Also, switching to rdomain zero is a legit option so we should allow that. |