This is GUN-PFFM the Grand Unified Nepentis Patch For FreeBSD and MacOSX. It allowes Nephentis CVS dated 2005-08-07 to be compiled on FreeBSD and MacOS X (with Darwinports). It allowes obmission of the PostgreSQL submission module (make WITHOUT_POSTGRES=yes) and it is much cleaner than my previous FreeBSD patch - mainly by splitting the Makefiles. --Maximillian Dornseif diff -rbNu nepenthes-20050807/Makefile nepenthes-md/Makefile --- nepenthes-20050807/Makefile 2005-07-13 00:34:37.000000000 +0200 +++ nepenthes-md/Makefile 2005-08-07 23:17:25.000000000 +0200 @@ -2,46 +2,39 @@ # Paul Baecher, Markus Koetter # $Id: nepenthes-20050807-freebsd+macosx.patch 750 2005-08-13 20:28:39Z md $ -# -# compiler flags -# - -CXX = g++ -CXXFLAGS += -Icore/include -CXXFLAGS += -D _GNU_SOURCE -Wall -Werror - -ifndef NDEBUG -CXXFLAGS += -g -endif - -# -# linker flags -# - -LDFLAGS = -ldl -lmagic -ladns +# get general configuration +include buildconfig.mk # # what makes a complete nepenthes build? # -MODULES += x-1 x-2 x-3 x-4 x-5 x-6 x-7 +MODULES += x-1 x-2 x-3 x-4 x-6 x-7 MODULES += download-tftp download-csend download-curl download-nepenthes download-ftp MODULES += shellcode-generic MODULES += vuln-dcom vuln-wins vuln-optix vuln-sub7 vuln-bagle vuln-mydoom vuln-kuang2 vuln-lsass vuln-mssql vuln-asn1 vuln-iis vuln-msmq vuln-netbiosname MODULES += vuln-netdde vuln-upnp vuln-sasserftpd -MODULES += submit-file submit-norman submit-nepenthes submit-postgres +MODULES += submit-file submit-norman submit-nepenthes MODULES += shellemu-winnt - MODULES += log-download log-irc # MODULES += log-prelude +ifndef WITHOUT_POSTGRES +MODULED += submit-postgres +endif + +ifndef MacOSX +# x-5 has issues with the MacOS X dynamic linker - so only add it on other plattforms +MODULES += x-5 +endif + # # Version? # VERSION := $(shell if test -d .svn; then svnversion .; fi) ifndef VERSION -VERSION := unknown +VERSION := $(shell date "+%Y%m%dT%H%M%S") endif ifdef RELEASE @@ -79,6 +72,7 @@ # nepenthes: $(CORE_OBJ) + mkdir -p ./bin $(CXX) $(CXXFLAGS) -o bin/$@ $(CORE_OBJ) $(LDFLAGS) # @@ -89,6 +83,10 @@ rm -f core/src/*.o bin/nepenthes clean_modules: - $(foreach mod, $(MODULES), make clean -C modules/$(mod);) + $(foreach mod, $(MODULES), $(MAKE) clean -C modules/$(mod);) + +clean_editfiles: + find . -name '*~' -exec rm {} \; + find . -name '*bak' -exec rm {} \; -clean: clean_core clean_modules +clean: clean_core clean_modules clean_editfiles diff -rbNu nepenthes-20050807/buildconfig.mk nepenthes-md/buildconfig.mk --- nepenthes-20050807/buildconfig.mk 1970-01-01 01:00:00.000000000 +0100 +++ nepenthes-md/buildconfig.mk 2005-08-07 13:04:35.000000000 +0200 @@ -0,0 +1,42 @@ +# nepenthes Makefile - generic configuration +# Paul Baecher, Maximillian Dornseif, Markus Koetter +# $Id: nepenthes-20050807-freebsd+macosx.patch 750 2005-08-13 20:28:39Z md $ + +# +# compiler flags +# + +CXX = g++ +CXXFLAGS += -Icore/include -I/usr/local/include/ -I/opt/local/include +CXXFLAGS += -pipe -D _GNU_SOURCE -Wall -Werror +# this is mostly for the modules +CXXFLAGS += -I../../core/include -I../../core/src -I/usr/include/lua + +ifndef NDEBUG +CXXFLAGS += -g +endif + +ifdef PROFILE +CXXFLAGS += -pg +endif + + +# +# linker flags +# + +LDFLAGS = -L/usr/local/lib -L/opt/local/lib -ldl -lmagic -ladns +SHARED = -shared + +ifdef FreeBSD +LDFLAGS = -L/usr/local/lib -lmagic -ladns -lz +MAKE = gmake +endif + +ifdef MacOSX +MAKE = gmake +SHARED = -dynamiclib +endif + + + diff -rbNu nepenthes-20050807/compat/magic.h nepenthes-md/compat/magic.h --- nepenthes-20050807/compat/magic.h 1970-01-01 01:00:00.000000000 +0100 +++ nepenthes-md/compat/magic.h 2005-08-06 11:24:53.000000000 +0200 @@ -0,0 +1,71 @@ +/* copied over from FreeBSD 5.4 /usr/src/contrib/file/magic.h */ + +/* + * Copyright (c) Christos Zoulas 2003. + * All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice immediately at the beginning of the file, without modification, + * this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +#ifndef _MAGIC_H +#define _MAGIC_H + +#include + +#define MAGIC_NONE 0x000 /* No flags */ +#define MAGIC_DEBUG 0x001 /* Turn on debugging */ +#define MAGIC_SYMLINK 0x002 /* Follow symlinks */ +#define MAGIC_COMPRESS 0x004 /* Check inside compressed files */ +#define MAGIC_DEVICES 0x008 /* Look at the contents of devices */ +#define MAGIC_MIME 0x010 /* Return a mime string */ +#define MAGIC_CONTINUE 0x020 /* Return all matches */ +#define MAGIC_CHECK 0x040 /* Print warnings to stderr */ +#define MAGIC_PRESERVE_ATIME 0x080 /* Restore access time on exit */ +#define MAGIC_RAW 0x100 /* Don't translate unprintable chars */ +#define MAGIC_ERROR 0x200 /* Handle ENOENT etc as real errors */ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct magic_set *magic_t; +magic_t magic_open(int); +void magic_close(magic_t); + +const char *magic_file(magic_t, const char *); +const char *magic_buffer(magic_t, const void *, size_t); + +const char *magic_error(magic_t); +int magic_setflags(magic_t, int); + +int magic_load(magic_t, const char *); +int magic_compile(magic_t, const char *); +int magic_check(magic_t, const char *); +int magic_errno(magic_t); + +#ifdef __cplusplus +}; +#endif + +#endif /* _MAGIC_H */ diff -rbNu nepenthes-20050807/core/include/DNSManager.hpp nepenthes-md/core/include/DNSManager.hpp --- nepenthes-20050807/core/include/DNSManager.hpp 2005-07-12 23:48:10.000000000 +0200 +++ nepenthes-md/core/include/DNSManager.hpp 2005-08-07 11:38:18.000000000 +0200 @@ -33,6 +33,10 @@ #include #endif +#if defined(__FreeBSD__) || defined(__APPLE__) +#include +#endif + #include "Manager.hpp" #include "EventHandler.hpp" diff -rbNu nepenthes-20050807/core/include/DownloadManager.hpp nepenthes-md/core/include/DownloadManager.hpp --- nepenthes-20050807/core/include/DownloadManager.hpp 2005-07-12 23:48:10.000000000 +0200 +++ nepenthes-md/core/include/DownloadManager.hpp 2005-08-06 11:11:34.000000000 +0200 @@ -36,6 +36,10 @@ #include #endif +#if __FreeBSD__ +#include +#endif + #include #include diff -rbNu nepenthes-20050807/core/include/Nepenthes.hpp nepenthes-md/core/include/Nepenthes.hpp --- nepenthes-20050807/core/include/Nepenthes.hpp 2005-07-12 23:48:10.000000000 +0200 +++ nepenthes-md/core/include/Nepenthes.hpp 2005-08-06 11:11:34.000000000 +0200 @@ -36,6 +36,10 @@ #include #endif +#ifdef __FreeBSD__ +#include +#endif + typedef unsigned int uint; typedef unsigned char byte; diff -rbNu nepenthes-20050807/core/include/Socket.hpp nepenthes-md/core/include/Socket.hpp --- nepenthes-20050807/core/include/Socket.hpp 2005-07-12 23:48:10.000000000 +0200 +++ nepenthes-md/core/include/Socket.hpp 2005-08-07 11:39:22.000000000 +0200 @@ -34,6 +34,10 @@ #define socklen_t int #endif +#if defined(__FreeBSD__) || defined(__APPLE__) + #include +#endif + #include #include using namespace std; diff -rbNu nepenthes-20050807/core/include/SubmitManager.hpp nepenthes-md/core/include/SubmitManager.hpp --- nepenthes-20050807/core/include/SubmitManager.hpp 2005-07-12 23:48:10.000000000 +0200 +++ nepenthes-md/core/include/SubmitManager.hpp 2005-08-06 11:27:40.000000000 +0200 @@ -33,7 +33,11 @@ #ifdef WIN32 #else -#include + #ifdef __FreeBSD__ + #include "../../compat/magic.h" + #else + #include + #endif #endif #include "Manager.hpp" diff -rbNu nepenthes-20050807/core/include/TCPSocket.hpp nepenthes-md/core/include/TCPSocket.hpp --- nepenthes-20050807/core/include/TCPSocket.hpp 2005-07-12 23:48:10.000000000 +0200 +++ nepenthes-md/core/include/TCPSocket.hpp 2005-08-06 12:22:31.000000000 +0200 @@ -40,7 +40,7 @@ public: TCPSocket(Nepenthes *nepenthes, unsigned long localaddress, int port, time_t bindtimeout, time_t accepttimeout); // bind socket TCPSocket(Nepenthes *nepenthes, int socket, unsigned long localhost, int localport, unsigned long remotehost,int remoteport, time_t accepttimeout); // accept socket - TCPSocket(Nepenthes *nepenthes,unsigned long localhost, unsigned long remotehost, int remoteport, time_t connectiontimeout); // connect with timeout + TCPSocket(Nepenthes *nepenthes, unsigned long localhost, unsigned long remotehost, int remoteport, time_t connectiontimeout); // connect with timeout ~TCPSocket(); bool bindPort(); bool Init(); diff -rbNu nepenthes-20050807/core/src/Nepenthes.cpp nepenthes-md/core/src/Nepenthes.cpp --- nepenthes-20050807/core/src/Nepenthes.cpp 2005-07-12 23:48:11.000000000 +0200 +++ nepenthes-md/core/src/Nepenthes.cpp 2005-08-07 22:11:34.000000000 +0200 @@ -31,6 +31,12 @@ #else #include +#ifdef __APPLE__ +// Apple b0rked getopt parameters between unistd.h and getopt.h +// this define fixes it +#define _GETOPT 1 +#define HAVE_DECL_GETOPT 1 +#endif #include #endif @@ -38,6 +44,10 @@ #include #include +#ifdef __FreeBSD__ +#include +#endif + #include "Nepenthes.hpp" #include "SocketManager.hpp" #include "EventManager.hpp" @@ -460,7 +470,6 @@ */ signal(SIGBUS, SignalHandler); // 10,7,10 Core Bus error (bad memory access) - signal(SIGPOLL, SignalHandler); // Term Pollable event (Sys V). Synonym of SIGIO signal(SIGPROF, SignalHandler); // 27,27,29 Term Profiling timer expired signal(SIGSYS, SignalHandler); // 12,-,12 Core Bad argument to routine (SVID) signal(SIGTRAP, SignalHandler); // 5 Core Trace/breakpoint trap @@ -474,14 +483,19 @@ */ signal(SIGIOT, SignalHandler); // 6 Core IOT trap. A synonym for SIGABRT // signal(SIGEMT, SignalHandler); // 7,-,7 Term - signal(SIGSTKFLT,SignalHandler); // -,16,- Term Stack fault on coprocessor (unused) signal(SIGIO, SignalHandler); // 23,29,22 Term I/O now possible (4.2 BSD) - signal(SIGCLD, SignalHandler); // -,-,18 Ign A synonym for SIGCHLD - signal(SIGPWR, SignalHandler); // 29,30,19 Term Power failure (System V) -// signal(SIGINFO, SignalHandler); // 29,-,- A synonym for SIGPWR +// signal(SIGINFO, SignalHandler); // 29,-,- // signal(SIGLOST, SignalHandler); // -,-,- Term File lock lost signal(SIGWINCH, SIG_IGN ); // 28,28,20 Ign Window resize signal (4.3 BSD, Sun) + #if defined(__FreeBSD__) || defined(__APPLE__) + #else + // This seems Linux specific + signal(SIGPOLL, SignalHandler); // Term Pollable event (Sys V). Synonym of SIGIO + signal(SIGSTKFLT,SignalHandler); // -,16,- Term Stack fault on coprocessor (unused) + signal(SIGCLD, SignalHandler); // -,-,18 Ign A synonym for SIGCHLD + signal(SIGPWR, SignalHandler); // 29,30,19 Term Power failure (System V) signal(SIGUNUSED,SignalHandler); // -,31,- Term Unused signal (will be SIGSYS) + #endif #endif show_logo(); diff -rbNu nepenthes-20050807/core/src/SocketManager.cpp nepenthes-md/core/src/SocketManager.cpp --- nepenthes-20050807/core/src/SocketManager.cpp 2005-07-12 23:48:11.000000000 +0200 +++ nepenthes-md/core/src/SocketManager.cpp 2005-08-07 11:53:20.000000000 +0200 @@ -38,9 +38,13 @@ #include #include #include -#include #include #include + #if defined(__FreeBSD__) || defined(__APPLE__) + #include + #else + #include + #endif #endif @@ -786,7 +790,9 @@ if(sock == NULL) { - if ((sock = new TCPSocket(getNepenthes(), localhost, port, bindtimeout, accepttimeout)) == NULL ) + // This can bee seen as ambiguous - at least on FreeBSD. We want this: + // TCPSocket(Nepenthes *nepenthes, unsigned long localaddress, int port, time_t bindtimeout, time_t accepttimeout) + if ((sock = new TCPSocket(getNepenthes(), localhost, (int) port, (time_t) bindtimeout, (time_t) accepttimeout)) == NULL ) { logCrit("ERROR Binding %s:%i failed\n","",port); return NULL; @@ -824,7 +830,7 @@ if(sock == NULL) { - if ((sock = new TCPSocket(getNepenthes(), localhost, port, bindtimeout, accepttimeout)) == NULL ) + if ((sock = new TCPSocket(getNepenthes(), localhost, (int) port, bindtimeout, accepttimeout)) == NULL ) { logCrit("ERROR Binding %s:%i failed\n","",port); return NULL; @@ -863,7 +869,7 @@ if(sock == NULL) { - if ((sock = new UDPSocket(getNepenthes(), localhost, port, bindtimeout, accepttimeout)) == NULL ) + if ((sock = new UDPSocket(getNepenthes(), localhost, (int) port, bindtimeout, accepttimeout)) == NULL ) { logCrit("ERROR Binding %s:%i failed\n","",port); return NULL; diff -rbNu nepenthes-20050807/core/src/TCPSocket.cpp nepenthes-md/core/src/TCPSocket.cpp --- nepenthes-20050807/core/src/TCPSocket.cpp 2005-07-12 23:48:11.000000000 +0200 +++ nepenthes-md/core/src/TCPSocket.cpp 2005-08-07 11:54:16.000000000 +0200 @@ -388,7 +388,11 @@ #ifdef WIN32 int sended = send(m_Socket,packet->getData(), packet->getLength(), 0); #else + #if defined(__FreeBSD__) || defined(__APPLE__) + int sended = send(m_Socket,packet->getData(), packet->getLength(), SO_NOSIGPIPE); + #else int sended = send(m_Socket,packet->getData(), packet->getLength(), MSG_NOSIGNAL); + #endif #endif if(sended > 0) Binary files nepenthes-20050807/doc/.DS_Store and nepenthes-md/doc/.DS_Store differ diff -rbNu nepenthes-20050807/doc/README nepenthes-md/doc/README --- nepenthes-20050807/doc/README 2005-06-09 22:16:18.000000000 +0200 +++ nepenthes-md/doc/README 2005-08-06 11:11:34.000000000 +0200 @@ -111,7 +111,7 @@ - libmagic - libpcre - On debien just do + On debian just do apt-get install libcurl3-dev apt-get install libmagic-dev apt-get install libpcre3-dev diff -rbNu nepenthes-20050807/doc/README.freebsd nepenthes-md/doc/README.freebsd --- nepenthes-20050807/doc/README.freebsd 1970-01-01 01:00:00.000000000 +0100 +++ nepenthes-md/doc/README.freebsd 2005-08-07 12:26:57.000000000 +0200 @@ -0,0 +1,34 @@ +The port of nepenthes to FreeBSD was done by Maximillian Dornseif. + +The nephentis build process does not use POSIX Makefiles, so it +requires GNU make. In addition it needs a bunch of libraries. You +can get all you need by typing (as root): + +(cd /usr/ports/devel/gmake ; sudo make package) +(cd /usr/ports/dns/adns ; make package) +(cd /usr/ports/devel/pcre ; make package) +(cd /usr/ports/ftp/curl ; make package) +(cd /usr/ports/databases/postgresql80-client ; make package) + +It also needs libmagic.This is somewhat tricky since libmagic is part +of the FreeBSD base system but not the header file required to compile +nepenthes. For now we have just copied over the file from the kernel +source tree to compat/magic.h + +gmake FreeBSD=1 + +Notes: + +I used "g++ (GCC) 3.4.2 [FreeBSD] 20040728" which seemed to be more strict +than tha compiler used by the original authors. I have seen two kinds of +errors related to that: + +core/src/SocketManager.cpp:789: error: call of overloaded +'TCPSocket(nepenthes::Nepenthes*, long unsigned int&, unsigned int&, time_t&, time_t&)' is ambiguous +core/include/TCPSocket.hpp:43: note: candidates are: +nepenthes::TCPSocket::TCPSocket(nepenthes::Nepenthes*, long unsigned int, long unsigned int, int, time_t) +core/include/TCPSocket.hpp:41: note: +nepenthes::TCPSocket::TCPSocket(nepenthes::Nepenthes*, long unsigned int, int, time_t, time_t) + + +x-7.cpp:214: error: ISO C++ forbids cast to non-reference type used as lvalue diff -rbNu nepenthes-20050807/doc/README.macosx nepenthes-md/doc/README.macosx --- nepenthes-20050807/doc/README.macosx 1970-01-01 01:00:00.000000000 +0100 +++ nepenthes-md/doc/README.macosx 2005-08-07 22:30:39.000000000 +0200 @@ -0,0 +1,27 @@ +The port of nepenthes to MaxOS X 10.4.2 was done by Maximillian Dornseif. + +The nephentis build process does not use POSIX Makefiles, so it +requires GNU make. In addition it needs a bunch of libraries. I assume +you have installed DarwinPorts into /opt/local +You can get all needed libraries and tools by typing: + +sudo port install gmake +sudo port install adns +sudo port install file +sudo port install pcre +sudo port install curl +sudo port install postgresql8 + +gmake MacOSX=1 + +Notes: + +I used "powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 20041026 (Apple Computer, Inc. build 4061)" +which seemed to be more strict than tha compiler used by the original +authors but less strict than g++ 3.4 on FreeBSD. Except one format string +issue which I fixed. + +The main issue is that dynamic libraries and plug-ins are handled +completely different on MacOS X than on Linux & FreeBSD. The X-5 module +didn't compile due to this fact and I left it that way for fixing by +somebody who is fascinated by C++ and dynamic loading. \ No newline at end of file diff -rbNu nepenthes-20050807/modules/buildmodule.mk nepenthes-md/modules/buildmodule.mk --- nepenthes-20050807/modules/buildmodule.mk 1970-01-01 01:00:00.000000000 +0100 +++ nepenthes-md/modules/buildmodule.mk 2005-08-07 21:45:26.000000000 +0200 @@ -0,0 +1,17 @@ +# generic makefile for Modules + +LDFLAGS += $(SHARED) + +all: $(MODNAME) + +MOD_SOURCE := $(shell find . -iname '*.cpp') +MOD_OBJ = $(MOD_SOURCE:.cpp=.o) + +%.o: %.cpp + $(CXX) $(CXXFLAGS) -c -o $@ $< + +$(MODNAME): $(MOD_OBJ) + $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) + +clean: + rm -f *.o *.so diff -rbNu nepenthes-20050807/modules/download-csend/Makefile nepenthes-md/modules/download-csend/Makefile --- nepenthes-20050807/modules/download-csend/Makefile 2005-06-09 22:08:57.000000000 +0200 +++ nepenthes-md/modules/download-csend/Makefile 2005-08-07 12:22:37.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = download-csend -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk \ No newline at end of file diff -rbNu nepenthes-20050807/modules/download-curl/Makefile nepenthes-md/modules/download-curl/Makefile --- nepenthes-20050807/modules/download-curl/Makefile 2005-07-13 00:29:35.000000000 +0200 +++ nepenthes-md/modules/download-curl/Makefile 2005-08-07 21:52:24.000000000 +0200 @@ -4,30 +4,8 @@ # who am i? MODNAME = download-curl -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/src -I../../core/include -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared -lcurl +LDFLAGS += -lcurl -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk \ No newline at end of file diff -rbNu nepenthes-20050807/modules/download-ftp/Makefile nepenthes-md/modules/download-ftp/Makefile --- nepenthes-20050807/modules/download-ftp/Makefile 2005-06-09 22:08:57.000000000 +0200 +++ nepenthes-md/modules/download-ftp/Makefile 2005-08-07 13:07:13.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = download-ftp -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I../../core/src -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/download-nepenthes/Makefile nepenthes-md/modules/download-nepenthes/Makefile --- nepenthes-20050807/modules/download-nepenthes/Makefile 2005-06-09 22:10:49.000000000 +0200 +++ nepenthes-md/modules/download-nepenthes/Makefile 2005-08-07 13:07:38.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = download-nepenthes -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I../../core/src -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/download-nepenthes/download-nepenthes.conf nepenthes-md/modules/download-nepenthes/download-nepenthes.conf --- nepenthes-20050807/modules/download-nepenthes/download-nepenthes.conf 2005-06-09 22:16:18.000000000 +0200 +++ nepenthes-md/modules/download-nepenthes/download-nepenthes.conf 2005-08-06 20:52:07.000000000 +0200 @@ -2,6 +2,6 @@ { ports ("45678"); accepttimeout "60"; - filespath "/share/hda3/opt/nepenthes"; + filespath "/tmp/nepenthes"; }; diff -rbNu nepenthes-20050807/modules/download-tftp/Makefile nepenthes-md/modules/download-tftp/Makefile --- nepenthes-20050807/modules/download-tftp/Makefile 2005-06-09 22:10:49.000000000 +0200 +++ nepenthes-md/modules/download-tftp/Makefile 2005-08-07 13:07:34.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = download-tftp -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/log-download/Makefile nepenthes-md/modules/log-download/Makefile --- nepenthes-20050807/modules/log-download/Makefile 2005-07-13 00:30:06.000000000 +0200 +++ nepenthes-md/modules/log-download/Makefile 2005-08-07 13:08:48.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = log-download -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/src -I../../core/include -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/log-irc/Makefile nepenthes-md/modules/log-irc/Makefile --- nepenthes-20050807/modules/log-irc/Makefile 2005-06-09 22:10:50.000000000 +0200 +++ nepenthes-md/modules/log-irc/Makefile 2005-08-07 13:08:47.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = log-irc -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/src -I../../core/include -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/log-irc/log-irc.conf nepenthes-md/modules/log-irc/log-irc.conf diff -rbNu nepenthes-20050807/modules/log-prelude/Makefile nepenthes-md/modules/log-prelude/Makefile --- nepenthes-20050807/modules/log-prelude/Makefile 2005-06-09 22:10:50.000000000 +0200 +++ nepenthes-md/modules/log-prelude/Makefile 2005-08-07 13:08:45.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = log-prelude -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I/tmp/libprelude/include/libprelude -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared -lprelude -lnsl -lz -lgcrypt -lssl -lpthread -lcrypt -lprelude -L/tmp/libprelude/lib - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/shellcode-generic/Makefile nepenthes-md/modules/shellcode-generic/Makefile --- nepenthes-20050807/modules/shellcode-generic/Makefile 2005-07-13 00:30:53.000000000 +0200 +++ nepenthes-md/modules/shellcode-generic/Makefile 2005-08-07 21:45:27.000000000 +0200 @@ -6,28 +6,8 @@ CXX = g++ -CXXFLAGS += -I../../core/include -I../../core/src -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared -lpcre +include ../../buildconfig.mk -ifndef NDEBUG -CXXFLAGS += -g -endif +LDFLAGS += -lpcre -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/shellemu-winnt/Makefile nepenthes-md/modules/shellemu-winnt/Makefile --- nepenthes-20050807/modules/shellemu-winnt/Makefile 2005-06-09 22:10:50.000000000 +0200 +++ nepenthes-md/modules/shellemu-winnt/Makefile 2005-08-07 13:10:14.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = shellemu-winnt -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I../../core/src -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/submit-file/Makefile nepenthes-md/modules/submit-file/Makefile --- nepenthes-20050807/modules/submit-file/Makefile 2005-06-09 22:10:50.000000000 +0200 +++ nepenthes-md/modules/submit-file/Makefile 2005-08-07 13:09:33.000000000 +0200 @@ -6,28 +6,6 @@ CXX = g++ -CXXFLAGS += -I../../core/include -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared +include ../../buildconfig.mk -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/submit-file/submit-file.conf nepenthes-md/modules/submit-file/submit-file.conf --- nepenthes-20050807/modules/submit-file/submit-file.conf 2005-06-09 22:16:19.000000000 +0200 +++ nepenthes-md/modules/submit-file/submit-file.conf 2005-08-07 22:34:39.000000000 +0200 @@ -1,5 +1,5 @@ submit-file { - path "/tmp/"; + path "/tmp"; }; diff -rbNu nepenthes-20050807/modules/submit-nepenthes/Makefile nepenthes-md/modules/submit-nepenthes/Makefile --- nepenthes-20050807/modules/submit-nepenthes/Makefile 2005-07-13 00:31:31.000000000 +0200 +++ nepenthes-md/modules/submit-nepenthes/Makefile 2005-08-07 13:09:42.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = submit-nepenthes -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/submit-norman/Makefile nepenthes-md/modules/submit-norman/Makefile --- nepenthes-20050807/modules/submit-norman/Makefile 2005-07-13 00:32:03.000000000 +0200 +++ nepenthes-md/modules/submit-norman/Makefile 2005-08-07 21:57:26.000000000 +0200 @@ -4,30 +4,8 @@ # who am i? MODNAME = submit-norman -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/src -I../../core/include -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared -lcurl +LDFLAGS += -lcurl -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk \ No newline at end of file diff -rbNu nepenthes-20050807/modules/submit-norman/submit-norman.conf nepenthes-md/modules/submit-norman/submit-norman.conf --- nepenthes-20050807/modules/submit-norman/submit-norman.conf 2005-06-09 22:16:29.000000000 +0200 +++ nepenthes-md/modules/submit-norman/submit-norman.conf 2005-08-06 21:58:59.000000000 +0200 @@ -1,4 +1,4 @@ submit-norman { - email "foo@bar.org"; + email "mdornseif@mac.com"; }; diff -rbNu nepenthes-20050807/modules/submit-postgres/Makefile nepenthes-md/modules/submit-postgres/Makefile --- nepenthes-20050807/modules/submit-postgres/Makefile 2005-07-13 00:18:05.000000000 +0200 +++ nepenthes-md/modules/submit-postgres/Makefile 2005-08-07 22:24:41.000000000 +0200 @@ -4,30 +4,8 @@ # who am i? MODNAME = submit-postgres -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/src -I../../core/include -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared -lpq +LDFLAGS += -L/opt/local/lib/pgsql8 -lpq -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/submit-postgres/PostgresContext.cpp nepenthes-md/modules/submit-postgres/PostgresContext.cpp --- nepenthes-20050807/modules/submit-postgres/PostgresContext.cpp 2005-07-13 00:18:05.000000000 +0200 +++ nepenthes-md/modules/submit-postgres/PostgresContext.cpp 2005-08-07 22:19:54.000000000 +0200 @@ -29,7 +29,15 @@ /* $Id: nepenthes-20050807-freebsd+macosx.patch 750 2005-08-13 20:28:39Z md $ */ #include -#include +#ifdef __FreeBSD__ +#include +#else + #ifdef __APPLE__ + #include + #else + #include + #endif +#endif #include "PostgresContext.hpp" diff -rbNu nepenthes-20050807/modules/submit-postgres/submit-postgres.hpp nepenthes-md/modules/submit-postgres/submit-postgres.hpp --- nepenthes-20050807/modules/submit-postgres/submit-postgres.hpp 2005-07-13 00:18:05.000000000 +0200 +++ nepenthes-md/modules/submit-postgres/submit-postgres.hpp 2005-08-07 21:56:40.000000000 +0200 @@ -27,7 +27,16 @@ /* $Id: nepenthes-20050807-freebsd+macosx.patch 750 2005-08-13 20:28:39Z md $ */ -#include +#ifdef __FreeBSD__ +#include +#else + #ifdef __APPLE__ + #include + #else + #include + #endif +#endif + #include #include #include diff -rbNu nepenthes-20050807/modules/vuln-asn1/Makefile nepenthes-md/modules/vuln-asn1/Makefile --- nepenthes-20050807/modules/vuln-asn1/Makefile 2005-07-13 00:07:29.000000000 +0200 +++ nepenthes-md/modules/vuln-asn1/Makefile 2005-08-07 21:46:07.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = vuln-asn1 -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I../../core/src -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/vuln-bagle/Makefile nepenthes-md/modules/vuln-bagle/Makefile --- nepenthes-20050807/modules/vuln-bagle/Makefile 2005-07-13 00:32:32.000000000 +0200 +++ nepenthes-md/modules/vuln-bagle/Makefile 2005-08-07 21:46:00.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = vuln-bagle -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I../../core/src -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/vuln-dcom/Makefile nepenthes-md/modules/vuln-dcom/Makefile --- nepenthes-20050807/modules/vuln-dcom/Makefile 2005-07-13 00:32:59.000000000 +0200 +++ nepenthes-md/modules/vuln-dcom/Makefile 2005-08-07 21:53:05.000000000 +0200 @@ -4,30 +4,8 @@ # who am i? MODNAME = vuln-dcom -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I../../core/src -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared -lpcre +LDFLAGS += -lpcre -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/vuln-iis/Makefile nepenthes-md/modules/vuln-iis/Makefile --- nepenthes-20050807/modules/vuln-iis/Makefile 2005-07-13 00:09:17.000000000 +0200 +++ nepenthes-md/modules/vuln-iis/Makefile 2005-08-07 21:50:53.000000000 +0200 @@ -4,30 +4,8 @@ # who am i? MODNAME = vuln-iis -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/src -I../../core/include -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared -lpcre +LDFLAGS += -lpcre -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/vuln-kuang2/Makefile nepenthes-md/modules/vuln-kuang2/Makefile --- nepenthes-20050807/modules/vuln-kuang2/Makefile 2005-06-09 22:10:50.000000000 +0200 +++ nepenthes-md/modules/vuln-kuang2/Makefile 2005-08-07 21:46:35.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = vuln-kuang2 -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I../../core/src -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/vuln-lsass/LSASSDialogue.cpp nepenthes-md/modules/vuln-lsass/LSASSDialogue.cpp --- nepenthes-20050807/modules/vuln-lsass/LSASSDialogue.cpp 2005-06-09 22:10:50.000000000 +0200 +++ nepenthes-md/modules/vuln-lsass/LSASSDialogue.cpp 2005-08-07 22:16:38.000000000 +0200 @@ -202,7 +202,7 @@ case LSASS_HOD_REST: { - printf("sizeof(bindshell) %i \n",sizeof(lsass_hod_bindshell)); + printf("sizeof(bindshell) %lu \n", (long unsigned int) sizeof(lsass_hod_bindshell)); msg->getResponder()->doRespond(reply,64); Message *Msg = new Message((char *)m_Buffer->getData(), m_Buffer->getSize(), msg->getLocalPort(), msg->getRemotePort(), msg->getLocalHost(), msg->getRemoteHost(), msg->getResponder(), msg->getSocket()); diff -rbNu nepenthes-20050807/modules/vuln-lsass/Makefile nepenthes-md/modules/vuln-lsass/Makefile --- nepenthes-20050807/modules/vuln-lsass/Makefile 2005-06-09 22:10:50.000000000 +0200 +++ nepenthes-md/modules/vuln-lsass/Makefile 2005-08-07 22:17:00.000000000 +0200 @@ -4,30 +4,8 @@ # who am i? MODNAME = vuln-lsass -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I../../core/src -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared -lpcre +LDFLAGS += -lpcre -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/vuln-msmq/Makefile nepenthes-md/modules/vuln-msmq/Makefile --- nepenthes-20050807/modules/vuln-msmq/Makefile 2005-07-13 00:05:18.000000000 +0200 +++ nepenthes-md/modules/vuln-msmq/Makefile 2005-08-07 21:47:02.000000000 +0200 @@ -4,30 +4,8 @@ # who am i? MODNAME = vuln-msmq -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I../../core/src -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared -lpcre +LDFLAGS += -lpcre -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/vuln-mssql/Makefile nepenthes-md/modules/vuln-mssql/Makefile --- nepenthes-20050807/modules/vuln-mssql/Makefile 2005-07-13 00:00:50.000000000 +0200 +++ nepenthes-md/modules/vuln-mssql/Makefile 2005-08-07 21:47:12.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = vuln-mssql -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/vuln-mydoom/Makefile nepenthes-md/modules/vuln-mydoom/Makefile --- nepenthes-20050807/modules/vuln-mydoom/Makefile 2005-06-09 22:10:50.000000000 +0200 +++ nepenthes-md/modules/vuln-mydoom/Makefile 2005-08-07 21:47:18.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = vuln-mydoom -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I../../core/src -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/vuln-netbiosname/Makefile nepenthes-md/modules/vuln-netbiosname/Makefile --- nepenthes-20050807/modules/vuln-netbiosname/Makefile 2005-07-13 00:11:36.000000000 +0200 +++ nepenthes-md/modules/vuln-netbiosname/Makefile 2005-08-07 21:47:26.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = vuln-netbiosname -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/src -I../../core/include -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/vuln-netdde/Makefile nepenthes-md/modules/vuln-netdde/Makefile --- nepenthes-20050807/modules/vuln-netdde/Makefile 2005-07-13 00:03:39.000000000 +0200 +++ nepenthes-md/modules/vuln-netdde/Makefile 2005-08-07 22:17:29.000000000 +0200 @@ -4,30 +4,8 @@ # who am i? MODNAME = vuln-netdde -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I../../core/src -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared -lpcre +LDFLAGS += -lpcre -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/vuln-optix/Makefile nepenthes-md/modules/vuln-optix/Makefile --- nepenthes-20050807/modules/vuln-optix/Makefile 2005-06-09 22:10:50.000000000 +0200 +++ nepenthes-md/modules/vuln-optix/Makefile 2005-08-07 21:51:22.000000000 +0200 @@ -4,30 +4,8 @@ # who am i? MODNAME = vuln-optix -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I../../core/src -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared -lpcre +LDFLAGS += -lpcre -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/vuln-sasserftpd/Makefile nepenthes-md/modules/vuln-sasserftpd/Makefile --- nepenthes-20050807/modules/vuln-sasserftpd/Makefile 2005-07-12 23:56:58.000000000 +0200 +++ nepenthes-md/modules/vuln-sasserftpd/Makefile 2005-08-07 22:17:54.000000000 +0200 @@ -4,30 +4,8 @@ # who am i? MODNAME = vuln-sasserftpd -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I../../core/src -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared -lpcre +LDFLAGS += -lpcre -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/vuln-sub7/Makefile nepenthes-md/modules/vuln-sub7/Makefile --- nepenthes-20050807/modules/vuln-sub7/Makefile 2005-06-09 22:11:08.000000000 +0200 +++ nepenthes-md/modules/vuln-sub7/Makefile 2005-08-07 21:47:57.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = vuln-sub7 -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I../../core/src -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/vuln-upnp/Makefile nepenthes-md/modules/vuln-upnp/Makefile --- nepenthes-20050807/modules/vuln-upnp/Makefile 2005-07-13 00:12:36.000000000 +0200 +++ nepenthes-md/modules/vuln-upnp/Makefile 2005-08-07 21:48:04.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = vuln-upnp -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/src -I../../core/include -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/vuln-wins/Makefile nepenthes-md/modules/vuln-wins/Makefile --- nepenthes-20050807/modules/vuln-wins/Makefile 2005-07-13 00:33:32.000000000 +0200 +++ nepenthes-md/modules/vuln-wins/Makefile 2005-08-07 21:57:55.000000000 +0200 @@ -4,30 +4,8 @@ # who am i? MODNAME = vuln-wins -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I../../core/src -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared -lpcre +LDFLAGS += -lpcre -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/x-1/Makefile nepenthes-md/modules/x-1/Makefile --- nepenthes-20050807/modules/x-1/Makefile 2005-06-09 22:11:08.000000000 +0200 +++ nepenthes-md/modules/x-1/Makefile 2005-08-07 21:49:37.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = x-1 -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/x-2/Makefile nepenthes-md/modules/x-2/Makefile --- nepenthes-20050807/modules/x-2/Makefile 2005-06-09 22:11:08.000000000 +0200 +++ nepenthes-md/modules/x-2/Makefile 2005-08-07 21:49:37.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = x-2 -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/x-3/Makefile nepenthes-md/modules/x-3/Makefile --- nepenthes-20050807/modules/x-3/Makefile 2005-06-09 22:11:08.000000000 +0200 +++ nepenthes-md/modules/x-3/Makefile 2005-08-07 21:49:37.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = x-3 -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/x-4/Makefile nepenthes-md/modules/x-4/Makefile --- nepenthes-20050807/modules/x-4/Makefile 2005-06-09 22:11:08.000000000 +0200 +++ nepenthes-md/modules/x-4/Makefile 2005-08-07 21:49:37.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = x-4 -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/x-5/Makefile nepenthes-md/modules/x-5/Makefile --- nepenthes-20050807/modules/x-5/Makefile 2005-06-09 22:11:08.000000000 +0200 +++ nepenthes-md/modules/x-5/Makefile 2005-08-07 21:49:37.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = x-5 -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/x-6/Makefile nepenthes-md/modules/x-6/Makefile --- nepenthes-20050807/modules/x-6/Makefile 2005-06-09 22:11:08.000000000 +0200 +++ nepenthes-md/modules/x-6/Makefile 2005-08-07 21:49:37.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = x-6 -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/x-7/Makefile nepenthes-md/modules/x-7/Makefile --- nepenthes-20050807/modules/x-7/Makefile 2005-07-13 00:21:24.000000000 +0200 +++ nepenthes-md/modules/x-7/Makefile 2005-08-07 21:49:36.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = x-7 -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk diff -rbNu nepenthes-20050807/modules/x-7/x-7.cpp nepenthes-md/modules/x-7/x-7.cpp --- nepenthes-20050807/modules/x-7/x-7.cpp 2005-07-13 00:21:24.000000000 +0200 +++ nepenthes-md/modules/x-7/x-7.cpp 2005-08-06 19:52:17.000000000 +0200 @@ -210,9 +210,9 @@ case DNS_QRFLAG_RESPONSE: logSpam("%s","DNS Packet is a Response\n"); { - dns_rr_t *rr = (dns_rr_t *)dns; - (char *)rr +=12; - dns_rr_t *header = rr; + char *rr = (char *)dns; + rr +=12; + dns_rr_t *header = (dns_rr_t *)rr; g_Nepenthes->getUtilities()->hexdump((byte *)rr,msg->getMsgLen()-12); char name[256]; @@ -220,17 +220,17 @@ { dns_decode_name(name,(char **)&rr); logSpam("Question %02i/%02i %s \n",i,ntohs(dns->number_questions),name); - (char *)rr +=2; // type - (char *)rr +=2; // class + rr +=2; // type + rr +=2; // class } for (unsigned int i=1;i<=ntohs(dns->number_answers);i++) { - if ( *(char *)rr & 0xC0) + if ( *rr & 0xC0) {// compressed reply dns_rr_t *rrh = header; dns_decode_name(name,(char **)&rrh); - (char *)rr +=2;// ((char *)rrh - (char *)header); + rr +=2;// ((char *)rrh - (char *)header); }else { dns_decode_name(name,(char **)&rr); @@ -239,28 +239,28 @@ unsigned short int type = *(unsigned short int *)rr;; - (char *)rr +=2; // type + rr +=2; // type - (char *)rr +=2; // class - (char *)rr +=4; // ttl + rr +=2; // class + rr +=4; // ttl short unsigned int datalen = *(short unsigned int *)rr; - (char *)rr +=2; // datalen + rr +=2; // datalen if (ntohs(type) == DNS_QUERYTYPE_A) { logSpam("Answer %02i/%02i %s datalen %i ip %s len \n",i,ntohs(dns->number_answers),name, ntohs(datalen), inet_ntoa(*(in_addr *)rr)); - (char *)rr +=ntohs(datalen); // the datalen + rr +=ntohs(datalen); // the datalen } else if (ntohs(type) == DNS_QUERYTYPE_CNAME) { char cname[256]; - dns_rr_t *rrh = rr; + char *rrh = rr; dns_decode_name(cname,(char **)&rrh); logSpam("Answer %02i/%02i %s datalen %i cname %s len \n",i,ntohs(dns->number_answers),name, ntohs(datalen), cname); - (char *)rr +=ntohs(datalen); // the datalen + rr +=ntohs(datalen); // the datalen } diff -rbNu nepenthes-20050807/scripts/Makefile.template nepenthes-md/scripts/Makefile.template --- nepenthes-20050807/scripts/Makefile.template 2005-06-09 22:12:41.000000000 +0200 +++ nepenthes-md/scripts/Makefile.template 2005-08-07 22:33:28.000000000 +0200 @@ -4,30 +4,6 @@ # who am i? MODNAME = {{{MODNAME}}} -CXX = g++ +include ../../buildconfig.mk -CXXFLAGS += -I../../core/include -I/usr/include/lua -pipe -D _GNU_SOURCE -Wall -Werror -LDFLAGS = -shared - -ifndef NDEBUG -CXXFLAGS += -g -endif - -ifdef PROFILE -CXXFLAGS += -pg -endif - - -all: $(MODNAME) - -MOD_SOURCE := $(shell find -iname '*.cpp') -MOD_OBJ = $(MOD_SOURCE:.cpp=.o) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -$(MODNAME): $(MOD_OBJ) - $(CXX) $(CXXFLAGS) -o $@.so $(MOD_OBJ) $(LDFLAGS) - -clean: - rm -f *.o *.so +include ../buildmodule.mk