Nmap Development mailing list archives

Re: [nmap-svn] r32532 - in nmap: . nsock/examples


From: Jacek Wielemborek <wielemborekj1 () gmail com>
Date: Wed, 27 Nov 2013 14:21:47 +0100

2013/11/27  <commit-mailer () nmap org>:
Author: dmiller
Date: Wed Nov 27 13:32:05 2013
New Revision: 32532

Log:
Revert r32528, was not tested on Windows


Modified:
   nmap/FPEngine.cc
   nmap/FingerPrintResults.h
   nmap/NmapOps.cc
   nmap/NmapOps.h
   nmap/idle_scan.h
   nmap/nmap.cc
   nmap/nmap.h
   nmap/nmap_dns.cc
   nmap/nmap_dns.h
   nmap/nmap_error.cc
   nmap/nmap_tty.cc
   nmap/nmap_tty.h
   nmap/nse_main.cc
   nmap/nse_main.h
   nmap/nse_ssl_cert.h
   nmap/nsock/examples/nsock_telnet.c
   nmap/nsock/examples/nsock_test_timers.c
   nmap/osscan.h
   nmap/osscan2.cc
   nmap/osscan2.h
   nmap/output.cc
   nmap/output.h
   nmap/payload.cc
   nmap/protocols.h
   nmap/scan_engine.h
   nmap/service_scan.h
   nmap/services.h
   nmap/targets.h
   nmap/tcpip.h
   nmap/timing.cc
   nmap/timing.h
   nmap/traceroute.h
   nmap/utils.cc
   nmap/utils.h

Modified: nmap/FPEngine.cc
==============================================================================
--- nmap/FPEngine.cc    (original)
+++ nmap/FPEngine.cc    Wed Nov 27 13:32:05 2013
@@ -132,7 +132,6 @@
 #include "osscan.h"
 #include "libnetutil/npacket.h"
 #include "linear.h"
-#include <math.h>
 extern NmapOps o;



Modified: nmap/FingerPrintResults.h
==============================================================================
--- nmap/FingerPrintResults.h   (original)
+++ nmap/FingerPrintResults.h   Wed Nov 27 13:32:05 2013
@@ -130,6 +130,7 @@
 class FingerPrintResults;

 #include "nmap.h"
+#include "global_structures.h"
 #include "FPEngine.h"

 /* Maximum number of results allowed in one of these things ... */

Modified: nmap/NmapOps.cc
==============================================================================
--- nmap/NmapOps.cc     (original)
+++ nmap/NmapOps.cc     Wed Nov 27 13:32:05 2013
@@ -124,6 +124,7 @@

 /* $Id$ */
 #include "nmap.h"
+#include "nbase.h"
 #include "NmapOps.h"
 #include "services.h"
 #include "utils.h"

Modified: nmap/NmapOps.h
==============================================================================
--- nmap/NmapOps.h      (original)
+++ nmap/NmapOps.h      Wed Nov 27 13:32:05 2013
@@ -124,10 +124,8 @@

 /* $Id$ */

-#ifndef NMAPOPS_H
-#define NMAPOPS_H
-
 #include "nmap.h"
+#include "global_structures.h"
 #include "output.h"
 #include <nsock.h>
 #include <string>
@@ -426,4 +424,4 @@
   u8 spoof_mac[6];
   bool spoof_mac_set;
 };
-#endif /* NMAPOPS_H */
+

Modified: nmap/idle_scan.h
==============================================================================
--- nmap/idle_scan.h    (original)
+++ nmap/idle_scan.h    Wed Nov 27 13:32:05 2013
@@ -132,6 +132,8 @@
 #define IDLE_SCAN_H

 #include "nmap.h"
+#include "global_structures.h"
+#include <nbase.h>

 class Target;


Modified: nmap/nmap.cc
==============================================================================
--- nmap/nmap.cc        (original)
+++ nmap/nmap.cc        Wed Nov 27 13:32:05 2013
@@ -129,10 +129,12 @@
 #include "osscan2.h"
 #include "scan_engine.h"
 #include "idle_scan.h"
+#include "timing.h"
 #include "NmapOps.h"
 #include "MACLookup.h"
 #include "traceroute.h"
 #include "nmap_tty.h"
+#include "nmap_dns.h"
 #include "services.h"
 #include "protocols.h"
 #include "targets.h"
@@ -143,10 +145,6 @@
 #include "utils.h"
 #include "xml.h"

-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
 #ifndef NOLUA
 #include "nse_main.h"
 #endif

Modified: nmap/nmap.h
==============================================================================
--- nmap/nmap.h (original)
+++ nmap/nmap.h Wed Nov 27 13:32:05 2013
@@ -173,6 +173,9 @@
 #include <bstring.h>
 #endif

+#include <ctype.h>
+#include <sys/types.h>
+
 #ifndef WIN32  /* from nmapNT -- seems to work */
 #include <sys/wait.h>
 #endif /* !WIN32 */
@@ -181,6 +184,8 @@
 #include <sys/param.h> /* Defines MAXHOSTNAMELEN on BSD*/
 #endif

+#include <stdio.h>
+
 #if HAVE_RPC_TYPES_H
 #include <rpc/types.h>
 #endif
@@ -189,10 +194,14 @@
 #include <sys/socket.h>
 #endif

+#include <sys/stat.h>
+
 #if HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif

+#include <errno.h>
+
 #if HAVE_NETDB_H
 #include <netdb.h>
 #endif
@@ -208,6 +217,8 @@
 # endif
 #endif

+#include <fcntl.h>
+#include <stdarg.h>

 #ifdef HAVE_PWD_H
 #include <pwd.h>
@@ -225,6 +236,7 @@
 /* Keep assert() defined for security reasons */
 #undef NDEBUG

+#include <math.h>
 #include <assert.h>

 #if HAVE_SYS_RESOURCE_H

Modified: nmap/nmap_dns.cc
==============================================================================
--- nmap/nmap_dns.cc    (original)
+++ nmap/nmap_dns.cc    Wed Nov 27 13:32:05 2013
@@ -194,6 +194,7 @@
 #include <stdlib.h>
 #include <limits.h>
 #include <list>
+#include <vector>
 #include <algorithm>

 extern NmapOps o;

Modified: nmap/nmap_dns.h
==============================================================================
--- nmap/nmap_dns.h     (original)
+++ nmap/nmap_dns.h     Wed Nov 27 13:32:05 2013
@@ -120,8 +120,6 @@
  *                                                                         *
  ***************************************************************************/

-#ifndef NMAP_DNS_H
-#define NMAP_DNS_H
 class Target;

 #include "nbase.h"
@@ -133,4 +131,3 @@
 const char *lookup_cached_host(u32 ip);

 std::list<std::string> get_dns_servers();
-#endif /* NMAP_DNS_H */

Modified: nmap/nmap_error.cc
==============================================================================
--- nmap/nmap_error.cc  (original)
+++ nmap/nmap_error.cc  Wed Nov 27 13:32:05 2013
@@ -127,7 +127,6 @@
 #include "output.h"
 #include "NmapOps.h"
 #include "xml.h"
-#include <errno.h>

 extern NmapOps o;


Modified: nmap/nmap_tty.cc
==============================================================================
--- nmap/nmap_tty.cc    (original)
+++ nmap/nmap_tty.cc    Wed Nov 27 13:32:05 2013
@@ -121,6 +121,10 @@
  *                                                                         *
  ***************************************************************************/

+#ifndef WIN32
+#include "nmap_config.h"
+#endif
+
 #include "nmap.h"

 #include <sys/types.h>

Modified: nmap/nmap_tty.h
==============================================================================
--- nmap/nmap_tty.h     (original)
+++ nmap/nmap_tty.h     Wed Nov 27 13:32:05 2013
@@ -121,9 +121,6 @@
  *                                                                         *
  ***************************************************************************/

-#ifndef NMAP_TTY_H
-#define NMAP_TTY_H
-
 /*
  * Initializes the terminal for unbuffered non-blocking input. Also
  * registers tty_done() via atexit().  You need to call this before
@@ -136,4 +133,4 @@
    being returned means a nonstandard key has been pressed and the
    calling method should print a status message */
 bool keyWasPressed();
-#endif /* NMAP_TTY_H */
+

Modified: nmap/nse_main.cc
==============================================================================
--- nmap/nse_main.cc    (original)
+++ nmap/nse_main.cc    Wed Nov 27 13:32:05 2013
@@ -1,4 +1,5 @@
 #include "nmap.h"
+#include "nbase.h"
 #include "nmap_error.h"
 #include "portlist.h"
 #include "nsock.h"
@@ -7,7 +8,6 @@
 #include "Target.h"
 #include "nmap_tty.h"
 #include "xml.h"
-#include <math.h>

 #include "nse_main.h"
 #include "nse_utility.h"

Modified: nmap/nse_main.h
==============================================================================
--- nmap/nse_main.h     (original)
+++ nmap/nse_main.h     Wed Nov 27 13:32:05 2013
@@ -14,6 +14,7 @@
 }

 #include "nmap.h"
+#include "global_structures.h"

 class ScriptResult
 {

Modified: nmap/nse_ssl_cert.h
==============================================================================
--- nmap/nse_ssl_cert.h (original)
+++ nmap/nse_ssl_cert.h Wed Nov 27 13:32:05 2013
@@ -122,9 +122,6 @@
  ***************************************************************************/

 /* $Id:$ */
-#ifndef NSE_SSL_CERT_H
-#define NSE_SSL_CERT_H

 int l_get_ssl_certificate(lua_State *L);
 void nse_nsock_init_ssl_cert(lua_State *L);
-#endif /* NSE_SSL_CERT_H */

Modified: nmap/nsock/examples/nsock_telnet.c
==============================================================================
--- nmap/nsock/examples/nsock_telnet.c  (original)
+++ nmap/nsock/examples/nsock_telnet.c  Wed Nov 27 13:32:05 2013
@@ -64,7 +64,9 @@
 #include <arpa/inet.h>
 #include <netdb.h>
 #include <unistd.h>
+#include <stdlib.h>
 #include <string.h>
+#include <stdio.h>
 #include <assert.h>
 #include <sys/time.h>


Modified: nmap/nsock/examples/nsock_test_timers.c
==============================================================================
--- nmap/nsock/examples/nsock_test_timers.c     (original)
+++ nmap/nsock/examples/nsock_test_timers.c     Wed Nov 27 13:32:05 2013
@@ -64,6 +64,7 @@
 #include <arpa/inet.h>
 #include <netdb.h>
 #include <unistd.h>
+#include <stdlib.h>
 #include <time.h>
 #include <assert.h>


Modified: nmap/osscan.h
==============================================================================
--- nmap/osscan.h       (original)
+++ nmap/osscan.h       Wed Nov 27 13:32:05 2013
@@ -128,6 +128,7 @@
 #define OSSCAN_H

 #include "nmap.h"
+#include "global_structures.h"
 #include "FingerPrintResults.h"
 #include "Target.h"


Modified: nmap/osscan2.cc
==============================================================================
--- nmap/osscan2.cc     (original)
+++ nmap/osscan2.cc     Wed Nov 27 13:32:05 2013
@@ -137,7 +137,6 @@
 #include "struct_ip.h"

 #include <list>
-#include <math.h>

 extern NmapOps o;


Modified: nmap/osscan2.h
==============================================================================
--- nmap/osscan2.h      (original)
+++ nmap/osscan2.h      Wed Nov 27 13:32:05 2013
@@ -129,6 +129,8 @@
 #define OSSCAN2_H

 #include "nmap.h"
+#include "global_structures.h"
+#include "nbase.h"
 #include <vector>
 #include <list>
 #include "Target.h"

Modified: nmap/output.cc
==============================================================================
--- nmap/output.cc      (original)
+++ nmap/output.cc      Wed Nov 27 13:32:05 2013
@@ -139,10 +139,12 @@
 #include "Target.h"
 #include "utils.h"
 #include "xml.h"
+#include "nbase.h"
 #include "libnetutil/netutil.h"

 #include <math.h>

+#include <set>
 #include <vector>
 #include <list>
 #include <sstream>

Modified: nmap/output.h
==============================================================================
--- nmap/output.h       (original)
+++ nmap/output.h       Wed Nov 27 13:32:05 2013
@@ -165,6 +165,7 @@

 #include "portlist.h"
 #include "nmap.h"
+#include "global_structures.h"
 #include <nsock.h>

 #include <string>

Modified: nmap/payload.cc
==============================================================================
--- nmap/payload.cc     (original)
+++ nmap/payload.cc     Wed Nov 27 13:32:05 2013
@@ -134,6 +134,7 @@
 #include <map>

 #include "NmapOps.h"
+#include "nbase.h"
 #include "payload.h"
 #include "utils.h"


Modified: nmap/protocols.h
==============================================================================
--- nmap/protocols.h    (original)
+++ nmap/protocols.h    Wed Nov 27 13:32:05 2013
@@ -132,6 +132,8 @@
 #endif

 #include "nmap.h"
+#include "global_structures.h"
+#include "nbase.h"

 #define PROTOCOL_TABLE_SIZE 256


Modified: nmap/scan_engine.h
==============================================================================
--- nmap/scan_engine.h  (original)
+++ nmap/scan_engine.h  Wed Nov 27 13:32:05 2013
@@ -129,6 +129,7 @@
 #define SCAN_ENGINE_H

 #include "nmap.h"
+#include "global_structures.h"
 #include <vector>

 struct probespec_tcpdata {

Modified: nmap/service_scan.h
==============================================================================
--- nmap/service_scan.h (original)
+++ nmap/service_scan.h Wed Nov 27 13:32:05 2013
@@ -129,6 +129,7 @@
 #define SERVICE_SCAN_H

 #include "nmap.h"
+#include "global_structures.h"
 #include "portlist.h"

 #include <vector>

Modified: nmap/services.h
==============================================================================
--- nmap/services.h     (original)
+++ nmap/services.h     Wed Nov 27 13:32:05 2013
@@ -128,7 +128,15 @@
 #ifndef SERVICES_H
 #define SERVICES_H

+#ifdef WIN32
+#include "mswin32\winclude.h"
+#else
+#include <netdb.h>
+#endif
 #include "nmap.h"
+#include "global_structures.h"
+
+#include "nbase.h"

 #define SERVICE_TABLE_SIZE 1024


Modified: nmap/targets.h
==============================================================================
--- nmap/targets.h      (original)
+++ nmap/targets.h      Wed Nov 27 13:32:05 2013
@@ -127,7 +127,29 @@
 #ifndef TARGETS_H
 #define TARGETS_H

+#ifdef HAVE_CONFIG_H
+#include "nmap_config.h"
+#else
+#ifdef WIN32
+#include "nmap_winconfig.h"
+#endif /* WIN32 */
+#endif /* HAVE_CONFIG_H */
+
+/* This contains pretty much everything we need ... */
+#if HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h> /* Defines MAXHOSTNAMELEN on BSD*/
+#endif
+
 #include "nmap.h"
+#include "global_structures.h"
 #include "TargetGroup.h"

 class TargetGroup {

Modified: nmap/tcpip.h
==============================================================================
--- nmap/tcpip.h        (original)
+++ nmap/tcpip.h        Wed Nov 27 13:32:05 2013
@@ -129,7 +129,78 @@
 #ifndef TCPIP_H
 #define TCPIP_H

-#include "nmap.h"
+#ifdef HAVE_CONFIG_H
+#include "nmap_config.h"
+#endif
+
+#include "nbase.h"
+
+#ifdef WIN32
+#include "mswin32\winclude.h"
+#else
+
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#else
+void *malloc();
+void *realloc();
+#endif
+
+#if STDC_HEADERS || HAVE_STRING_H
+#include <string.h>
+#if !STDC_HEADERS && HAVE_MEMORY_H
+#include <memory.h>
+#endif
+#endif
+#if HAVE_STRINGS_H
+#include <strings.h>
+#endif
+
+#ifdef HAVE_BSTRING_H
+#include <bstring.h>
+#endif
+
+#include <ctype.h>
+#include <sys/types.h>
+
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h> /* Defines MAXHOSTNAMELEN on BSD*/
+#endif
+
+#include <stdio.h>
+
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+#ifdef HAVE_RPC_TYPES_H
+#include <rpc/types.h>
+#endif
+
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
+#include <arpa/inet.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
+#endif

 #include <sys/ioctl.h>

@@ -144,14 +215,17 @@
 #if HAVE_SYS_SOCKIO_H
 #include <sys/sockio.h>  /* SIOCGIFCONF for Solaris */
 #endif
+#endif /* WIN32 */

 #include <setjmp.h>
 #include <errno.h>
 #include <signal.h>
 #include <dnet.h>

-/* from Target.h */
-class Target;
+
+
+#include "nmap.h"
+#include "global_structures.h"

 #ifndef INET_ADDRSTRLEN
 #define INET_ADDRSTRLEN 16

Modified: nmap/timing.cc
==============================================================================
--- nmap/timing.cc      (original)
+++ nmap/timing.cc      Wed Nov 27 13:32:05 2013
@@ -130,7 +130,6 @@
 #include "NmapOps.h"
 #include "utils.h"
 #include "xml.h"
-#include <math.h>

 extern NmapOps o;


Modified: nmap/timing.h
==============================================================================
--- nmap/timing.h       (original)
+++ nmap/timing.h       Wed Nov 27 13:32:05 2013
@@ -130,6 +130,7 @@
 #define NMAP_TIMING_H

 #include "nmap.h"
+#include "global_structures.h"

 /* Call this function on a newly allocated struct timeout_info to
    initialize the values appropriately */

Modified: nmap/traceroute.h
==============================================================================
--- nmap/traceroute.h   (original)
+++ nmap/traceroute.h   Wed Nov 27 13:32:05 2013
@@ -123,8 +123,6 @@

 /* $Id: nmap.h 6676 2008-01-12 22:39:34Z fyodor $ */

-#ifndef NMAP_TRACEROUTE_H
-#define NMAP_TRACEROUTE_H
 #include "Target.h"

 #include <vector>
@@ -132,4 +130,3 @@
 int traceroute(std::vector<Target *> &Targets);

 void traceroute_hop_cache_clear();
-#endif /* NMAP_TRACEROUTE_H */

Modified: nmap/utils.cc
==============================================================================
--- nmap/utils.cc       (original)
+++ nmap/utils.cc       Wed Nov 27 13:32:05 2013
@@ -126,7 +126,6 @@
 #include "nmap.h"
 #include "utils.h"
 #include "NmapOps.h"
-#include <fcntl.h>

 extern NmapOps o;


Modified: nmap/utils.h
==============================================================================
--- nmap/utils.h        (original)
+++ nmap/utils.h        Wed Nov 27 13:32:05 2013
@@ -133,12 +133,38 @@
 #include <errno.h>
 #include <ctype.h>
 #include "nmap.h"
+#ifdef WIN32
+#include "mswin32\winclude.h"
+#else
+#include <sys/types.h>
+
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif

-#ifndef WIN32
 #include <sys/mman.h>
+#include "nmap_config.h"
+#endif
+
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
 #endif

+#include "nbase.h"
+
 #include "nmap_error.h"
+#include "global_structures.h"

 /* Arithmatic difference modulo 2^32 */
 #ifndef MOD_DIFF

_______________________________________________
Sent through the svn mailing list
http://nmap.org/mailman/listinfo/svn

I'm getting you a full build report, hold on.
_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: