mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Revert r32528, was not tested on Windows
This commit is contained in:
@@ -132,7 +132,6 @@
|
||||
#include "osscan.h"
|
||||
#include "libnetutil/npacket.h"
|
||||
#include "linear.h"
|
||||
#include <math.h>
|
||||
extern NmapOps o;
|
||||
|
||||
|
||||
|
||||
@@ -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 ... */
|
||||
|
||||
@@ -124,6 +124,7 @@
|
||||
|
||||
/* $Id$ */
|
||||
#include "nmap.h"
|
||||
#include "nbase.h"
|
||||
#include "NmapOps.h"
|
||||
#include "services.h"
|
||||
#include "utils.h"
|
||||
|
||||
@@ -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 @@ class NmapOps {
|
||||
u8 spoof_mac[6];
|
||||
bool spoof_mac_set;
|
||||
};
|
||||
#endif /* NMAPOPS_H */
|
||||
|
||||
|
||||
@@ -132,6 +132,8 @@
|
||||
#define IDLE_SCAN_H
|
||||
|
||||
#include "nmap.h"
|
||||
#include "global_structures.h"
|
||||
#include <nbase.h>
|
||||
|
||||
class Target;
|
||||
|
||||
|
||||
6
nmap.cc
6
nmap.cc
@@ -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
|
||||
|
||||
12
nmap.h
12
nmap.h
@@ -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 */
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -208,6 +217,8 @@ void *realloc();
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef HAVE_PWD_H
|
||||
#include <pwd.h>
|
||||
@@ -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
|
||||
|
||||
@@ -194,6 +194,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
extern NmapOps o;
|
||||
|
||||
@@ -120,8 +120,6 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef NMAP_DNS_H
|
||||
#define NMAP_DNS_H
|
||||
class Target;
|
||||
|
||||
#include "nbase.h"
|
||||
@@ -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 */
|
||||
|
||||
@@ -127,7 +127,6 @@
|
||||
#include "output.h"
|
||||
#include "NmapOps.h"
|
||||
#include "xml.h"
|
||||
#include <errno.h>
|
||||
|
||||
extern NmapOps o;
|
||||
|
||||
|
||||
@@ -121,6 +121,10 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef WIN32
|
||||
#include "nmap_config.h"
|
||||
#endif
|
||||
|
||||
#include "nmap.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
@@ -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 @@ 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 */
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -14,6 +14,7 @@ extern "C" {
|
||||
}
|
||||
|
||||
#include "nmap.h"
|
||||
#include "global_structures.h"
|
||||
|
||||
class ScriptResult
|
||||
{
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
1
osscan.h
1
osscan.h
@@ -128,6 +128,7 @@
|
||||
#define OSSCAN_H
|
||||
|
||||
#include "nmap.h"
|
||||
#include "global_structures.h"
|
||||
#include "FingerPrintResults.h"
|
||||
#include "Target.h"
|
||||
|
||||
|
||||
@@ -137,7 +137,6 @@
|
||||
#include "struct_ip.h"
|
||||
|
||||
#include <list>
|
||||
#include <math.h>
|
||||
|
||||
extern NmapOps o;
|
||||
|
||||
|
||||
@@ -129,6 +129,8 @@
|
||||
#define OSSCAN2_H
|
||||
|
||||
#include "nmap.h"
|
||||
#include "global_structures.h"
|
||||
#include "nbase.h"
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include "Target.h"
|
||||
|
||||
@@ -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>
|
||||
|
||||
1
output.h
1
output.h
@@ -165,6 +165,7 @@
|
||||
|
||||
#include "portlist.h"
|
||||
#include "nmap.h"
|
||||
#include "global_structures.h"
|
||||
#include <nsock.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
@@ -134,6 +134,7 @@
|
||||
#include <map>
|
||||
|
||||
#include "NmapOps.h"
|
||||
#include "nbase.h"
|
||||
#include "payload.h"
|
||||
#include "utils.h"
|
||||
|
||||
|
||||
@@ -132,6 +132,8 @@
|
||||
#endif
|
||||
|
||||
#include "nmap.h"
|
||||
#include "global_structures.h"
|
||||
#include "nbase.h"
|
||||
|
||||
#define PROTOCOL_TABLE_SIZE 256
|
||||
|
||||
|
||||
@@ -129,6 +129,7 @@
|
||||
#define SCAN_ENGINE_H
|
||||
|
||||
#include "nmap.h"
|
||||
#include "global_structures.h"
|
||||
#include <vector>
|
||||
|
||||
struct probespec_tcpdata {
|
||||
|
||||
@@ -129,6 +129,7 @@
|
||||
#define SERVICE_SCAN_H
|
||||
|
||||
#include "nmap.h"
|
||||
#include "global_structures.h"
|
||||
#include "portlist.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
22
targets.h
22
targets.h
@@ -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 {
|
||||
|
||||
80
tcpip.h
80
tcpip.h
@@ -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 @@ extern "C" {
|
||||
#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
|
||||
|
||||
@@ -130,7 +130,6 @@
|
||||
#include "NmapOps.h"
|
||||
#include "utils.h"
|
||||
#include "xml.h"
|
||||
#include <math.h>
|
||||
|
||||
extern NmapOps o;
|
||||
|
||||
|
||||
1
timing.h
1
timing.h
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
1
utils.cc
1
utils.cc
@@ -126,7 +126,6 @@
|
||||
#include "nmap.h"
|
||||
#include "utils.h"
|
||||
#include "NmapOps.h"
|
||||
#include <fcntl.h>
|
||||
|
||||
extern NmapOps o;
|
||||
|
||||
|
||||
30
utils.h
30
utils.h
@@ -133,12 +133,38 @@
|
||||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
#include "nmap.h"
|
||||
#ifdef WIN32
|
||||
#include "mswin32\winclude.h"
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifndef WIN32
|
||||
#include <sys/mman.h>
|
||||
#if HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#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
|
||||
|
||||
Reference in New Issue
Block a user