summaryrefslogtreecommitdiff
path: root/usr.bin/nc/netcat.c
AgeCommit message (Collapse)Author
2002-07-04 correct handling of EOF on both tty input and network. for example,Vincent Labrecque
this allows stuff like nc -l 10101 < /dev/null to have nc exit automatically when it gets EOF from the network. ok ericj@
2002-07-01define SUN_LEN if it is not already for portability.Vincent Labrecque
millert made the same suggestion, so i guess it's ok ;)
2002-07-01use SUN_LEN to calculate AF_UNIX sockaddr's length. + some styleVincent Labrecque
ok ericj@
2002-05-30Avoid spinning poll, and while we're at it more closely reproduce theHugh Graham
original netcat's timeout behaviour. Theo says go.
2002-05-29more snprintfTheo de Raadt
2002-03-10check that we got the port before trying to listenEric Jackson
pr 2436; Alexander Yurchenko <grange@rt.mipt.ru>
2002-02-28add support for SOCKS4 with option -X socks_version, default is 5; ok ericj@Markus Friedl
2002-02-19-Wall cleanup.Eric Jackson
from Kevin Steves <stevesk@pobox.com>
2002-02-17Manual cleanup of remaining userland __P use (excluding packages maintained ↵Todd C. Miller
outside the tree)
2002-02-17oops, add -U to usageEric Jackson
2002-02-17add support for connecting too and listening on AF_UNIX sockets.Eric Jackson
connect support from dave@arbor.net.. rest by me
2002-02-17fix pr#2091. patch applied.Eric Jackson
patch from Brian J. Kifiak <bk@rt.fm> should be looked at closer..
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2001-10-28remove bogus error-check, resolve pr#2147Jakob Schlyter
2001-10-28fix getaddrinfo error handlingJakob Schlyter
2001-09-02KNF + ansiJakob Schlyter
2001-09-02update command summaryJakob Schlyter
2001-09-02remove unused variableJakob Schlyter
2001-09-02add very basic proxy support using socks5 client code from niklas@.Jakob Schlyter
ok ericj@.
2001-08-25use callocEric Jackson
2001-08-02fix diagnostic messagesEric Jackson
from Dima Dorfman <dima@unixfreak.org>
2001-06-27more magic stuff to define'sEric Jackson
2001-06-27Spit out errno message instead of just exitting. ericj@ ok.smart
2001-06-27Compile cleanly with -Wallsmart
2001-06-26remove some unused var's.Eric Jackson
from jasoni@
2001-06-26allow -k for udp and tcpEric Jackson
2001-06-26be weary of atoi().Eric Jackson
suggested by theo.. also do range checking on ports
2001-06-26dont set the source address to 127.0.0.1 if a local port is specifiedEric Jackson
but no source address reported by jakob@
2001-06-26rewrite telnet negotiationEric Jackson
2001-06-26rename variable, as not to conflictEric Jackson
2001-06-26type in usage: Surpress -> Suppressjasoni
2001-06-25Import completely re-written netcat w/ support for IPv6.Eric Jackson
very little usage has changed, man page soon to come for it as well. deraadt@ ok
2001-05-04GAPING_SECURITY_HOLE was removed so there is no -e option.Todd C. Miller
Removed from man page and usage; closes PR 1808
2001-01-16fix verbosity levels. pointed out by J.D. Carlson <jd@noc7.uchsc.edu>Eric Jackson
2000-12-01-Wall cleanupEric Jackson
2000-09-26more cleanup and have nlog() deal with errno now as well.Eric Jackson
2000-09-26no need to reset h_errnoEric Jackson
do the cmdline correctly, deal with \n and \t fix up nlog() use arc4random instead of srandom()/random()
2000-09-26fix minor typoEric Jackson
2000-09-26no need to use goto..Eric Jackson
2000-09-26Implement a function for errorsEric Jackson
it pays attention to h_error so we now have no need to handle this ourselves.
2000-09-26some warnings should only be shown with -vEric Jackson
2000-09-26Alot of cleanups to netcatEric Jackson
use errx/warn instead of homegrown functions indent properly to make the code readable get rid of generic.h as its not used dont declare optarg register is depreciated get rid of undocumented options -a and -e throw out IP_OPTIONS code for now, its not on by default and doesnt work properly make usage more like other bsd commands
2000-07-25a quick fix, and then i run away screaming in terrorTheo de Raadt
2000-07-07If the timeout is not set, don't send a zeroed timeout to select.Artur Grabowski
This solves the problem with nc hogging all cpu.
2000-07-06do not assume h_errs[] is clean, use %sTheo de Raadt
2000-01-31massive indent passTheo de Raadt
2000-01-24first cut at indent.. more to comeTheo de Raadt
1999-08-16include unistd.hArtur Grabowski
1999-06-05buf oflow; and use inet_aton()Theo de Raadt
1997-04-07paranoid about MAXHOSTNAMELENTheo de Raadt