Comments for netcat
28 Sep 2003 15:29
IPv6 Port
I had a problem compiling the IPv6 version on FreeBSD 5.0. Changed the following to make it work:
first_port = strtoul (argv[optind], &tail, 0);
if (first_port > USHRT_MAX || *tail || first_port == 0)
bail ("invalid port %s", argv[optind]);
last_port = strtoul (cp, &tail, 0);
if (last_port > USHRT_MAX || *tail || last_port == 0)
bail ("invalid port %s", cp);
Change USHRT_MAX to 65535, then compile. Works like a charm.
18 Sep 2003 02:16
Re: Compile error
>
> % When I compile netcat on Linux it gives
> % me this errors:
> %
> % /tmp/cccUSCm5.o: In function `main':
> % /tmp/cccUSCm5.o(.text+0x1b1a): undefined
> % reference to `res_init'
> % collect2: ld returned 1 exit status
> %
>
>
> Check the comments a little down the
> page titled 'compile for linux.' The
> error you mention goes away by adding
> 'include resolv.h' to netcat.c
>
The debian guys have a whole bunch of patches for netcat
get ftp.debian.org/debian/...
installation, in netcat dir:
zcat ~/src/netcat_1.10-23.diff.gz | patch
for i in `cat 00list` ; do cat $i.dpatch | patch;done
04 Jul 2003 12:28
Re: Compile error
> When I compile netcat on Linux it gives
> me this errors:
>
> /tmp/cccUSCm5.o: In function `main':
> /tmp/cccUSCm5.o(.text+0x1b1a): undefined
> reference to `res_init'
> collect2: ld returned 1 exit status
>
Check the comments a little down the page titled 'compile for linux.' The error you mention goes away by adding 'include resolv.h' to netcat.c
05 Jun 2003 02:50
Compile error
When I compile netcat on Linux it gives me this errors:
/tmp/cccUSCm5.o: In function `main':
/tmp/cccUSCm5.o(.text+0x1b1a): undefined reference to `res_init'
collect2: ld returned 1 exit status
07 Dec 2002 06:43
A patch for Netcat
We made a patch for Netcat that provides a TCP connection between Client and Server, and lets the Client the possibility to specify the file which it is interested in.
This patch is available at
utenti.quipo.it/claudi...
20 Jan 2002 22:22
Re: Compil for Linux
> On redhat 7.2 :
>
> include "resolv.h"
and do not forget to create a directory, in case you don't want to overwrite any Makefile's or README's you might have on the directory you'll extract the contents of nc*.tgz :-)
18 Jan 2002 13:47
Compil for Linux
On redhat 7.2 :
include "resolv.h"
Re: IPv6 Port
> Change USHRT_MAX to 65535, then compile.
> Works like a charm.
Or include limits.h. Silly me.