Static Analysis in Nmap Makefile
@ 2009-10-31 14:18:12
Filed under: Code Security
I noticed there wasn't a makefile target for static analysis so I made one ... I doubt it will get applied, but might as well give it a shot ...
digg it
seed it
del.icio.us
ma.gnolia
Log in to post comments.
Filed under: Code Security
I noticed there wasn't a makefile target for static analysis so I made one ... I doubt it will get applied, but might as well give it a shot ...
Index: Makefile.in
===================================================================
--- Makefile.in (revision 15953)
+++ Makefile.in (working copy)
@@ -77,6 +77,11 @@
endif
endif
+# The tool to use for analysis
+ANALYZE=$(shell which rats)
+# Command to run if the analyzer is available
+ANALYSIS_CMD=$(ANALYZE) -w 2 .
+
export SRCS = main.cc nmap.cc targets.cc tcpip.cc nmap_error.cc
utils.cc idle_scan.cc osscan.cc osscan2.cc output.cc payload.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 MACLookup.cc nmap_tty.cc nmap_dns.cc
traceroute.cc portreasons.cc $(NSE_SRC) @COMPAT_SRCS@
export HDRS = charpool.h FingerPrintResults.h global_structures.h
idle_scan.h MACLookup.h nmap_amigaos.h nmap_dns.h nmap_error.h
nmap.h NmapOps.h NmapOutputTable.h nmap_rpc.h nmap_tty.h
nmap_winconfig.h osscan.h osscan2.h output.h payload.h portlist.h protocols.h
scan_engine.h service_scan.h services.h TargetGroup.h Target.h targets.h
tcpip.h timing.h utils.h traceroute.h portreasons.h $(NSE_HDRS)
@@ -291,6 +296,13 @@
uninstall-ncat:
@cd $(NCATDIR) && $(MAKE) uninstall
+analyze:
+ifneq ($(ANALYZE),)
+ @$(ANALYSIS_CMD)
+else
+ @echo "the static analysis tool is not available"
+endif
+
${srcdir}/configure: configure.ac
cd ${srcdir} && autoconf
digg it
seed it
del.icio.us
ma.gnolia
Log in to post comments.

