mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 08:46:45 +00:00
Merge from /nmap-exp/david/nmap-ndiff and /nmap-exp/david/zenmap-ndiff.
This commit is contained in:
parent
4c5e79b05d
commit
1073c8283a
11 changed files with 376 additions and 23 deletions
17
Makefile.in
17
Makefile.in
|
|
@ -29,6 +29,7 @@ LIBPCAPDIR = @libpcapdir@
|
|||
LIBPCREDIR = @LIBPCREDIR@
|
||||
export LIBDNETDIR = @LIBDNETDIR@
|
||||
ZENMAPDIR = zenmap
|
||||
NDIFFDIR = ndiff
|
||||
PYTHON = @PYTHON@
|
||||
DEFS = @DEFS@ -DNMAP_NAME=\"$(NMAP_NAME)\" -DNMAP_URL=\"$(NMAP_URL)\" -DNMAP_PLATFORM=\"$(NMAP_PLATFORM)\" -DNMAPDATADIR=\"$(nmapdatadir)\" -DNMAPLIBEXECDIR=\"$(nmaplibexecdir)\"
|
||||
# For mtrace debugging -- see MTRACE define in main.cc for instructions
|
||||
|
|
@ -56,7 +57,9 @@ DESTDIR =
|
|||
TARGET = nmap
|
||||
INSTALLNSE=@INSTALLNSE@
|
||||
BUILDZENMAP=@BUILDZENMAP@
|
||||
BUILDNDIFF=@BUILDNDIFF@
|
||||
INSTALLZENMAP=@INSTALLZENMAP@
|
||||
INSTALLNDIFF=@INSTALLNDIFF@
|
||||
UNINSTALLZENMAP=@UNINSTALLZENMAP@
|
||||
|
||||
ifneq (@LIBLUA_LIBS@,)
|
||||
|
|
@ -76,7 +79,7 @@ OBJS = main.o nmap.o targets.o tcpip.o nmap_error.o utils.o idle_scan.o osscan.o
|
|||
$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@
|
||||
|
||||
all: @LUA_BUILD@ @PCAP_BUILD@ @PCRE_BUILD@ @DNET_BUILD@ @NBASE_BUILD@ @NSOCK_BUILD@ @NCAT_BUILD@
|
||||
$(MAKE) $(TARGET) $(BUILDZENMAP)
|
||||
$(MAKE) $(TARGET) $(BUILDZENMAP) $(BUILDNDIFF)
|
||||
|
||||
$(TARGET): @LUA_DEPENDS@ @PCAP_DEPENDS@ @PCRE_DEPENDS@ @DNET_DEPENDS@ $(NBASEDIR)/libnbase.a $(NSOCKDIR)/src/libnsock.a $(OBJS)
|
||||
echo Compiling nmap
|
||||
|
|
@ -146,6 +149,8 @@ lua_clean:
|
|||
-cd $(LIBLUADIR) && $(MAKE) clean
|
||||
zenmap_clean:
|
||||
-cd $(ZENMAPDIR) && $(PYTHON) setup.py clean --all
|
||||
ndiff_clean:
|
||||
-cd $(NDIFFDIR) && $(PYTHON) setup.py clean --all
|
||||
pcap_dist_clean:
|
||||
-cd $(LIBPCAPDIR) && $(MAKE) distclean
|
||||
pcre_dist_clean:
|
||||
|
|
@ -162,6 +167,8 @@ ncat_dist_clean:
|
|||
-cd $(NCATDIR) && $(MAKE) distclean
|
||||
zenmap_dist_clean: zenmap_clean
|
||||
-cd $(ZENMAPDIR) && rm -rf MANIFEST build/ dist/
|
||||
ndiff_dist_clean: ndiff_clean
|
||||
-cd $(NDIFFDIR) && rm -rf build/ dist/
|
||||
debugclean:
|
||||
rm -f *.gcov *.gcda *.gcno gmon.out
|
||||
|
||||
|
|
@ -217,6 +224,12 @@ install-zenmap: $(ZENMAPDIR)/setup.py
|
|||
# Create a symlink from xnmap to zenmap unconditionally.
|
||||
ln -sf zenmap $(DESTDIR)$(bindir)/xnmap
|
||||
|
||||
build-ndiff:
|
||||
cd $(NDIFFDIR) && $(PYTHON) setup.py build $(if $(DESTDIR),--executable "$(DEFAULT_PYTHON_PATH)")
|
||||
|
||||
install-ndiff:
|
||||
cd $(NDIFFDIR) && $(PYTHON) setup.py install --prefix "$(prefix)" $(if $(DESTDIR),--root "$(DESTDIR)")
|
||||
|
||||
NSE_FILES = scripts/script.db scripts/*.nse
|
||||
NSE_LIB_LUA_FILES = nselib/*.lua
|
||||
|
||||
|
|
@ -229,7 +242,7 @@ install-nse: $(TARGET)
|
|||
install-ncat: $(NCATDIR)/ncat
|
||||
@cd $(NCATDIR) && $(MAKE) install
|
||||
|
||||
install: install-nmap $(INSTALLNSE) $(INSTALLZENMAP) @NCAT_INSTALL@
|
||||
install: install-nmap $(INSTALLNSE) $(INSTALLZENMAP) @NCAT_INSTALL@ $(INSTALLNDIFF)
|
||||
@echo "NMAP SUCCESSFULLY INSTALLED"
|
||||
|
||||
uninstall: uninstall-nmap $(UNINSTALLZENMAP) @NCAT_UNINSTALL@
|
||||
|
|
|
|||
241
configure
vendored
241
configure
vendored
|
|
@ -689,6 +689,10 @@ pythondir
|
|||
pkgpythondir
|
||||
pyexecdir
|
||||
pkgpyexecdir
|
||||
BUILDNDIFF
|
||||
INSTALLNDIFF
|
||||
NDIFF_CLEAN
|
||||
NDIFF_DIST_CLEAN
|
||||
BUILDZENMAP
|
||||
INSTALLZENMAP
|
||||
UNINSTALLZENMAP
|
||||
|
|
@ -1326,6 +1330,7 @@ Optional Packages:
|
|||
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
||||
--with-localdirs Explicitly ask compiler to use
|
||||
/usr/local/{include,libs} if they exist
|
||||
--without-ndiff Skip installation of the Ndiff utility
|
||||
--without-zenmap Skip installation of the Zenmap graphical frontend
|
||||
--with-openssl=DIR Use optional openssl libs and includes from
|
||||
DIR/lib/ and DIR/include/openssl/)
|
||||
|
|
@ -5680,6 +5685,228 @@ if test "$ac_res" != no; then
|
|||
fi
|
||||
|
||||
|
||||
# Do they want Ndiff?
|
||||
|
||||
# Check whether --with-ndiff was given.
|
||||
if test "${with_ndiff+set}" = set; then
|
||||
withval=$with_ndiff;
|
||||
else
|
||||
with_ndiff=check
|
||||
fi
|
||||
|
||||
|
||||
if test "$with_ndiff" != "no"; then
|
||||
|
||||
|
||||
|
||||
|
||||
if test -n "$PYTHON"; then
|
||||
# If the user set $PYTHON, use it and don't search something else.
|
||||
{ echo "$as_me:$LINENO: checking whether $PYTHON version >= 2.4" >&5
|
||||
echo $ECHO_N "checking whether $PYTHON version >= 2.4... $ECHO_C" >&6; }
|
||||
prog="import sys, string
|
||||
# split strings by '.' and convert to numeric. Append some zeros
|
||||
# because we need at least 4 digits for the hex conversion.
|
||||
minver = map(int, string.split('2.4', '.')) + [0, 0, 0]
|
||||
minverhex = 0
|
||||
for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i]
|
||||
sys.exit(sys.hexversion < minverhex)"
|
||||
if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5
|
||||
($PYTHON -c "$prog") >&5 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; then
|
||||
{ echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6; }
|
||||
else
|
||||
{ { echo "$as_me:$LINENO: error: too old" >&5
|
||||
echo "$as_me: error: too old" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
am_display_PYTHON=$PYTHON
|
||||
else
|
||||
# Otherwise, try each interpreter until we find one that satisfies
|
||||
# VERSION.
|
||||
{ echo "$as_me:$LINENO: checking for a Python interpreter with version >= 2.4" >&5
|
||||
echo $ECHO_N "checking for a Python interpreter with version >= 2.4... $ECHO_C" >&6; }
|
||||
if test "${am_cv_pathless_PYTHON+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
|
||||
for am_cv_pathless_PYTHON in python python2 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 none; do
|
||||
test "$am_cv_pathless_PYTHON" = none && break
|
||||
prog="import sys, string
|
||||
# split strings by '.' and convert to numeric. Append some zeros
|
||||
# because we need at least 4 digits for the hex conversion.
|
||||
minver = map(int, string.split('2.4', '.')) + [0, 0, 0]
|
||||
minverhex = 0
|
||||
for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i]
|
||||
sys.exit(sys.hexversion < minverhex)"
|
||||
if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5
|
||||
($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; then
|
||||
break
|
||||
fi
|
||||
|
||||
done
|
||||
fi
|
||||
{ echo "$as_me:$LINENO: result: $am_cv_pathless_PYTHON" >&5
|
||||
echo "${ECHO_T}$am_cv_pathless_PYTHON" >&6; }
|
||||
# Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
|
||||
if test "$am_cv_pathless_PYTHON" = none; then
|
||||
PYTHON=:
|
||||
else
|
||||
# Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args.
|
||||
set dummy $am_cv_pathless_PYTHON; ac_word=$2
|
||||
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
|
||||
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_path_PYTHON+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
case $PYTHON in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
|
||||
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
PYTHON=$ac_cv_path_PYTHON
|
||||
if test -n "$PYTHON"; then
|
||||
{ echo "$as_me:$LINENO: result: $PYTHON" >&5
|
||||
echo "${ECHO_T}$PYTHON" >&6; }
|
||||
else
|
||||
{ echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
am_display_PYTHON=$am_cv_pathless_PYTHON
|
||||
fi
|
||||
|
||||
|
||||
if test "$PYTHON" = :; then
|
||||
if test "$with_ndiff" = "check"; then
|
||||
{ echo "$as_me:$LINENO: WARNING: Not building Ndiff because Python 2.4 or later was not found" >&5
|
||||
echo "$as_me: WARNING: Not building Ndiff because Python 2.4 or later was not found" >&2;}
|
||||
else
|
||||
{ { echo "$as_me:$LINENO: error: --with-ndiff requires Python 2.4 or later
|
||||
See \`config.log' for more details." >&5
|
||||
echo "$as_me: error: --with-ndiff requires Python 2.4 or later
|
||||
See \`config.log' for more details." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
with_ndiff=no
|
||||
else
|
||||
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for $am_display_PYTHON version" >&5
|
||||
echo $ECHO_N "checking for $am_display_PYTHON version... $ECHO_C" >&6; }
|
||||
if test "${am_cv_python_version+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
am_cv_python_version=`$PYTHON -c "import sys; print sys.version[:3]"`
|
||||
fi
|
||||
{ echo "$as_me:$LINENO: result: $am_cv_python_version" >&5
|
||||
echo "${ECHO_T}$am_cv_python_version" >&6; }
|
||||
PYTHON_VERSION=$am_cv_python_version
|
||||
|
||||
|
||||
|
||||
PYTHON_PREFIX='${prefix}'
|
||||
|
||||
PYTHON_EXEC_PREFIX='${exec_prefix}'
|
||||
|
||||
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for $am_display_PYTHON platform" >&5
|
||||
echo $ECHO_N "checking for $am_display_PYTHON platform... $ECHO_C" >&6; }
|
||||
if test "${am_cv_python_platform+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`
|
||||
fi
|
||||
{ echo "$as_me:$LINENO: result: $am_cv_python_platform" >&5
|
||||
echo "${ECHO_T}$am_cv_python_platform" >&6; }
|
||||
PYTHON_PLATFORM=$am_cv_python_platform
|
||||
|
||||
|
||||
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for $am_display_PYTHON script directory" >&5
|
||||
echo $ECHO_N "checking for $am_display_PYTHON script directory... $ECHO_C" >&6; }
|
||||
if test "${am_cv_python_pythondir+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
|
||||
echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
|
||||
fi
|
||||
{ echo "$as_me:$LINENO: result: $am_cv_python_pythondir" >&5
|
||||
echo "${ECHO_T}$am_cv_python_pythondir" >&6; }
|
||||
pythondir=$am_cv_python_pythondir
|
||||
|
||||
|
||||
|
||||
pkgpythondir=\${pythondir}/$PACKAGE
|
||||
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for $am_display_PYTHON extension module directory" >&5
|
||||
echo $ECHO_N "checking for $am_display_PYTHON extension module directory... $ECHO_C" >&6; }
|
||||
if test "${am_cv_python_pyexecdir+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null ||
|
||||
echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`
|
||||
fi
|
||||
{ echo "$as_me:$LINENO: result: $am_cv_python_pyexecdir" >&5
|
||||
echo "${ECHO_T}$am_cv_python_pyexecdir" >&6; }
|
||||
pyexecdir=$am_cv_python_pyexecdir
|
||||
|
||||
|
||||
|
||||
pkgpyexecdir=\${pyexecdir}/$PACKAGE
|
||||
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
if test "$with_ndiff" = "no"; then
|
||||
BUILDNDIFF=""
|
||||
INSTALLNDIFF=""
|
||||
NDIFF_CLEAN=""
|
||||
NDIFF_DIST_CLEAN=""
|
||||
else
|
||||
BUILDNDIFF=build-ndiff
|
||||
INSTALLNDIFF=install-ndiff
|
||||
NDIFF_CLEAN=ndiff_clean
|
||||
NDIFF_DIST_CLEAN=ndiff_dist_clean
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Do they want Zenmap?
|
||||
|
||||
# Check whether --with-zenmap was given.
|
||||
|
|
@ -9413,6 +9640,10 @@ pythondir!$pythondir$ac_delim
|
|||
pkgpythondir!$pkgpythondir$ac_delim
|
||||
pyexecdir!$pyexecdir$ac_delim
|
||||
pkgpyexecdir!$pkgpyexecdir$ac_delim
|
||||
BUILDNDIFF!$BUILDNDIFF$ac_delim
|
||||
INSTALLNDIFF!$INSTALLNDIFF$ac_delim
|
||||
NDIFF_CLEAN!$NDIFF_CLEAN$ac_delim
|
||||
NDIFF_DIST_CLEAN!$NDIFF_DIST_CLEAN$ac_delim
|
||||
BUILDZENMAP!$BUILDZENMAP$ac_delim
|
||||
INSTALLZENMAP!$INSTALLZENMAP$ac_delim
|
||||
UNINSTALLZENMAP!$UNINSTALLZENMAP$ac_delim
|
||||
|
|
@ -9430,10 +9661,6 @@ LIBPCREDIR!$LIBPCREDIR$ac_delim
|
|||
PCRE_DEPENDS!$PCRE_DEPENDS$ac_delim
|
||||
PCRE_BUILD!$PCRE_BUILD$ac_delim
|
||||
PCRE_CLEAN!$PCRE_CLEAN$ac_delim
|
||||
PCRE_DIST_CLEAN!$PCRE_DIST_CLEAN$ac_delim
|
||||
LIBDNET_LIBS!$LIBDNET_LIBS$ac_delim
|
||||
LIBDNETDIR!$LIBDNETDIR$ac_delim
|
||||
DNET_DEPENDS!$DNET_DEPENDS$ac_delim
|
||||
_ACEOF
|
||||
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
|
||||
|
|
@ -9475,6 +9702,10 @@ _ACEOF
|
|||
ac_delim='%!_!# '
|
||||
for ac_last_try in false false false false false :; do
|
||||
cat >conf$$subs.sed <<_ACEOF
|
||||
PCRE_DIST_CLEAN!$PCRE_DIST_CLEAN$ac_delim
|
||||
LIBDNET_LIBS!$LIBDNET_LIBS$ac_delim
|
||||
LIBDNETDIR!$LIBDNETDIR$ac_delim
|
||||
DNET_DEPENDS!$DNET_DEPENDS$ac_delim
|
||||
DNET_BUILD!$DNET_BUILD$ac_delim
|
||||
DNET_CLEAN!$DNET_CLEAN$ac_delim
|
||||
DNET_DIST_CLEAN!$DNET_DIST_CLEAN$ac_delim
|
||||
|
|
@ -9501,7 +9732,7 @@ LIBOBJS!$LIBOBJS$ac_delim
|
|||
LTLIBOBJS!$LTLIBOBJS$ac_delim
|
||||
_ACEOF
|
||||
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 28; then
|
||||
break
|
||||
elif $ac_last_try; then
|
||||
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
|
||||
|
|
|
|||
28
configure.ac
28
configure.ac
|
|
@ -198,6 +198,34 @@ dnl If any socket libraries needed
|
|||
AC_SEARCH_LIBS(setsockopt, socket)
|
||||
AC_SEARCH_LIBS(gethostbyname, nsl)
|
||||
|
||||
# Do they want Ndiff?
|
||||
AC_ARG_WITH(ndiff, AC_HELP_STRING([--without-ndiff], [Skip installation of the Ndiff utility]), [], [with_ndiff=check])
|
||||
|
||||
if test "$with_ndiff" != "no"; then
|
||||
AM_PATH_PYTHON([2.4], [],
|
||||
[if test "$with_ndiff" = "check"; then
|
||||
AC_MSG_WARN([Not building Ndiff because Python 2.4 or later was not found])
|
||||
else
|
||||
AC_MSG_FAILURE([--with-ndiff requires Python 2.4 or later])
|
||||
fi
|
||||
with_ndiff=no])
|
||||
fi
|
||||
if test "$with_ndiff" = "no"; then
|
||||
BUILDNDIFF=""
|
||||
INSTALLNDIFF=""
|
||||
NDIFF_CLEAN=""
|
||||
NDIFF_DIST_CLEAN=""
|
||||
else
|
||||
BUILDNDIFF=build-ndiff
|
||||
INSTALLNDIFF=install-ndiff
|
||||
NDIFF_CLEAN=ndiff_clean
|
||||
NDIFF_DIST_CLEAN=ndiff_dist_clean
|
||||
fi
|
||||
AC_SUBST(BUILDNDIFF)
|
||||
AC_SUBST(INSTALLNDIFF)
|
||||
AC_SUBST(NDIFF_CLEAN)
|
||||
AC_SUBST(NDIFF_DIST_CLEAN)
|
||||
|
||||
# Do they want Zenmap?
|
||||
AC_ARG_WITH(zenmap, AC_HELP_STRING([--without-zenmap], [Skip installation of the Zenmap graphical frontend]), [], [with_zenmap=check])
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# This makefile builds a disk image (.dmg) containing the installer for Nmap
|
||||
# Zenmap, and Ncat.
|
||||
# This makefile builds a disk image (.dmg) containing the installer for Nmap,
|
||||
# Zenmap, Ncat, and Ndiff.
|
||||
|
||||
NMAP_VERSION := $(shell grep '^\#[ \t]*define[ \t]\+NMAP_VERSION' ../nmap.h | sed -e 's/.*"\(.*\)".*/\1/' -e 'q')
|
||||
NMAP_NUM_VERSION := $(shell grep '^\#[ \t]*define[ \t]\+NMAP_NUM_VERSION' ../nmap.h | sed -e 's/.*"\(.*\)".*/\1/' -e 'q')
|
||||
|
|
@ -20,6 +20,9 @@ ZENMAP_STAGING_DIR = Zenmap
|
|||
NCAT_BUILD_DIR = ncat-build
|
||||
NCAT_STAGING_DIR = Ncat
|
||||
|
||||
NDIFF_BUILD_DIR = ndiff-build
|
||||
NDIFF_STAGING_DIR = Ndiff
|
||||
|
||||
PREFIX = /usr/local
|
||||
|
||||
PACKAGEMAKER = /Developer/usr/bin/packagemaker
|
||||
|
|
@ -46,7 +49,7 @@ $(IMAGE_NAME): $(IMAGE_STAGING_DIR)/$(PKG_NAME) $(EXTRA_DIST_FILES)
|
|||
rm -f $@
|
||||
hdiutil create -imagekey zlib-level=9 -srcfolder $(IMAGE_STAGING_DIR) $@
|
||||
|
||||
$(IMAGE_STAGING_DIR)/$(PKG_NAME): stage-nmap stage-ncat stage-zenmap README COPYING.formatted
|
||||
$(IMAGE_STAGING_DIR)/$(PKG_NAME): stage-nmap stage-ncat stage-ndiff stage-zenmap README COPYING.formatted
|
||||
mkdir -p $(IMAGE_STAGING_DIR)
|
||||
$(PACKAGEMAKER) --doc nmap.pmdoc --title "Nmap $(NMAP_VERSION)" -o $@
|
||||
|
||||
|
|
@ -57,15 +60,16 @@ export-%:
|
|||
svn export ../ncat $*/ncat
|
||||
svn export ../nsock $*/nsock
|
||||
svn export ../zenmap $*/zenmap
|
||||
svn export ../ndiff $*/ndiff
|
||||
|
||||
stage-nmap: export-$(NMAP_BUILD_DIR)
|
||||
cd $(NMAP_BUILD_DIR) && ./configure --without-zenmap --without-ncat $(CONFIGURE_ARGS)
|
||||
cd $(NMAP_BUILD_DIR) && ./configure --without-zenmap --without-ncat --without-ndiff $(CONFIGURE_ARGS)
|
||||
make -C $(NMAP_BUILD_DIR)
|
||||
rm -rf $(NMAP_STAGING_DIR)
|
||||
make -C $(NMAP_BUILD_DIR) install DESTDIR="`pwd`/$(NMAP_STAGING_DIR)"
|
||||
|
||||
stage-ncat: export-$(NCAT_BUILD_DIR)
|
||||
cd $(NCAT_BUILD_DIR) && ./configure --without-zenmap --with-ncat $(CONFIGURE_ARGS)
|
||||
cd $(NCAT_BUILD_DIR) && ./configure --without-zenmap --with-ncat --without-ndiff $(CONFIGURE_ARGS)
|
||||
make -C $(NCAT_BUILD_DIR)
|
||||
rm -rf $(NCAT_STAGING_DIR)
|
||||
make -C $(NCAT_BUILD_DIR) install-ncat DESTDIR="`pwd`/$(NCAT_STAGING_DIR)"
|
||||
|
|
@ -79,6 +83,12 @@ stage-zenmap: export-$(ZENMAP_BUILD_DIR)
|
|||
mkdir -p $(ZENMAP_STAGING_DIR)/Applications
|
||||
cp -rf $(ZENMAP_BUILD_DIR)/zenmap/dist/Zenmap.app $(ZENMAP_STAGING_DIR)/Applications/
|
||||
|
||||
stage-ndiff: export-$(NDIFF_BUILD_DIR)
|
||||
cd $(NDIFF_BUILD_DIR) && ./configure --without-zenmap --without-ncat --with-ndiff $(CONFIGURE_ARGS)
|
||||
make -C $(NDIFF_BUILD_DIR) build-ndiff
|
||||
rm -rf $(NDIFF_STAGING_DIR)
|
||||
make -C $(NDIFF_BUILD_DIR) install-ndiff DESTDIR="`pwd`/$(NDIFF_STAGING_DIR)"
|
||||
|
||||
$(IMAGE_STAGING_DIR)/README:
|
||||
mkdir -p $(IMAGE_STAGING_DIR)
|
||||
cp -f README $(IMAGE_STAGING_DIR)/
|
||||
|
|
@ -99,6 +109,8 @@ clean:
|
|||
rm -rf $(ZENMAP_STAGING_DIR)
|
||||
rm -rf $(NCAT_BUILD_DIR)
|
||||
rm -rf $(NCAT_STAGING_DIR)
|
||||
rm -rf $(NDIFF_BUILD_DIR)
|
||||
rm -rf $(NDIFF_STAGING_DIR)
|
||||
rm -f COPYING.formatted
|
||||
rm -f $(IMAGE_NAME)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Nmap is a free and open source utility for network exploration and security auditing. Zenmap is a multi-platform graphical frontend and results viewer for Nmap. Ncat is a general-purpose network sending and receiving utility, a reimplementation of Netcat.
|
||||
Nmap is a free and open source utility for network exploration and security auditing. Zenmap is a multi-platform graphical frontend and results viewer for Nmap. Ncat is a general-purpose network sending and receiving utility, a reimplementation of Netcat. Ndiff is a an Nmap scan comparison utility.
|
||||
|
||||
This package contains Nmap, Zenmap, and Ncat. It is intended to work on Intel and PowerPC Macs running Mac OS X 10.4 or later.
|
||||
This package contains Nmap, Zenmap, Ncat, and Ndiff. It is intended to work on Intel and PowerPC Macs running Mac OS X 10.4 or later.
|
||||
|
||||
Installation of all three packages is optional. Unselect Zenmap to get just the command-line tools. You can unselect Nmap if you want to use Zenmap with a copy of Nmap that is already installed. Zenmap will not work without Nmap.
|
||||
Installation of all packages is optional. Unselect Zenmap to get just the command-line tool. Unselect Nmap if you prefer to use a copy of Nmap that is already installed. Zenmap will not work without Nmap.
|
||||
|
||||
The nmap and ncat command-line binaries will be installed in /usr/local/bin, and additional support files will be installed in /usr/local/share. The Zenmap application bundle will be installed in /Applications/Zenmap.app.
|
||||
The nmap, ncat, and ndiff command-line binaries will be installed in /usr/local/bin, and additional support files will be installed in /usr/local/share. The Zenmap application bundle will be installed in /Applications/Zenmap.app.
|
||||
|
|
|
|||
3
macosx/nmap.pmdoc/04ndiff-contents.xml
Normal file
3
macosx/nmap.pmdoc/04ndiff-contents.xml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<pkg-contents spec="1.12">
|
||||
<f n="Ndiff" pt="Ndiff" m="false" t="file"/>
|
||||
</pkg-contents>
|
||||
25
macosx/nmap.pmdoc/04ndiff.xml
Normal file
25
macosx/nmap.pmdoc/04ndiff.xml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<pkgref spec="1.12" uuid="A488395A-3951-449A-B3F6-A74D5E926D69">
|
||||
<config>
|
||||
<identifier>org.insecure.nmap.ndiff.pkg</identifier>
|
||||
<version>1</version>
|
||||
<description />
|
||||
<post-install type="none" />
|
||||
<requireAuthorization />
|
||||
<installFrom relative="true" includeRoot="false">Ndiff</installFrom>
|
||||
<installTo>/</installTo>
|
||||
<flags>
|
||||
<followSymbolicLinks />
|
||||
</flags>
|
||||
<packageStore type="internal" />
|
||||
<mod>parent</mod>
|
||||
<mod>installFrom.isRelativeType</mod>
|
||||
</config>
|
||||
<contents>
|
||||
<file-list>04ndiff-contents.xml</file-list>
|
||||
<filter>/CVS$</filter>
|
||||
<filter>/\.svn$</filter>
|
||||
<filter>/\.cvsignore$</filter>
|
||||
<filter>/\.cvspass$</filter>
|
||||
<filter>/\.DS_Store$</filter>
|
||||
</contents>
|
||||
</pkgref>
|
||||
|
|
@ -26,6 +26,11 @@
|
|||
starts_enabled="true" starts_hidden="false">
|
||||
<pkgref id="org.insecure.nmap.ncat.pkg" />
|
||||
</choice>
|
||||
<choice title="Ndiff" id="choice95" starts_selected="true"
|
||||
description="Ndiff scan comparison utility."
|
||||
starts_enabled="true" starts_hidden="false">
|
||||
<pkgref id="org.insecure.nmap.ndiff.pkg" />
|
||||
</choice>
|
||||
</contents>
|
||||
<resources bg-scale="none" bg-align="topleft">
|
||||
<locale lang="en">
|
||||
|
|
@ -37,6 +42,7 @@
|
|||
<item type="file">01nmap.xml</item>
|
||||
<item type="file">02zenmap.xml</item>
|
||||
<item type="file">03ncat.xml</item>
|
||||
<item type="file">04ndiff.xml</item>
|
||||
<mod>properties.customizeOption</mod>
|
||||
<mod>properties.title</mod>
|
||||
<mod>properties.anywhereDomain</mod>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,10 @@ winbuild:
|
|||
zip -r nmap-$(NMAP_VERSION)-win32.zip nmap-$(NMAP_VERSION)
|
||||
mkdir nmap-$(NMAP_VERSION)/zenmap
|
||||
cd ../zenmap && install_scripts/windows/copy_and_compile.bat
|
||||
cp -R ../zenmap/dist/* ../zenmap/COPYING* ../zenmap/README nmap-$(NMAP_VERSION)/zenmap
|
||||
cp -R ../zenmap/dist/* nmap-$(NMAP_VERSION)/
|
||||
cp ../zenmap/README nmap-$(NMAP_VERSION)/ZENMAP_README
|
||||
cp ../zenmap/COPYING_HIGWIDGETS nmap-$(NMAP_VERSION)
|
||||
cp ../ndiff/README nmap-$(NMAP_VERSION)/NDIFF_README
|
||||
cp nsis/AddToPath.nsh nsis/Nmap.nsi nsis/shortcuts.ini nsis/final.ini nmap-$(NMAP_VERSION)
|
||||
$(MAKENSIS) nmap-$(NMAP_VERSION)/Nmap.nsi
|
||||
mv nmap-$(NMAP_VERSION)/NmapInstaller.exe nmap-$(NMAP_VERSION)-setup.exe
|
||||
|
|
|
|||
|
|
@ -88,18 +88,18 @@ FunctionEnd
|
|||
Function makeShortcuts
|
||||
StrCmp $zenmapset "" skip
|
||||
|
||||
SetOutPath "$INSTDIR\zenmap"
|
||||
SetOutPath "$INSTDIR"
|
||||
|
||||
ReadINIStr $0 "$PLUGINSDIR\shortcuts.ini" "Field 1" "State"
|
||||
StrCmp $0 "0" skipdesktop
|
||||
CreateShortCut "$DESKTOP\Nmap - Zenmap GUI.lnk" "$INSTDIR\zenmap\zenmap.exe"
|
||||
CreateShortCut "$DESKTOP\Nmap - Zenmap GUI.lnk" "$INSTDIR\zenmap.exe"
|
||||
|
||||
skipdesktop:
|
||||
|
||||
ReadINIStr $0 "$PLUGINSDIR\shortcuts.ini" "Field 2" "State"
|
||||
StrCmp $0 "0" skipstartmenu
|
||||
CreateDirectory "$SMPROGRAMS\Nmap"
|
||||
CreateShortCut "$SMPROGRAMS\Nmap\Nmap - Zenmap GUI.lnk" "$INSTDIR\zenmap\zenmap.exe"
|
||||
CreateShortCut "$SMPROGRAMS\Nmap\Nmap - Zenmap GUI.lnk" "$INSTDIR\zenmap.exe"
|
||||
|
||||
skipstartmenu:
|
||||
|
||||
|
|
@ -247,7 +247,13 @@ SectionEnd
|
|||
Section "Zenmap (GUI Frontend)" SecZenmap
|
||||
SetOutPath "$INSTDIR"
|
||||
SetOverwrite on
|
||||
File /r /x mswin32 /x .svn ..\nmap-${VERSION}\zenmap
|
||||
File ..\nmap-${VERSION}\zenmap.exe
|
||||
File ..\nmap-${VERSION}\ZENMAP_README
|
||||
File ..\nmap-${VERSION}\COPYING_HIGWIDGETS
|
||||
File ..\nmap-${VERSION}\msvcr71.dll
|
||||
File ..\nmap-${VERSION}\python25.dll
|
||||
File /r ..\nmap-${VERSION}\share
|
||||
File /r ..\nmap-${VERSION}\py2exe
|
||||
StrCpy $zenmapset "true"
|
||||
SectionEnd
|
||||
|
||||
|
|
@ -256,6 +262,16 @@ Section "Ncat (Netcat Replacement)" SecNcat
|
|||
SetOverwrite on
|
||||
File ..\nmap-${VERSION}\ncat.exe
|
||||
SectionEnd
|
||||
|
||||
Section "Ndiff" SecNdiff
|
||||
SetOutPath "$INSTDIR"
|
||||
SetOverwrite on
|
||||
File ..\nmap-${VERSION}\ndiff.exe
|
||||
File ..\nmap-${VERSION}\NDIFF_README
|
||||
File ..\nmap-${VERSION}\msvcr71.dll
|
||||
File ..\nmap-${VERSION}\python25.dll
|
||||
File /r ..\nmap-${VERSION}\py2exe
|
||||
SectionEnd
|
||||
|
||||
;--------------------------------
|
||||
;Descriptions
|
||||
|
|
@ -267,6 +283,7 @@ SectionEnd
|
|||
LangString DESC_SecPerfRegistryMods ${LANG_ENGLISH} "Modifies Windows registry values to improve TCP connect scan performance. Recommended."
|
||||
LangString DESC_SecZenmap ${LANG_ENGLISH} "Installs Zenmap, the official Nmap graphical user interface. Recommended."
|
||||
LangString DESC_SecNcat ${LANG_ENGLISH} "Installs Ncat, Nmap's Netcat replacement."
|
||||
LangString DESC_SecNdiff ${LANG_ENGLISH} "Installs Ndiff, a tool for comparing Nmap XML files."
|
||||
|
||||
;Assign language strings to sections
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||
|
|
@ -276,6 +293,7 @@ SectionEnd
|
|||
!insertmacro MUI_DESCRIPTION_TEXT ${SecPerfRegistryMods} $(DESC_SecPerfRegistryMods)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecZenmap} $(DESC_SecZenmap)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecNcat} $(DESC_SecNcat)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecNdiff} $(DESC_SecNdiff)
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
;--------------------------------
|
||||
;Uninstaller Section
|
||||
|
|
@ -328,11 +346,19 @@ Section "Uninstall"
|
|||
Delete "$INSTDIR\libeay32.dll"
|
||||
Delete "$INSTDIR\ssleay32.dll"
|
||||
Delete "$INSTDIR\winpcap-nmap*.exe"
|
||||
Delete "$INSTDIR\zenmap.exe"
|
||||
Delete "$INSTDIR\ndiff.exe"
|
||||
Delete "$INSTDIR\msvcr71.dll"
|
||||
Delete "$INSTDIR\python25.dll"
|
||||
Delete "$INSTDIR\NDIFF_README"
|
||||
Delete "$INSTDIR\ZENMAP_README"
|
||||
Delete "$INSTDIR\COPYING_HIGWIDGETS"
|
||||
Delete "$INSTDIR\ncat.exe"
|
||||
;Delete specific subfolders (NB: custom scripts in scripts folder will be lost)
|
||||
RMDir /r "$INSTDIR\nselib"
|
||||
RMDir /r "$INSTDIR\scripts"
|
||||
RMDir /r "$INSTDIR\zenmap"
|
||||
RMDir /r "$INSTDIR\share"
|
||||
RMDir /r "$INSTDIR\py2exe"
|
||||
|
||||
Delete "$INSTDIR\Uninstall.exe"
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ Group: Applications/System
|
|||
Source0: http://nmap.org/dist/%{name}-%{version}.tgz
|
||||
URL: http://nmap.org
|
||||
|
||||
# For Ndiff.
|
||||
Requires: python >= 2.4
|
||||
|
||||
# RPM can't be relocatable until I stop storing path info in the binary.
|
||||
# Prefix: %{_prefix}
|
||||
BuildRoot: %{_tmppath}/%{name}-root
|
||||
|
|
@ -37,7 +40,7 @@ devices are also supported, including the Sharp Zaurus and the iPAQ.
|
|||
%setup -q
|
||||
|
||||
%build
|
||||
%configure --without-openssl --without-zenmap --with-libdnet=included --with-libpcap=included --with-libpcre=included --with-liblua=included
|
||||
%configure --without-openssl --without-zenmap --with-ndiff --with-libdnet=included --with-libpcap=included --with-libpcre=included --with-liblua=included
|
||||
%if "%{buildncat}" == "0"
|
||||
%configure --without-ncat
|
||||
%endif
|
||||
|
|
@ -65,6 +68,9 @@ gzip $RPM_BUILD_ROOT%{_mandir}/man1/* || :
|
|||
%{_bindir}/nmap
|
||||
%{_datadir}/nmap
|
||||
|
||||
%{_bindir}/ndiff
|
||||
%doc %{_prefix}/share/man/man1/ndiff.1.gz
|
||||
|
||||
# Ncat subpackage
|
||||
%if "%{buildncat}" != "0"
|
||||
%package -n ncat
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue