Nick - 2004-09-17

and here is how to fix the build:

make linux # gives this output:
farm9crypt.h:14:57: warning: no newline at end of file
farm9crypt.cc: In function `int farm9crypt_read(int, char*, int)':
farm9crypt.cc:137: `memcpy' undeclared (first use this function)
farm9crypt.cc:137: (Each undeclared identifier is reported only once for each
   function it appears in.)
farm9crypt.cc: In function `int farm9crypt_write(int, char*, int)':
farm9crypt.cc:148: `strlen' undeclared (first use this function)
make[1]: *** [farm9crypt.o] Error 1
make[1]: Leaving directory `/root/cryptcat'
make: *** [linux] Error 2

# edit farm9crypt.h and write inside the following line
#include <string.h>

make linux # now produces:
make -e cryptcat  XFLAGS='-DLINUX' STATIC=-static
make[1]: Entering directory `/root/cryptcat'
cc -O -c farm9crypt.cc
cc -O -c twofish2.cc
cc -O -s         -DGAPING_SECURITY_HOLE -DLINUX -static -o cryptcat netcat.c farm9crypt.o twofish2.o
/tmp/ccaQqbyS.o(.text+0x156f): In function `main':
: undefined reference to `res_init'
farm9crypt.o(.text+0x2b): In function `farm9crypt_init':
: undefined reference to `operator new(unsigned)'
farm9crypt.o(.text+0x62): In function `farm9crypt_init':
: undefined reference to `operator new(unsigned)'
farm9crypt.o(.text+0x95): In function `farm9crypt_init':
: undefined reference to `operator delete(void*)'
farm9crypt.o(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
twofish2.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
make[1]: *** [cryptcat] Error 1
make[1]: Leaving directory `/root/cryptcat'
make: *** [linux] Error 2

# inside netcat.c remove the code around the
# res_init function (so that it isn't called)

rm -f farm9crypt.o
g++ -O -c farm9crypt.c
gcc -O -c netcat.c
g++ -O -s         -DGAPING_SECURITY_HOLE -DLINUX -static -o cryptcat netcat.o farm9crypt.o twofish2.o

# WOHOOO, cryptcat built successfully

Nick