Skip to content

Commit

Permalink
Revert r32528, was not tested on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
bonsaiviking committed Nov 27, 2013
1 parent 8ab92b3 commit 866db7e
Show file tree
Hide file tree
Showing 34 changed files with 177 additions and 31 deletions.
1 change: 0 additions & 1 deletion FPEngine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@
#include "osscan.h"
#include "libnetutil/npacket.h"
#include "linear.h"
#include <math.h>
extern NmapOps o;


Expand Down
1 change: 1 addition & 0 deletions FingerPrintResults.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 ... */
Expand Down
1 change: 1 addition & 0 deletions NmapOps.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@

/* $Id$ */
#include "nmap.h"
#include "nbase.h"
#include "NmapOps.h"
#include "services.h"
#include "utils.h"
Expand Down
6 changes: 2 additions & 4 deletions NmapOps.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -426,4 +424,4 @@ class NmapOps {
u8 spoof_mac[6];
bool spoof_mac_set;
};
#endif /* NMAPOPS_H */
2 changes: 2 additions & 0 deletions idle_scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@
#define IDLE_SCAN_H

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

class Target;

Expand Down
6 changes: 2 additions & 4 deletions nmap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
12 changes: 12 additions & 0 deletions nmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ void *realloc();
#include <bstring.h>
#endif

#include <ctype.h>
#include <sys/types.h>

#ifndef WIN32 /* from nmapNT -- seems to work */
#include <sys/wait.h>
#endif /* !WIN32 */
Expand All @@ -181,6 +184,8 @@ void *realloc();
#include <sys/param.h> /* Defines MAXHOSTNAMELEN on BSD*/
#endif

#include <stdio.h>

#if HAVE_RPC_TYPES_H
#include <rpc/types.h>
#endif
Expand All @@ -189,10 +194,14 @@ void *realloc();
#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
Expand All @@ -208,6 +217,8 @@ void *realloc();
# endif
#endif

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

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

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

#if HAVE_SYS_RESOURCE_H
Expand Down
1 change: 1 addition & 0 deletions nmap_dns.cc
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
#include <stdlib.h>
#include <limits.h>
#include <list>
#include <vector>
#include <algorithm>

extern NmapOps o;
Expand Down
3 changes: 0 additions & 3 deletions nmap_dns.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@
* *
***************************************************************************/

#ifndef NMAP_DNS_H
#define NMAP_DNS_H
class Target;

#include "nbase.h"
Expand All @@ -133,4 +131,3 @@ void nmap_mass_rdns(Target ** targets, int num_targets);
const char *lookup_cached_host(u32 ip);

std::list<std::string> get_dns_servers();
#endif /* NMAP_DNS_H */
1 change: 0 additions & 1 deletion nmap_error.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@
#include "output.h"
#include "NmapOps.h"
#include "xml.h"
#include <errno.h>

extern NmapOps o;

Expand Down
4 changes: 4 additions & 0 deletions nmap_tty.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@
* *
***************************************************************************/

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

#include "nmap.h"

#include <sys/types.h>
Expand Down
5 changes: 1 addition & 4 deletions nmap_tty.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -136,4 +133,4 @@ void tty_init();
being returned means a nonstandard key has been pressed and the
calling method should print a status message */
bool keyWasPressed();
#endif /* NMAP_TTY_H */

2 changes: 1 addition & 1 deletion nse_main.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "nmap.h"
#include "nbase.h"
#include "nmap_error.h"
#include "portlist.h"
#include "nsock.h"
Expand All @@ -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"
Expand Down
1 change: 1 addition & 0 deletions nse_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ extern "C" {
}

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

class ScriptResult
{
Expand Down
3 changes: 0 additions & 3 deletions nse_ssl_cert.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
2 changes: 2 additions & 0 deletions nsock/examples/nsock_telnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
1 change: 1 addition & 0 deletions nsock/examples/nsock_test_timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
#include <stdlib.h>
#include <time.h>
#include <assert.h>

Expand Down
1 change: 1 addition & 0 deletions osscan.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
#define OSSCAN_H

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

Expand Down
1 change: 0 additions & 1 deletion osscan2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@
#include "struct_ip.h"

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

extern NmapOps o;

Expand Down
2 changes: 2 additions & 0 deletions osscan2.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@
#define OSSCAN2_H

#include "nmap.h"
#include "global_structures.h"
#include "nbase.h"
#include <vector>
#include <list>
#include "Target.h"
Expand Down
2 changes: 2 additions & 0 deletions output.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions output.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@

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

#include <string>
Expand Down
1 change: 1 addition & 0 deletions payload.cc
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
#include <map>

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

Expand Down
2 changes: 2 additions & 0 deletions protocols.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@
#endif

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

#define PROTOCOL_TABLE_SIZE 256

Expand Down
1 change: 1 addition & 0 deletions scan_engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
#define SCAN_ENGINE_H

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

struct probespec_tcpdata {
Expand Down
1 change: 1 addition & 0 deletions service_scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
#define SERVICE_SCAN_H

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

#include <vector>
Expand Down
8 changes: 8 additions & 0 deletions services.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
22 changes: 22 additions & 0 deletions targets.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading

0 comments on commit 866db7e

Please sign in to comment.