I know the tarball on the site was only included for convenience sake, but I also saw a good number of questions where ppl had not made changes to the Makefile after running configure.
Below is a patch for makefile.in (Apply with patch < Makfile.in.patch while sitting in src directory)
This should make the changes to the Makefile template that will last through multiple configure runs. Hope this helps...
---Cut below here and paste into Makefile.in.patch---
--- ORIG/Makefile.in 2003-10-06 17:23:20.000000000 +0900
+++ Mine/Makefile.in 2004-09-26 19:16:35.000000000 +0900
@@ -18,7 +18,7 @@
CCOPT =
LIBPCAPDIR = @libpcapdir@
LIBPCREDIR = @LIBPCREDIR@
-INCLS = -I$(LIBPCAPDIR)
+INCLS = -I$(LIBPCAPDIR) -I/usr/include/mysql
DEFS = @DEFS@ -DNMAP_VERSION=\"$(NMAP_VERSION)\" -DNMAP_NAME=\"$(NMAP_NAME)\" -DNMAP_URL=\"$(NMAP_URL)\" -DNMAP_PLATFORM=\"$(NMAP_PLATFORM)\" -DNMAPDATADIR=\"$(nmapdatadir)\"
# For mtrace debugging -- see MTRACE define in main.cc for instructions
# Should only be enabled during debugging and not in any real release.
@@ -27,8 +27,8 @@
# CFLAGS = $(CXXFLAGS)
# CFLAGS = $(DEFS) $(INCLS)
STATIC =
-LDFLAGS = @LDFLAGS@ $(STATIC)
-LIBS = @LIBS@ @LIBPCRE_LIBS@ @LIBPCAP_LIBS@
+LDFLAGS = @LDFLAGS@ $(STATIC) -L/usr/lib/mysql -lmysqlclient -lz
+LIBS = @LIBS@ @LIBPCRE_LIBS@ @LIBPCAP_LIBS@ -lmysqlclient
# LIBS = -lefence @LIBS@
# LIBS = -lrmalloc @LIBS@
SHTOOL = ./shtool
@@ -40,11 +40,11 @@
TARGETNMAPFE=@TARGETNMAPFE@
INSTALLNMAPFE=@INSTALLNMAPFE@
I've just finished patching nmap v3.70. Testing will take a couple of days. Could you give me a patch against makefile.in from vanilla 3.70?
Fyodor needs some more convincing, I reckon. After all, he's worked hard to add the XML support and an embedded SQL logging facility sort of flies in the face of that.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have the main changes done for Makefile.in, but need to verify that they work (need to do a little more testing). When I get home from work will do some more testing and should be able to post something in like 12 hours or so...
See you then :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I know the tarball on the site was only included for convenience sake, but I also saw a good number of questions where ppl had not made changes to the Makefile after running configure.
Below is a patch for makefile.in (Apply with patch < Makfile.in.patch while sitting in src directory)
This should make the changes to the Makefile template that will last through multiple configure runs. Hope this helps...
---Cut below here and paste into Makefile.in.patch---
--- ORIG/Makefile.in 2003-10-06 17:23:20.000000000 +0900
+++ Mine/Makefile.in 2004-09-26 19:16:35.000000000 +0900
@@ -18,7 +18,7 @@
CCOPT =
LIBPCAPDIR = @libpcapdir@
LIBPCREDIR = @LIBPCREDIR@
-INCLS = -I$(LIBPCAPDIR)
+INCLS = -I$(LIBPCAPDIR) -I/usr/include/mysql
DEFS = @DEFS@ -DNMAP_VERSION=\"$(NMAP_VERSION)\" -DNMAP_NAME=\"$(NMAP_NAME)\" -DNMAP_URL=\"$(NMAP_URL)\" -DNMAP_PLATFORM=\"$(NMAP_PLATFORM)\" -DNMAPDATADIR=\"$(nmapdatadir)\"
# For mtrace debugging -- see MTRACE define in main.cc for instructions
# Should only be enabled during debugging and not in any real release.
@@ -27,8 +27,8 @@
# CFLAGS = $(CXXFLAGS)
# CFLAGS = $(DEFS) $(INCLS)
STATIC =
-LDFLAGS = @LDFLAGS@ $(STATIC)
-LIBS = @LIBS@ @LIBPCRE_LIBS@ @LIBPCAP_LIBS@
+LDFLAGS = @LDFLAGS@ $(STATIC) -L/usr/lib/mysql -lmysqlclient -lz
+LIBS = @LIBS@ @LIBPCRE_LIBS@ @LIBPCAP_LIBS@ -lmysqlclient
# LIBS = -lefence @LIBS@
# LIBS = -lrmalloc @LIBS@
SHTOOL = ./shtool
@@ -40,11 +40,11 @@
TARGETNMAPFE=@TARGETNMAPFE@
INSTALLNMAPFE=@INSTALLNMAPFE@
-SRCS = main.cc nmap.cc targets.cc tcpip.cc nmap_error.cc utils.cc idle_scan.cc osscan.cc output.cc scan_engine.cc timing.cc charpool.cc services.cc protocols.cc nmap_rpc.cc portlist.cc NmapOps.cc TargetGroup.cc Target.cc FingerPrintResults.cc service_scan.cc NmapOutputTable.cc @COMPAT_SRCS@
+SRCS = main.cc nmap.cc targets.cc tcpip.cc nmap_error.cc utils.cc idle_scan.cc osscan.cc output.cc scan_engine.cc timing.cc charpool.cc services.cc protocols.cc nmap_rpc.cc portlist.cc NmapOps.cc TargetGroup.cc Target.cc FingerPrintResults.cc service_scan.cc NmapOutputTable.cc @COMPAT_SRCS@ common.cc my_td.cc nmap-sql.cc
-OBJS = main.o nmap.o targets.o tcpip.o nmap_error.o utils.o idle_scan.o osscan.o output.o scan_engine.o timing.o charpool.o services.o protocols.o nmap_rpc.o portlist.o NmapOps.o TargetGroup.o Target.o FingerPrintResults.o service_scan.o NmapOutputTable.o @COMPAT_OBJS@
+OBJS = main.o nmap.o targets.o tcpip.o nmap_error.o utils.o idle_scan.o osscan.o output.o scan_engine.o timing.o charpool.o services.o protocols.o nmap_rpc.o portlist.o NmapOps.o TargetGroup.o Target.o FingerPrintResults.o service_scan.o NmapOutputTable.o @COMPAT_OBJS@ common.o my_td.o nmap-sql.o
-DEPS = nmap.h nmap_amigaos.h nmap_error.h targets.h idle_scan.h osscan.h output.h scan_engine.h timing.h tcpip.h utils.h global_structures.h charpool.h services.h protocols.h nmap_rpc.h portlist.h NmapOps.h TargetGroup.h Target.h FingerPrintResults.h service_scan.h NmapOutputTable.h
+DEPS = nmap.h nmap_amigaos.h nmap_error.h targets.h idle_scan.h osscan.h output.h scan_engine.h timing.h tcpip.h utils.h global_structures.h charpool.h services.h protocols.h nmap_rpc.h portlist.h NmapOps.h TargetGroup.h Target.h FingerPrintResults.h service_scan.h NmapOutputTable.h common.h nmap-sql.h
# %.o : %.cc -- nope this is a GNU extension
.cc.o:
Thanks.
My ultimate objective is to have it part of the source distribution so none of these is necessary.
Is this against v3.48, or v3.7?
patch was against your convenience tarball located at http://prdownloads.sourceforge.net/nmapsql/nmap-3.48-with-sql-0.0.3.tar.gz?download
Can work on a patch for any version, if you'd like...
Has fyodor repsonded one way or the other to this project?
I've just finished patching nmap v3.70. Testing will take a couple of days. Could you give me a patch against makefile.in from vanilla 3.70?
Fyodor needs some more convincing, I reckon. After all, he's worked hard to add the XML support and an embedded SQL logging facility sort of flies in the face of that.
Will do.
I have the main changes done for Makefile.in, but need to verify that they work (need to do a little more testing). When I get home from work will do some more testing and should be able to post something in like 12 hours or so...
See you then :)