diff --git a/CHANGELOG b/CHANGELOG index 62e417258..585f44747 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,18 @@ # Nmap Changelog ($Id$) +o Updated NmapFE to build with GTK2 rather than obsolete GTK1. Thanks + to Mike Basinger (dbasinge(a)speakeasy.net) and Meethune Bhowmick + (meethune(a)oss-institute.org) for developing the + patch. I made some changes as well to prevent compilation warnings. + The new NmapFE now seems to work, though I do get "Gtk-CRITICAL" + assertion error messages. If someone has time to look into this, that + would be appreciated. + +o Fixed a problem that prevented the command "nmap -sT -PT " + from working from a non-privileged user account. The -PT option + doesn't change default behavior in this case, but Nmap should (and now + does) allow it. + o Applied another VS 2005 compatability patch from KX (kxmail(a)gmail.com). o Fixed a compilation problem on Mac OS X and perhaps other platforms diff --git a/Makefile.in b/Makefile.in index 261cc1b74..2f485f7f2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -export NMAP_VERSION = 3.94ALPHA2 +export NMAP_VERSION = 3.94ALPHA3 NMAP_NAME= Nmap NMAP_URL= http://www.insecure.org/nmap/ NMAP_PLATFORM=@host@ @@ -92,7 +92,7 @@ nmapfe/nmapfe: # @echo "FAILURES HERE ARE OK -- THEY JUST MEAN YOU CANNOT USE nmapfe" # -rm -f nmapfe/Makefile # -cd nmapfe; ./configure; - @if test -f nmapfe/Makefile; then echo "Building NmapFE graphical frontend"; cd nmapfe && $(MAKE) VERSION=$(NMAP_VERSION) STATIC=$(STATIC); else echo "NmapFE will not be made -- your system lacks the capabilities (perhaps GTK) for this graphical frontend. You can still run command-line nmap!"; fi + @if test -f nmapfe/Makefile; then echo "Building NmapFE graphical frontend"; cd nmapfe && $(MAKE) VERSION=$(NMAP_VERSION); else echo "NmapFE will not be made -- your system lacks the capabilities (perhaps GTK) for this graphical frontend. You can still run command-line nmap!"; fi # -cd nmapfe; test -f Makefile && $(MAKE) VERSION=$(NMAP_VERSION) STATIC=$(STATIC); # @echo "END OF SECTION WHERE FAILURES ARE OK" diff --git a/NmapOps.cc b/NmapOps.cc index 9015db0aa..2400da4b9 100644 --- a/NmapOps.cc +++ b/NmapOps.cc @@ -291,6 +291,21 @@ void NmapOps::ValidateOptions() { // if (verbose) error("No tcp, udp, or ICMP scantype specified, assuming %s scan. Use -sP if you really don't want to portscan (and just want to see what hosts are up).", synscan? "SYN Stealth" : "vanilla tcp connect()"); } + if ((pingtype & PINGTYPE_TCP) && (!o.isr00t || o.af() != AF_INET)) { + /* We will have to do a connect() style ping */ + if (num_ping_synprobes && num_ping_ackprobes) { + fatal("Cannot use both SYN and ACK ping probes if you are nonroot or using IPv6"); + } + + if (num_ping_ackprobes > 0) { + memcpy(ping_synprobes, ping_ackprobes, num_ping_ackprobes * sizeof(*ping_synprobes)); + num_ping_synprobes = num_ping_ackprobes; + num_ping_ackprobes = 0; + } + pingtype &= ~PINGTYPE_TCP_USE_ACK; + pingtype |= PINGTYPE_TCP_USE_SYN; + } + if (pingtype != PINGTYPE_NONE && spoofsource) { error("WARNING: If -S is being used to fake your source address, you may also have to use -e and -P0 . If you are using it to specify your real source address, you can ignore this warning."); } @@ -312,18 +327,6 @@ void NmapOps::ValidateOptions() { fatal("Sorry, UDP Ping (-PU) only works if you are root (because we need to read raw responses off the wire) and only for IPv4 (cause fyodor is too lazy right now to add IPv6 support and nobody has sent a patch)"); } - if ((pingtype & PINGTYPE_TCP) && (!o.isr00t || o.af() != AF_INET)) { - /* We will have to do a connect() style ping */ - if (num_ping_synprobes && num_ping_ackprobes) { - fatal("Cannot use both SYN and ACK ping probes if you are nonroot or using IPv6"); - } - - if (num_ping_ackprobes > 0) { - memcpy(ping_synprobes, ping_ackprobes, num_ping_ackprobes * sizeof(*ping_synprobes)); - num_ping_synprobes = num_ping_ackprobes; - num_ping_ackprobes = 0; - } - } if (ipprotscan + (TCPScan() || UDPScan()) + listscan + pingscan > 1) { fatal("Sorry, the IPProtoscan, Listscan, and Pingscan (-sO, -sL, -sP) must currently be used alone rather than combined with other scan types."); diff --git a/configure b/configure index 73de186f6..a218c962c 100755 --- a/configure +++ b/configure @@ -7694,8 +7694,8 @@ fi if test "${with_nmapfe}" = "yes"; then -# Extract the first word of "gtk-config", so it can be a program name with args. -set dummy gtk-config; ac_word=$2 +# Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; 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_GTK_CONFIG+set}" = set; then @@ -7742,11 +7742,11 @@ echo "${ECHO_T}no" >&6 { echo "$as_me:$LINENO: WARNING: Gtk+ has not been installed -> nmapfe will not be made" >&5 echo "$as_me: WARNING: Gtk+ has not been installed -> nmapfe will not be made" >&2;} else - GTK_NEEDED_MAJOR=1 - GTK_NEEDED_MINOR=2 - GTK_NEEDED_MICRO=7 + GTK_NEEDED_MAJOR=2 + GTK_NEEDED_MINOR=4 + GTK_NEEDED_MICRO=0 GTK_MINVERSION=$GTK_NEEDED_MAJOR.$GTK_NEEDED_MINOR.$GTK_NEEDED_MICRO - ver=`gtk-config --version` + ver=`pkg-config --modversion gtk+-2.0` major=`echo $ver|sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` minor=`echo $ver|sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` micro=`echo $ver|sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` diff --git a/configure.ac b/configure.ac index 804c7a822..c3cfe3e27 100644 --- a/configure.ac +++ b/configure.ac @@ -750,17 +750,17 @@ fi if test "${with_nmapfe}" = "yes"; then dnl Check for GTK+ -AC_PATH_PROG(GTK_CONFIG, gtk-config, no) +AC_PATH_PROG(GTK_CONFIG, pkg-config, no) AC_MSG_CHECKING(If you have GTK+ installed) if test "$GTK_CONFIG" = "no" ; then AC_MSG_RESULT([no]) AC_MSG_WARN([Gtk+ has not been installed -> nmapfe will not be made]) else - GTK_NEEDED_MAJOR=1 - GTK_NEEDED_MINOR=2 - GTK_NEEDED_MICRO=7 + GTK_NEEDED_MAJOR=2 + GTK_NEEDED_MINOR=4 + GTK_NEEDED_MICRO=0 GTK_MINVERSION=$GTK_NEEDED_MAJOR.$GTK_NEEDED_MINOR.$GTK_NEEDED_MICRO - ver=`gtk-config --version` + ver=`pkg-config --modversion gtk+-2.0` dnl Extract the information. major=`echo $ver|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` minor=`echo $ver|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` diff --git a/docs/nmap.1 b/docs/nmap.1 index d527f59e5..adf86f4ad 100644 --- a/docs/nmap.1 +++ b/docs/nmap.1 @@ -2,7 +2,7 @@ .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. -.TH "NMAP" "1" "12/04/2005" "" "Nmap Reference Guide" +.TH "NMAP" "1" "12/06/2005" "" "Nmap Reference Guide" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) diff --git a/docs/nmap.usage.txt b/docs/nmap.usage.txt index 4f58efd5c..acada8c2e 100644 --- a/docs/nmap.usage.txt +++ b/docs/nmap.usage.txt @@ -1,4 +1,4 @@ -Nmap 3.94ALPHA2 ( http://www.insecure.org/nmap/ ) +Nmap 3.94ALPHA3 ( http://www.insecure.org/nmap/ ) Usage: nmap [Scan Type(s)] [Options] {target specification} TARGET SPECIFICATION: Can pass hostnames, IP addresses, networks, etc. diff --git a/nmap.cc b/nmap.cc index f1f0ccc8c..e17e9a8e0 100644 --- a/nmap.cc +++ b/nmap.cc @@ -629,6 +629,8 @@ int nmap_main(int argc, char *argv[]) { } } else if (*optarg == 'T' || *optarg == 'A') { + /* NmapOps::ValidateOptions() takes care of changing this + to SYN if not root or if IPv6 */ o.pingtype |= (PINGTYPE_TCP|PINGTYPE_TCP_USE_ACK); if (isdigit((int) *(optarg+1))) { o.num_ping_ackprobes = numberlist2array(optarg+1, o.ping_ackprobes, sizeof(o.ping_ackprobes), &proberr); diff --git a/nmap.spec.in b/nmap.spec.in index dcce39d9d..4d6f2b1e6 100644 --- a/nmap.spec.in +++ b/nmap.spec.in @@ -41,8 +41,8 @@ devices are also supported, including the Sharp Zaurus and the iPAQ. %package frontend Summary: Gtk+ frontend for nmap Group: Applications/System -Requires: nmap, gtk+ -BuildPreReq: gtk+-devel +Requires: nmap, gtk2 +BuildPreReq: gtk2-devel Version: %{version} %description frontend This package includes nmapfe, a Gtk+ frontend for nmap. The nmap package must diff --git a/nmap_winconfig.h b/nmap_winconfig.h index 3eb953f39..57d47f193 100644 --- a/nmap_winconfig.h +++ b/nmap_winconfig.h @@ -104,7 +104,7 @@ #ifndef NMAP_WINCONFIG_H #define NMAP_WINCONFIG_H -#define NMAP_VERSION "3.94ALPHA2" +#define NMAP_VERSION "3.94ALPHA3" #define NMAP_NAME "Nmap" #define NMAP_URL "http://www.insecure.org/nmap" #define NMAP_PLATFORM "i686-pc-windows-windows" diff --git a/nmapfe/aclocal.m4 b/nmapfe/aclocal.m4 index ac961715b..0cb7db3e7 100644 --- a/nmapfe/aclocal.m4 +++ b/nmapfe/aclocal.m4 @@ -1,6 +1,6 @@ -# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*- +# generated automatically by aclocal 1.9.2 -*- Autoconf -*- -# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -12,58 +12,70 @@ # PARTICULAR PURPOSE. # Configure paths for GTK+ -# Owen Taylor 97-11-3 +# Owen Taylor 1997-2001 -dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) -dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS +dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) +dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES, +dnl pass to pkg-config dnl -AC_DEFUN(AM_PATH_GTK, +AC_DEFUN([AM_PATH_GTK_2_0], [dnl -dnl Get the cflags and libraries from the gtk-config script +dnl Get the cflags and libraries from pkg-config dnl -AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)], - gtk_config_prefix="$withval", gtk_config_prefix="") -AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)], - gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") -AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program], +AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program], , enable_gtktest=yes) + pkg_config_args=gtk+-2.0 for module in . $4 do case "$module" in gthread) - gtk_config_args="$gtk_config_args gthread" + pkg_config_args="$pkg_config_args gthread-2.0" ;; esac done - if test x$gtk_config_exec_prefix != x ; then - gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" - if test x${GTK_CONFIG+set} != xset ; then - GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config - fi - fi - if test x$gtk_config_prefix != x ; then - gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" - if test x${GTK_CONFIG+set} != xset ; then - GTK_CONFIG=$gtk_config_prefix/bin/gtk-config - fi + no_gtk="" + + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + + if test x$PKG_CONFIG != xno ; then + if pkg-config --atleast-pkgconfig-version 0.7 ; then + : + else + echo "*** pkg-config too old; version 0.7 or better required." + no_gtk=yes + PKG_CONFIG=no + fi + else + no_gtk=yes fi - AC_PATH_PROG(GTK_CONFIG, gtk-config, no) - min_gtk_version=ifelse([$1], ,0.99.7,$1) - AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) - no_gtk="" - if test "$GTK_CONFIG" = "no" ; then - no_gtk=yes - else - GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` - GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` - gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ + min_gtk_version=ifelse([$1], ,2.0.0,$1) + AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version) + + if test x$PKG_CONFIG != xno ; then + ## don't try to run the test against uninstalled libtool libs + if $PKG_CONFIG --uninstalled $pkg_config_args; then + echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" + enable_gtktest=no + fi + + if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then + : + else + no_gtk=yes + fi + fi + + if test x"$no_gtk" = x ; then + GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` + GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` + gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ + gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ + gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" @@ -71,8 +83,8 @@ AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$GTK_LIBS $LIBS" dnl -dnl Now check if the installed GTK is sufficiently new. (Also sanity -dnl checks the results of gtk-config to some extent +dnl Now check if the installed GTK+ is sufficiently new. (Also sanity +dnl checks the results of pkg-config to some extent) dnl rm -f conf.gtktest AC_TRY_RUN([ @@ -99,19 +111,17 @@ main () (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { - printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", + printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); - printf ("*** was found! If gtk-config was correct, then it is best\n"); + printf ("*** was found! If pkg-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); - printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); - printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); - printf("*** before re-running configure\n"); + printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); + printf("*** to point to the correct configuration files\n"); } -#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) @@ -121,7 +131,6 @@ main () printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } -#endif /* defined (GTK_MAJOR_VERSION) ... */ else { if ((gtk_major_version > major) || @@ -139,10 +148,10 @@ main () printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); + printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); - printf("*** correct copy of gtk-config. (In this case, you will have to\n"); + printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); + printf("*** correct copy of pkg-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } @@ -155,20 +164,20 @@ main () fi fi if test "x$no_gtk" = x ; then - AC_MSG_RESULT(yes) + AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) - if test "$GTK_CONFIG" = "no" ; then - echo "*** The gtk-config script installed by GTK could not be found" - echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the GTK_CONFIG environment variable to the" - echo "*** full path to gtk-config." + if test "$PKG_CONFIG" = "no" ; then + echo "*** A new enough version of pkg-config was not found." + echo "*** See http://pkgconfig.sourceforge.net" else if test -f conf.gtktest ; then : else - echo "*** Could not run GTK test program, checking why..." + echo "*** Could not run GTK+ test program, checking why..." + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" AC_TRY_LINK([ @@ -176,23 +185,16 @@ main () #include ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GTK or finding the wrong" - echo "*** version of GTK. If it is not finding GTK, you'll need to set your" + echo "*** that the run-time linker is not finding GTK+ or finding the wrong" + echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" - echo "***" - echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" - echo "*** came with the system with the command" - echo "***" - echo "*** rpm --erase --nodeps gtk gtk-devel" ], + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GTK was incorrectly installed" - echo "*** or that you have moved GTK since it was installed. In the latter case, you" - echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ]) + echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi diff --git a/nmapfe/configure b/nmapfe/configure index d4e146347..49e4c4fc1 100755 --- a/nmapfe/configure +++ b/nmapfe/configure @@ -272,7 +272,7 @@ PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="nmapfe.c" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT GTK_CONFIG GTK_CFLAGS GTK_LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os NBASEDIR LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT PKG_CONFIG GTK_CFLAGS GTK_LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os NBASEDIR LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -803,13 +803,11 @@ if test -n "$ac_init_help"; then Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-gtktest Do not try to compile and run a test GTK program + --disable-gtktest do not try to compile and run a test GTK+ program Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-gtk-prefix=PFX Prefix where GTK is installed (optional) - --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional) --with-libnbase=DIR Look for nbase include/libs in DIR Some influential environment variables: @@ -2196,22 +2194,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # [LIBS="$LIBS $GTK_LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS"], # AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?)) - -# Check whether --with-gtk-prefix or --without-gtk-prefix was given. -if test "${with_gtk_prefix+set}" = set; then - withval="$with_gtk_prefix" - gtk_config_prefix="$withval" -else - gtk_config_prefix="" -fi; - -# Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given. -if test "${with_gtk_exec_prefix+set}" = set; then - withval="$with_gtk_exec_prefix" - gtk_config_exec_prefix="$withval" -else - gtk_config_exec_prefix="" -fi; # Check whether --enable-gtktest or --disable-gtktest was given. if test "${enable_gtktest+set}" = set; then enableval="$enable_gtktest" @@ -2220,38 +2202,28 @@ else enable_gtktest=yes fi; + pkg_config_args=gtk+-2.0 for module in . do case "$module" in gthread) - gtk_config_args="$gtk_config_args gthread" + pkg_config_args="$pkg_config_args gthread-2.0" ;; esac done - if test x$gtk_config_exec_prefix != x ; then - gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" - if test x${GTK_CONFIG+set} != xset ; then - GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config - fi - fi - if test x$gtk_config_prefix != x ; then - gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" - if test x${GTK_CONFIG+set} != xset ; then - GTK_CONFIG=$gtk_config_prefix/bin/gtk-config - fi - fi + no_gtk="" - # Extract the first word of "gtk-config", so it can be a program name with args. -set dummy gtk-config; ac_word=$2 + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; 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_GTK_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $GTK_CONFIG in + case $PKG_CONFIG in [\\/]* | ?:[\\/]*) - ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path. + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2261,41 +2233,66 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_GTK_CONFIG="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_PKG_CONFIG="$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 - test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no" + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi -GTK_CONFIG=$ac_cv_path_GTK_CONFIG +PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$GTK_CONFIG"; then - echo "$as_me:$LINENO: result: $GTK_CONFIG" >&5 -echo "${ECHO_T}$GTK_CONFIG" >&6 +if test -n "$PKG_CONFIG"; then + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi - min_gtk_version=1.0.0 - echo "$as_me:$LINENO: checking for GTK - version >= $min_gtk_version" >&5 -echo $ECHO_N "checking for GTK - version >= $min_gtk_version... $ECHO_C" >&6 - no_gtk="" - if test "$GTK_CONFIG" = "no" ; then - no_gtk=yes + + if test x$PKG_CONFIG != xno ; then + if pkg-config --atleast-pkgconfig-version 0.7 ; then + : + else + echo "*** pkg-config too old; version 0.7 or better required." + no_gtk=yes + PKG_CONFIG=no + fi else - GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` - GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` - gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ + no_gtk=yes + fi + + min_gtk_version=2.0.0 + echo "$as_me:$LINENO: checking for GTK+ - version >= $min_gtk_version" >&5 +echo $ECHO_N "checking for GTK+ - version >= $min_gtk_version... $ECHO_C" >&6 + + if test x$PKG_CONFIG != xno ; then + ## don't try to run the test against uninstalled libtool libs + if $PKG_CONFIG --uninstalled $pkg_config_args; then + echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" + enable_gtktest=no + fi + + if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then + : + else + no_gtk=yes + fi + fi + + if test x"$no_gtk" = x ; then + GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` + GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` + gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` - gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ + gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` - gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ + gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" @@ -2336,19 +2333,17 @@ main () (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { - printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", + printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); - printf ("*** was found! If gtk-config was correct, then it is best\n"); + printf ("*** was found! If pkg-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); - printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); - printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); - printf("*** before re-running configure\n"); + printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); + printf("*** to point to the correct configuration files\n"); } -#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) @@ -2358,7 +2353,6 @@ main () printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } -#endif /* defined (GTK_MAJOR_VERSION) ... */ else { if ((gtk_major_version > major) || @@ -2376,10 +2370,10 @@ main () printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); + printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); - printf("*** correct copy of gtk-config. (In this case, you will have to\n"); + printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); + printf("*** correct copy of pkg-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } @@ -2415,22 +2409,22 @@ fi fi fi if test "x$no_gtk" = x ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - LIBS="$LIBS $GTK_LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" + echo "$as_me:$LINENO: result: yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" >&5 +echo "${ECHO_T}yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" >&6 + LIBS="$LIBS $GTK_LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS -DGTK_ENABLE_BROKEN" else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - if test "$GTK_CONFIG" = "no" ; then - echo "*** The gtk-config script installed by GTK could not be found" - echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the GTK_CONFIG environment variable to the" - echo "*** full path to gtk-config." + if test "$PKG_CONFIG" = "no" ; then + echo "*** A new enough version of pkg-config was not found." + echo "*** See http://pkgconfig.sourceforge.net" else if test -f conf.gtktest ; then : else - echo "*** Could not run GTK test program, checking why..." + echo "*** Could not run GTK+ test program, checking why..." + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat >conftest.$ac_ext <<_ACEOF @@ -2474,27 +2468,20 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GTK or finding the wrong" - echo "*** version of GTK. If it is not finding GTK, you'll need to set your" + echo "*** that the run-time linker is not finding GTK+ or finding the wrong" + echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" - echo "***" - echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" - echo "*** came with the system with the command" - echo "***" - echo "*** rpm --erase --nodeps gtk gtk-devel" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GTK was incorrectly installed" - echo "*** or that you have moved GTK since it was installed. In the latter case, you" - echo "*** may want to edit the gtk-config script: $GTK_CONFIG" + echo "*** exact error that occured. This usually means GTK+ is incorrectly installed." fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -3425,7 +3412,7 @@ s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t -s,@GTK_CONFIG@,$GTK_CONFIG,;t t +s,@PKG_CONFIG@,$PKG_CONFIG,;t t s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t s,@GTK_LIBS@,$GTK_LIBS,;t t s,@build@,$build,;t t diff --git a/nmapfe/configure.ac b/nmapfe/configure.ac index 6b317a7ac..dfa28668f 100644 --- a/nmapfe/configure.ac +++ b/nmapfe/configure.ac @@ -9,8 +9,8 @@ AC_PROG_CC #AM_PATH_GTK(1.0.0, # [LIBS="$LIBS $GTK_LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS"], # AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?)) -AM_PATH_GTK(1.0.0, - [LIBS="$LIBS $GTK_LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS"], +AM_PATH_GTK_2_0(2.0.0, + [LIBS="$LIBS $GTK_LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS -DGTK_ENABLE_BROKEN"], AC_DEFINE(MISSING_GTK) \ AC_MSG_WARN(NMAPFE WILL NOT BE BUILT -- BUT NMAP SHOULD STILL WORK )) diff --git a/nmapfe/nmapfe.c b/nmapfe/nmapfe.c index 936b2a012..e38907c03 100644 --- a/nmapfe/nmapfe.c +++ b/nmapfe/nmapfe.c @@ -278,7 +278,6 @@ GtkWidget *nbpage; GtkWidget *frame; GtkWidget *table; GtkAdjustment *adjust; - GtkWidget *vscroll; /* initialize our options */ opt.viewValue = 1; @@ -349,7 +348,7 @@ GtkAdjustment *adjust; /* Exit button (rightmost in hbox) */ button = gtk_button_new_with_label("Exit"); - gtk_object_set(GTK_OBJECT(button), "width", 48, NULL); + /*gtk_object_set(GTK_OBJECT(button), "width", 48, NULL);*/ gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(exitNmapFE_cb), NULL); gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); @@ -357,7 +356,7 @@ GtkAdjustment *adjust; /* Scan button (2nd right in hbox) */ opt.scanButton = gtk_toggle_button_new_with_label("Scan"); - gtk_object_set(GTK_OBJECT(opt.scanButton), "width", 72, NULL); + /*gtk_object_set(GTK_OBJECT(opt.scanButton), "width", 72, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.scanButton), "toggled", GTK_SIGNAL_FUNC(scanButton_toggled_cb), NULL); gtk_box_pack_end(GTK_BOX(hbox), opt.scanButton, FALSE, FALSE, 0); @@ -394,7 +393,8 @@ GtkAdjustment *adjust; opt.scanValue = (opt.uid == 0) ? SYN_SCAN : CONNECT_SCAN; gtk_option_menu_set_history(GTK_OPTION_MENU(opt.scanType), opt.scanValue - SCAN_OFFSET); - gtk_object_set(GTK_OBJECT(opt.scanType), "height", 26, NULL); + + /*gtk_object_set(GTK_OBJECT(opt.scanType), "height", 26, NULL);*/ gtk_table_attach_defaults(GTK_TABLE(table), opt.scanType, 0, 4, 0, 1); gtk_widget_show(opt.scanType); @@ -407,7 +407,7 @@ GtkAdjustment *adjust; opt.scanRelay = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(opt.scanRelay), 256); - gtk_object_set(GTK_OBJECT(opt.scanRelay), "width", 150, NULL); + /*gtk_object_set(GTK_OBJECT(opt.scanRelay), "width", 150, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.scanRelay), "changed", GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); if ((opt.scanValue != BOUNCE_SCAN) && (opt.scanValue != IDLE_SCAN)) @@ -433,7 +433,7 @@ GtkAdjustment *adjust; protportEntries, &opt.protportValue); gtk_option_menu_set_history(GTK_OPTION_MENU(opt.protportType), opt.protportValue - PROTPORT_OFFSET); - gtk_object_set(GTK_OBJECT(opt.protportType), "height", 26, NULL); + /* gtk_object_set(GTK_OBJECT(opt.protportType), "height", 26, NULL);*/ gtk_table_attach_defaults(GTK_TABLE(table), opt.protportType, 0, 2, 0, 1); gtk_widget_show(opt.protportType); @@ -446,7 +446,7 @@ GtkAdjustment *adjust; opt.protportRange = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(opt.protportRange), 256); - gtk_object_set(GTK_OBJECT(opt.protportRange), "width", 100, NULL); + /*gtk_object_set(GTK_OBJECT(opt.protportRange), "width", 100, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.protportRange), "changed", GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); if (opt.protportValue != GIVEN_PROTPORT) @@ -503,7 +503,7 @@ GtkAdjustment *adjust; /* Discover/Ping page (second in notebook) */ nblabel = gtk_label_new("Discover"); - nbpage = gtk_table_new(4, 4, TRUE); + nbpage = gtk_table_new(4, 4, FALSE); // nbpage = gtk_vbox_new(FALSE, 5); gtk_container_set_border_width(GTK_CONTAINER(nbpage), 5); @@ -567,7 +567,7 @@ GtkAdjustment *adjust; opt.tcpPingPorts = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(opt.tcpPingPorts), 256); - gtk_object_set(GTK_OBJECT(opt.tcpPingPorts), "width", 100, NULL); + /*gtk_object_set(GTK_OBJECT(opt.tcpPingPorts), "width", 100, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.tcpPingPorts), "changed", GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); gtk_table_attach_defaults(GTK_TABLE(table), opt.tcpPingPorts, 3, 4, 0, 1); @@ -590,7 +590,7 @@ GtkAdjustment *adjust; opt.synPingPorts = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(opt.synPingPorts), 256); - gtk_object_set(GTK_OBJECT(opt.synPingPorts), "width", 100, NULL); + /*gtk_object_set(GTK_OBJECT(opt.synPingPorts), "width", 100, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.synPingPorts), "changed", GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); if ((opt.uid != 0) || (! GTK_TOGGLE_BUTTON(opt.synPing)->active)) @@ -615,7 +615,7 @@ GtkAdjustment *adjust; opt.udpPingPorts = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(opt.udpPingPorts), 256); - gtk_object_set(GTK_OBJECT(opt.udpPingPorts), "width", 100, NULL); + /*gtk_object_set(GTK_OBJECT(opt.udpPingPorts), "width", 100, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.udpPingPorts), "changed", GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); if ((opt.uid != 0) || (! GTK_TOGGLE_BUTTON(opt.udpPing)->active)) @@ -628,6 +628,7 @@ GtkAdjustment *adjust; gtk_widget_show(nblabel); gtk_widget_show(nbpage); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), GTK_WIDGET(nbpage), GTK_WIDGET(nblabel)); @@ -650,7 +651,7 @@ GtkAdjustment *adjust; throttleEntries, &opt.throttleValue); gtk_option_menu_set_history(GTK_OPTION_MENU(opt.throttleType), opt.throttleValue - THROTTLE_OFFSET); - gtk_object_set(GTK_OBJECT(opt.throttleType), "height", 24, NULL); + /*gtk_object_set(GTK_OBJECT(opt.throttleType), "height", 24, NULL);*/ gtk_table_attach_defaults(GTK_TABLE(table), opt.throttleType, 0, 2, 0, 1); gtk_widget_show(opt.throttleType); @@ -666,7 +667,7 @@ GtkAdjustment *adjust; gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.ipv4TtlValue), TRUE); gtk_signal_connect(GTK_OBJECT(opt.ipv4Ttl), "released", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.ipv4TtlValue); - gtk_object_set(GTK_OBJECT(opt.ipv4TtlValue), "width", 55, NULL); + /* gtk_object_set(GTK_OBJECT(opt.ipv4TtlValue), "width", 55, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.ipv4TtlValue), "changed", GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); if ((opt.uid != 0) || (! GTK_TOGGLE_BUTTON(opt.ipv4Ttl)->active)) @@ -684,7 +685,7 @@ GtkAdjustment *adjust; adjust = (GtkAdjustment *) gtk_adjustment_new(1.0, 1.0, 150.0, 1.0, 10.0, 10.0); opt.minParSocks = gtk_spin_button_new(adjust, 1.0, 0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.minParSocks), TRUE); - gtk_object_set(GTK_OBJECT(opt.minParSocks), "width", 55, NULL); + /*gtk_object_set(GTK_OBJECT(opt.minParSocks), "width", 55, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.minPar), "released", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.minParSocks); gtk_signal_connect(GTK_OBJECT(opt.minParSocks), "changed", @@ -704,7 +705,7 @@ GtkAdjustment *adjust; adjust = (GtkAdjustment *) gtk_adjustment_new(1.0, 1.0, 1500.0, 1.0, 10.0, 10.0); opt.maxParSocks = gtk_spin_button_new(adjust, 1.0, 0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.maxParSocks), TRUE); - gtk_object_set(GTK_OBJECT(opt.maxParSocks), "width", 55, NULL); + /*gtk_object_set(GTK_OBJECT(opt.maxParSocks), "width", 55, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.maxPar), "released", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.maxParSocks); gtk_signal_connect(GTK_OBJECT(opt.maxParSocks), "changed", @@ -723,7 +724,7 @@ GtkAdjustment *adjust; adjust = (GtkAdjustment *) gtk_adjustment_new(6000.0, 0.0, 9999999.0, 10.0, 100.0, 100.0); opt.startRttTime = gtk_spin_button_new(adjust, 10.0, 0); - gtk_object_set(GTK_OBJECT(opt.startRttTime), "width", 75, NULL); + /* gtk_object_set(GTK_OBJECT(opt.startRttTime), "width", 75, NULL);*/ gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.startRttTime), TRUE); gtk_signal_connect(GTK_OBJECT(opt.startRtt), "released", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.startRttTime); @@ -750,7 +751,7 @@ GtkAdjustment *adjust; adjust = (GtkAdjustment *) gtk_adjustment_new(6000.0, 1.0, 9999999.0, 10.0, 100.0, 100.0); opt.minRttTime = gtk_spin_button_new(adjust, 10.0, 0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.minRttTime), TRUE); - gtk_object_set(GTK_OBJECT(opt.minRttTime), "width", 75, NULL); + /*gtk_object_set(GTK_OBJECT(opt.minRttTime), "width", 75, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.minRtt), "released", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.minRttTime); gtk_signal_connect(GTK_OBJECT(opt.minRttTime), "changed", @@ -776,7 +777,7 @@ GtkAdjustment *adjust; adjust = (GtkAdjustment *) gtk_adjustment_new(6000.0, 6.0, 9999999.0, 10.0, 100.0, 100.0); opt.maxRttTime = gtk_spin_button_new(adjust, 10.0, 0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.maxRttTime), TRUE); - gtk_object_set(GTK_OBJECT(opt.maxRttTime), "width", 75, NULL); + /*gtk_object_set(GTK_OBJECT(opt.maxRttTime), "width", 75, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.maxRtt), "released", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.maxRttTime); gtk_signal_connect(GTK_OBJECT(opt.maxRttTime), "changed", @@ -802,7 +803,7 @@ GtkAdjustment *adjust; adjust = (GtkAdjustment *) gtk_adjustment_new(6000.0, 201.0, 9999999.0, 10.0, 100.0, 100.0); opt.hostTimeoutTime = gtk_spin_button_new(adjust, 10.0, 0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.hostTimeoutTime), TRUE); - gtk_object_set(GTK_OBJECT(opt.hostTimeoutTime), "width", 75, NULL); + /*gtk_object_set(GTK_OBJECT(opt.hostTimeoutTime), "width", 75, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.hostTimeout), "released", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.hostTimeoutTime); gtk_signal_connect(GTK_OBJECT(opt.hostTimeoutTime), "changed", @@ -828,7 +829,7 @@ GtkAdjustment *adjust; adjust = (GtkAdjustment *) gtk_adjustment_new(6000.0, 1.0, 9999999.0, 10.0, 100.0, 100.0); opt.scanDelayTime = gtk_spin_button_new(adjust, 10.0, 0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.scanDelayTime), TRUE); - gtk_object_set(GTK_OBJECT(opt.scanDelayTime), "width", 75, NULL); + /*gtk_object_set(GTK_OBJECT(opt.scanDelayTime), "width", 75, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.scanDelay), "released", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.scanDelayTime); gtk_signal_connect(GTK_OBJECT(opt.scanDelayTime), "changed", @@ -850,6 +851,7 @@ GtkAdjustment *adjust; gtk_widget_show(nblabel); gtk_widget_show(nbpage); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), GTK_WIDGET(nbpage), GTK_WIDGET(nblabel)); @@ -876,7 +878,7 @@ GtkAdjustment *adjust; opt.inputFilename = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(opt.inputFilename), 256); - gtk_object_set(GTK_OBJECT(opt.inputFilename), "width", 110, NULL); + /* gtk_object_set(GTK_OBJECT(opt.inputFilename), "width", 110, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.inputFilename), "changed", GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); gtk_widget_set_sensitive(GTK_WIDGET(opt.inputFilename), @@ -913,7 +915,7 @@ GtkAdjustment *adjust; opt.outputFilename = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(opt.outputFilename), 256); - gtk_object_set(GTK_OBJECT(opt.outputFilename), "width", 110, NULL); + /*gtk_object_set(GTK_OBJECT(opt.outputFilename), "width", 110, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.outputFilename), "changed", GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); gtk_widget_set_sensitive(GTK_WIDGET(opt.outputFilename), @@ -939,7 +941,7 @@ GtkAdjustment *adjust; outputFormatEntries, &opt.outputFormatValue); gtk_option_menu_set_history(GTK_OPTION_MENU(opt.outputFormatType), opt.outputFormatValue - OUTPUT_OFFSET); - gtk_object_set(GTK_OBJECT(opt.outputFormatType), "height", 24, NULL); + /* gtk_object_set(GTK_OBJECT(opt.outputFormatType), "height", 24, NULL);*/ gtk_widget_set_sensitive(GTK_WIDGET(opt.outputFormatType), GTK_TOGGLE_BUTTON(opt.useOutputFile)->active); gtk_table_attach_defaults(GTK_TABLE(table), opt.outputFormatType, 2, 4, 3, 4); @@ -958,6 +960,7 @@ GtkAdjustment *adjust; gtk_widget_show(nblabel); gtk_widget_show(nbpage); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), GTK_WIDGET(nbpage), GTK_WIDGET(nblabel)); @@ -979,7 +982,7 @@ GtkAdjustment *adjust; resolveEntries, &opt.resolveValue); gtk_option_menu_set_history(GTK_OPTION_MENU(opt.resolveType), opt.resolveValue - RESOLVE_OFFSET); - gtk_object_set(GTK_OBJECT(opt.resolveType), "height", 24, NULL); + /*gtk_object_set(GTK_OBJECT(opt.resolveType), "height", 24, NULL);*/ gtk_box_pack_start(GTK_BOX(vbox), opt.resolveType, TRUE, FALSE, 0); gtk_widget_show(opt.resolveType); @@ -998,7 +1001,7 @@ GtkAdjustment *adjust; verboseEntries, &opt.verboseValue); gtk_option_menu_set_history(GTK_OPTION_MENU(opt.verboseType), opt.verboseValue - VERBOSE_OFFSET); - gtk_object_set(GTK_OBJECT(opt.verboseType), "height", 24, NULL); + /* gtk_object_set(GTK_OBJECT(opt.verboseType), "height", 24, NULL);*/ gtk_box_pack_start(GTK_BOX(vbox), opt.verboseType, TRUE, FALSE, 0); gtk_widget_show(opt.verboseType); @@ -1024,7 +1027,7 @@ GtkAdjustment *adjust; opt.SourceDevice = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(opt.SourceDevice), 64); - gtk_object_set(GTK_OBJECT(opt.SourceDevice), "width", 110, NULL); + /*gtk_object_set(GTK_OBJECT(opt.SourceDevice), "width", 110, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.useSourceDevice), "toggled", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.SourceDevice); gtk_signal_connect(GTK_OBJECT(opt.SourceDevice), "changed", @@ -1045,7 +1048,7 @@ GtkAdjustment *adjust; opt.SourcePort = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(opt.SourcePort), 64); - gtk_object_set(GTK_OBJECT(opt.SourcePort), "width", 110, NULL); + /*gtk_object_set(GTK_OBJECT(opt.SourcePort), "width", 110, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.useSourcePort), "toggled", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.SourcePort); gtk_signal_connect(GTK_OBJECT(opt.SourcePort), "changed", @@ -1066,7 +1069,7 @@ GtkAdjustment *adjust; opt.SourceIP = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(opt.SourceIP), 64); - gtk_object_set(GTK_OBJECT(opt.SourceIP), "width", 110, NULL); + /*gtk_object_set(GTK_OBJECT(opt.SourceIP), "width", 110, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.useSourceIP), "toggled", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.SourceIP); gtk_signal_connect(GTK_OBJECT(opt.SourceIP), "changed", @@ -1087,7 +1090,7 @@ GtkAdjustment *adjust; opt.Decoy = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(opt.Decoy), 256); - gtk_object_set(GTK_OBJECT(opt.Decoy), "width", 110, NULL); + /*gtk_object_set(GTK_OBJECT(opt.Decoy), "width", 110, NULL);*/ gtk_signal_connect(GTK_OBJECT(opt.useDecoy), "toggled", GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.Decoy); gtk_signal_connect(GTK_OBJECT(opt.Decoy), "changed", @@ -1141,29 +1144,32 @@ GtkAdjustment *adjust; gtk_widget_show(nblabel); gtk_widget_show(nbpage); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), GTK_WIDGET(nbpage), GTK_WIDGET(nblabel)); - + gtk_box_pack_start(GTK_BOX(main_vbox), notebook, FALSE, TRUE, 5); gtk_widget_show(notebook); -/* output box (variable; below notebook) */ - hbox = gtk_hbox_new(FALSE, 0); - gtk_box_pack_start(GTK_BOX(main_vbox), hbox, TRUE, TRUE, 5); + /* output box (variable; below notebook) */ + hbox = gtk_hbox_new(FALSE, 0); + gtk_box_pack_start(GTK_BOX(main_vbox), hbox, TRUE, TRUE, 5); -/* text widget with scroll bar */ - opt.output = gtk_text_new(NULL, NULL); - gtk_box_pack_start(GTK_BOX(hbox), opt.output, TRUE, TRUE, 0); - gtk_text_set_word_wrap(GTK_TEXT(opt.output), 1); - gtk_widget_set_usize(opt.output, 500, 248); - gtk_widget_show(opt.output); - gtk_widget_realize(opt.output); + /* text widget with scroll bar */ + { + GtkWidget *sw; + sw = gtk_scrolled_window_new(NULL, NULL); + gtk_box_pack_start(GTK_BOX(main_vbox), sw, TRUE, TRUE, 5); - vscroll = gtk_vscrollbar_new(GTK_TEXT(opt.output)->vadj); - gtk_box_pack_end (GTK_BOX(hbox), vscroll, FALSE, FALSE, 0); - gtk_widget_show(vscroll); - - gtk_widget_show(hbox); + opt.output = gtk_text_new(NULL, NULL); + gtk_container_add(GTK_CONTAINER(sw),opt.output); + gtk_text_set_word_wrap(GTK_TEXT(opt.output), 1); + gtk_widget_set_usize(opt.output, 500, 248); + gtk_widget_show(opt.output); + gtk_widget_realize(opt.output); + + gtk_widget_show(sw); + } /* status hbox at bottom */ @@ -1198,19 +1204,24 @@ GtkWidget *vbox; GtkWidget *notebook; GtkWidget *text; GtkWidget *label; -GtkWidget *hbox; -GtkWidget *button; - aboutDialog = gtk_window_new(GTK_WINDOW_TOPLEVEL); + aboutDialog = gtk_dialog_new_with_buttons("About NmapFE & Nmap", + NULL, + GTK_DIALOG_MODAL, + GTK_STOCK_OK, + GTK_RESPONSE_NONE, + NULL); + + + g_signal_connect_swapped (aboutDialog, + "response", + G_CALLBACK (gtk_widget_destroy), + aboutDialog); + gtk_widget_set_usize(aboutDialog, 200, 200); - gtk_window_set_title(GTK_WINDOW(aboutDialog), "About NmapFE & Nmap"); - gtk_window_set_policy(GTK_WINDOW(aboutDialog), FALSE, FALSE, FALSE); gtk_window_position(GTK_WINDOW(aboutDialog), GTK_WIN_POS_CENTER); - vbox = gtk_vbox_new(FALSE, 0); - gtk_widget_show(vbox); - gtk_container_add(GTK_CONTAINER(aboutDialog), vbox); - gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); + vbox = GTK_DIALOG(aboutDialog)->vbox; notebook = gtk_notebook_new(); gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0); @@ -1241,17 +1252,6 @@ GtkWidget *button; gtk_widget_show(notebook); - hbox = gtk_hbox_new(FALSE, 0); - gtk_widget_show(hbox); - gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 5); - - button = gtk_button_new_with_label("OK"); - gtk_widget_show(button); - gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0); - gtk_signal_connect_object(GTK_OBJECT(button), "clicked", - GTK_SIGNAL_FUNC(gtk_widget_destroy), - (gpointer) aboutDialog); - return(aboutDialog); } @@ -1293,19 +1293,24 @@ GtkWidget *vbox; GtkWidget *notebook; GtkWidget *text; GtkWidget *label; -GtkWidget *hbox; -GtkWidget *button; - helpDialog = gtk_window_new(GTK_WINDOW_DIALOG); + helpDialog = gtk_dialog_new_with_buttons("Help With NmapFE", + NULL, + GTK_DIALOG_MODAL, + GTK_STOCK_OK, + GTK_RESPONSE_NONE, + NULL); + + + g_signal_connect_swapped (helpDialog, + "response", + G_CALLBACK (gtk_widget_destroy), + helpDialog); + gtk_widget_set_usize(helpDialog, 400, 300); - gtk_window_set_title(GTK_WINDOW(helpDialog), "Help With NmapFE"); - gtk_window_set_policy(GTK_WINDOW(helpDialog), FALSE, FALSE, FALSE); gtk_window_position(GTK_WINDOW(helpDialog), GTK_WIN_POS_CENTER); - vbox = gtk_vbox_new(FALSE, 0); - gtk_widget_show(vbox); - gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); - gtk_container_add(GTK_CONTAINER(helpDialog), vbox); + vbox = GTK_DIALOG(helpDialog)->vbox; notebook = gtk_notebook_new(); gtk_widget_show(notebook); @@ -1369,17 +1374,6 @@ GtkWidget *button; gtk_widget_show(notebook); - hbox = gtk_hbox_new(FALSE, 0); - gtk_widget_show(hbox); - gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 5); - - button = gtk_button_new_with_label("OK"); - gtk_widget_show(button); - gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0); - gtk_signal_connect_object(GTK_OBJECT(button), "clicked", - GTK_SIGNAL_FUNC(gtk_widget_destroy), - (gpointer) helpDialog); - return(helpDialog); } diff --git a/nmapfe/nmapfe_sig.c b/nmapfe/nmapfe_sig.c index 8d94c6108..d6456b813 100644 --- a/nmapfe/nmapfe_sig.c +++ b/nmapfe/nmapfe_sig.c @@ -272,7 +272,7 @@ void openLog(char *filename) void okButton_clicked_cb(GtkWidget *window, GtkButton *button) { -char *selected = gtk_file_selection_get_filename(GTK_FILE_SELECTION(window)); +const char *selected = gtk_file_selection_get_filename(GTK_FILE_SELECTION(window)); void (*action)() = gtk_object_get_data(GTK_OBJECT(window), "NmapFE_action"); GtkEntry *entry = gtk_object_get_data(GTK_OBJECT(window), "NmapFE_entry"); char *filename = gtk_object_get_data(GTK_OBJECT(window), "NmapFE_filename"); @@ -453,7 +453,7 @@ static int command_size = 0; } else if (opt.scanValue == SYN_SCAN) { strcat(command, "-sS "); } else if ((opt.scanValue == BOUNCE_SCAN) || (opt.scanValue == IDLE_SCAN)) { - char *val = gtk_entry_get_text(GTK_ENTRY(opt.scanRelay)); + const char *val = gtk_entry_get_text(GTK_ENTRY(opt.scanRelay)); if (val) { strcat(command, (opt.scanValue == IDLE_SCAN) ? "-sI " : "-b "); @@ -480,7 +480,7 @@ static int command_size = 0; else if (opt.protportValue == ALL_PROTPORT) strcat(command, "-p- "); else if (opt.protportValue == GIVEN_PROTPORT) { - char *val = gtk_entry_get_text(GTK_ENTRY(opt.protportRange)); + const char *val = gtk_entry_get_text(GTK_ENTRY(opt.protportRange)); if (val && *val) { strcat(command, "-p "); @@ -504,7 +504,7 @@ static int command_size = 0; strcat(command, "-PM "); if (GTK_WIDGET_SENSITIVE(opt.tcpPing) && GTK_TOGGLE_BUTTON(opt.tcpPing)->active) { - char *val = gtk_entry_get_text(GTK_ENTRY(opt.tcpPingPorts)); + const char *val = gtk_entry_get_text(GTK_ENTRY(opt.tcpPingPorts)); strcat(command, "-PT"); if (val && *val) @@ -513,7 +513,7 @@ static int command_size = 0; } if (GTK_WIDGET_SENSITIVE(opt.synPing) && GTK_TOGGLE_BUTTON(opt.synPing)->active) { - char *val = gtk_entry_get_text(GTK_ENTRY(opt.synPingPorts)); + const char *val = gtk_entry_get_text(GTK_ENTRY(opt.synPingPorts)); strcat(command, "-PS"); if (val && *val) @@ -522,7 +522,7 @@ static int command_size = 0; } if (GTK_WIDGET_SENSITIVE(opt.udpPing) && GTK_TOGGLE_BUTTON(opt.udpPing)->active) { - char *val = gtk_entry_get_text(GTK_ENTRY(opt.udpPingPorts)); + const char *val = gtk_entry_get_text(GTK_ENTRY(opt.udpPingPorts)); strcat(command, "-PU"); if (val && *val) @@ -591,7 +591,7 @@ static int command_size = 0; if (GTK_WIDGET_SENSITIVE(opt.useDecoy) && GTK_TOGGLE_BUTTON(opt.useDecoy)->active) { - char *val = gtk_entry_get_text(GTK_ENTRY(opt.Decoy)); + const char *val = gtk_entry_get_text(GTK_ENTRY(opt.Decoy)); if (val && *val) { strcat(command, "-D "); @@ -602,7 +602,7 @@ static int command_size = 0; if (GTK_WIDGET_SENSITIVE(opt.useSourceDevice) && GTK_TOGGLE_BUTTON(opt.useSourceDevice)->active) { - char *val = gtk_entry_get_text(GTK_ENTRY(opt.SourceDevice)); + const char *val = gtk_entry_get_text(GTK_ENTRY(opt.SourceDevice)); if (val && *val) { strcat(command, "-e "); @@ -613,7 +613,7 @@ static int command_size = 0; if (GTK_WIDGET_SENSITIVE(opt.useSourceIP) && GTK_TOGGLE_BUTTON(opt.useSourceIP)->active) { - char *val = gtk_entry_get_text(GTK_ENTRY(opt.SourceIP)); + const char *val = gtk_entry_get_text(GTK_ENTRY(opt.SourceIP)); if (val && *val) { strcat(command, "-S "); @@ -624,7 +624,7 @@ static int command_size = 0; if (GTK_WIDGET_SENSITIVE(opt.useSourcePort) && GTK_TOGGLE_BUTTON(opt.useSourcePort)->active) { - char *val = gtk_entry_get_text(GTK_ENTRY(opt.SourcePort)); + const char *val = gtk_entry_get_text(GTK_ENTRY(opt.SourcePort)); if (val && *val) { strcat(command, "-g "); @@ -647,7 +647,7 @@ static int command_size = 0; if (GTK_WIDGET_SENSITIVE(opt.useInputFile) && GTK_TOGGLE_BUTTON(opt.useInputFile)->active) { - char *val = gtk_entry_get_text(GTK_ENTRY(opt.inputFilename)); + const char *val = gtk_entry_get_text(GTK_ENTRY(opt.inputFilename)); if (val && *val) { strcat(command, "-iL "); @@ -658,7 +658,7 @@ static int command_size = 0; if (GTK_WIDGET_SENSITIVE(opt.useOutputFile) && GTK_TOGGLE_BUTTON(opt.useOutputFile)->active) { - char *val = gtk_entry_get_text(GTK_ENTRY(opt.outputFilename)); + const char *val = gtk_entry_get_text(GTK_ENTRY(opt.outputFilename)); if (val && *val) { if (opt.outputFormatValue == NORMAL_OUTPUT) @@ -710,7 +710,7 @@ void display_nmap_command_cb(GtkWidget *target_option, void *ignored) void browseButton_pressed_cb(GtkWidget *widget, GtkWidget *text) { static char filename[FILENAME_MAX+1] = ""; -char *name = gtk_entry_get_text(GTK_ENTRY(text)); +const char *name = gtk_entry_get_text(GTK_ENTRY(text)); if (name && *name) { strncpy(filename, name, FILENAME_MAX); diff --git a/scripts/Makefile b/scripts/Makefile index 9b6676cdd..d2ddde3e7 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -211,7 +211,8 @@ distro: # Make the actual RPM # Note -- on newer systems rpmbuild -ta is needed instead. # rpm -ta /usr/tmp/nmap-$(NMAP_VERSION).tgz - rpmbuild -ta --define "buildfe 0" --define "static 1" /usr/tmp/nmap-$(NMAP_VERSION).tgz +# rpmbuild -ta --define "buildfe 0" --define "static 1" /usr/tmp/nmap-$(NMAP_VERSION).tgz + rpmbuild -ta --define "static 1" /usr/tmp/nmap-$(NMAP_VERSION).tgz cp -f $(RPMTDIR)/RPMS/x86_64/nmap-$(NMAP_VERSION)-1.x86_64.rpm /usr/tmp # cp -f $(RPMTDIR)/RPMS/i386/nmap-$(NMAP_VERSION)-1.i386.rpm /usr/tmp # cp -f $(RPMTDIR)/RPMS/i386/nmap-frontend-$(NMAP_VERSION)-1.i386.rpm /usr/tmp