1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Add newlines at the EOF in conformance to Daniel's coding standards

proposal. This only affects Nmap's root directory. We might also need to
modify the code which autogenerates Nmap's source code files such as IPv6
fingerprinting code.
This commit is contained in:
d33tah
2014-06-18 10:18:58 +00:00
parent e69325c0f8
commit e3d1c178e3
66 changed files with 66 additions and 0 deletions

View File

@@ -2691,3 +2691,4 @@ void response_reception_handler_wrapper(nsock_pool nsp, nsock_event nse, void *a
global_netctl.response_reception_handler(nsp, nse, arg);
return;
}

View File

@@ -471,3 +471,4 @@ std::vector<FingerMatch> load_fp_matches();
#endif /* __FPENGINE_H__ */

View File

@@ -3337,3 +3337,4 @@ std::vector<FingerMatch> load_fp_matches() {
}
return matches;
}

View File

@@ -223,3 +223,4 @@ public:
};
#endif /* FINGERPRINTRESULTS_H */

View File

@@ -246,3 +246,4 @@ bool MACCorp2Prefix(const char *vendorstr, u8 *mac_data) {
}
return false;
}

View File

@@ -145,3 +145,4 @@ const char *MACPrefix2Corp(const u8 *prefix);
bool MACCorp2Prefix(const char *vendorstr, u8 *mac_data);
#endif /* MACLOOKUP_H */

View File

@@ -688,3 +688,4 @@ void NmapOps::chooseScripts(char* argument) {
}
}
#endif

View File

@@ -319,3 +319,4 @@ char *NmapOutputTable::printableTable(int *size) {
if (size) *size = p;
return tableout;
}

View File

@@ -375,3 +375,4 @@ class Target {
};
#endif /* TARGET_H */

View File

@@ -785,3 +785,4 @@ unsigned long NewTargets::insert (const char *target) {
return new_targets->push(target);
}

View File

@@ -251,3 +251,4 @@ protected:
};
#endif /* TARGETGROUP_H */

View File

@@ -225,3 +225,4 @@ int modulus;
return cp_strdup(src);
}

View File

@@ -133,3 +133,4 @@ char *cp_strdup(const char *src);
void cp_free(void);
#endif

View File

@@ -342,3 +342,4 @@ struct scan_lists {
typedef enum { STYPE_UNKNOWN, HOST_DISCOVERY, ACK_SCAN, SYN_SCAN, FIN_SCAN, XMAS_SCAN, UDP_SCAN, CONNECT_SCAN, NULL_SCAN, WINDOW_SCAN, SCTP_INIT_SCAN, SCTP_COOKIE_ECHO_SCAN, MAIMON_SCAN, IPPROT_SCAN, PING_SCAN, PING_SCAN_ARP, IDLE_SCAN, BOUNCE_SCAN, SERVICE_SCAN, OS_SCAN, SCRIPT_PRE_SCAN, SCRIPT_SCAN, SCRIPT_POST_SCAN, TRACEROUTE, PING_SCAN_ND }stype;
#endif /*GLOBAL_STRUCTURES_H */

View File

@@ -1460,3 +1460,4 @@ void idle_scan(Target *target, u16 *portarray, int numports,
target->stopTimeOutClock(NULL);
return;
}

View File

@@ -144,3 +144,4 @@ void idle_scan(Target *target, u16 *portarray, int numports,
char *proxy, const struct scan_lists *ports);
#endif /* IDLE_SCAN_H */

View File

@@ -228,3 +228,4 @@ int main(int argc, char *argv[]) {
return nmap_main(argc, argv);
}

View File

@@ -3131,3 +3131,4 @@ static void display_nmap_version() {
log_write(LOG_STDOUT, "\n");
log_write(LOG_STDOUT, "Available nsock engines: %s\n", nsock_list_engines());
}

1
nmap.h
View File

@@ -459,3 +459,4 @@ int nmap_fileexistsandisreadable(const char* pathname);
int gather_logfile_resumption_state(char *fname, int *myargc, char ***myargv);
#endif /* NMAP_H */

View File

@@ -173,3 +173,4 @@ struct addrinfo {
};
#endif /* _NMAP_AMIGAOS_H_ */

View File

@@ -1389,3 +1389,4 @@ std::list<std::string> get_dns_servers() {
}
return serverList;
}

View File

@@ -131,3 +131,4 @@ void nmap_mass_rdns(Target ** targets, int num_targets);
const char *lookup_cached_host(u32 ip);
std::list<std::string> get_dns_servers();

View File

@@ -286,3 +286,4 @@ void gh_perror(const char *fmt, ...) {
fflush(stderr);
return;
}

View File

@@ -382,3 +382,4 @@ void bounce_scan(Target *target, u16 *portarray, int numports,
numports, (long) time(NULL) - starttime);
return;
}

View File

@@ -156,3 +156,4 @@ void bounce_scan(Target *target, u16 *portarray, int numports,
struct ftpinfo *ftp);
#endif /* NMAP_FTP_H */

View File

@@ -374,3 +374,4 @@ bool keyWasPressed()
return false;
}

View File

@@ -144,3 +144,4 @@
#define PCRE_INCLUDED 1
#endif /* NMAP_WINCONFIG_H */

View File

@@ -6,3 +6,4 @@
LUALIB_API int luaopen_binlib (lua_State *L);
#endif /* NSE_BINLIB */

View File

@@ -6,3 +6,4 @@
LUALIB_API int luaopen_bit(lua_State *L);
#endif

View File

@@ -100,3 +100,4 @@ void lua_state_dump (lua_State *L)
assert(lua_gettop(L) == top);
}

View File

@@ -366,3 +366,4 @@ LUALIB_API int luaopen_dnet (lua_State *L)
return 1;
}

View File

@@ -4,3 +4,4 @@
LUALIB_API int luaopen_dnet (lua_State *L);
#endif

View File

@@ -5,3 +5,4 @@
LUALIB_API int luaopen_lfs (lua_State *L);
#endif

View File

@@ -816,3 +816,4 @@ void close_nse (void)
L_NSE = NULL;
}
}

View File

@@ -74,3 +74,4 @@ void close_nse (void);
#define SCRIPT_ENGINE_EXTENSION ".nse"
#endif

View File

@@ -972,3 +972,4 @@ int luaopen_nmap (lua_State *L)
return 1;
}

View File

@@ -1102,3 +1102,4 @@ LUALIB_API int luaopen_nsock (lua_State *L)
return 1;
}

View File

@@ -6,3 +6,4 @@
LUALIB_API int luaopen_nsock (lua_State *);
#endif

View File

@@ -6,3 +6,4 @@
LUALIB_API int luaopen_openssl(lua_State *L);
#endif

View File

@@ -530,3 +530,4 @@ void nse_nsock_init_ssl_cert(lua_State *L)
lua_setfield(L, -2, "__index");
ssl_cert_methods_index_ref = luaL_ref(L, LUA_REGISTRYINDEX);
}

View File

@@ -125,3 +125,4 @@
int l_get_ssl_certificate(lua_State *L);
void nse_nsock_init_ssl_cert(lua_State *L);

View File

@@ -203,3 +203,4 @@ Port *nseU_getport (lua_State *L, Target *target, Port *port, int idx)
lua_pop(L, 2);
return p;
}

View File

@@ -147,3 +147,4 @@ Target *nseU_gettarget (lua_State *L, int idx);
Port *nseU_getport (lua_State *L, Target *target, Port *port, int idx);
#endif

View File

@@ -1301,3 +1301,4 @@ FingerPrintDB *parse_fingerprint_reference_file(const char *dbname) {
return parse_fingerprint_file(filename);
}

View File

@@ -3726,3 +3726,4 @@ int OSScan::os_scan(std::vector<Target *> &Targets) {
else
return OP_FAILURE;
}

View File

@@ -290,3 +290,4 @@ void nmap_adjust_loglevel(nsock_pool nsp, bool trace);
void nmap_nsock_stderr_logger(nsock_pool nsp, const struct nsock_log_rec *rec);
#endif /* OUTPUT_H */

View File

@@ -419,3 +419,4 @@ const char *get_udp_payload(u16 dport, size_t *length) {
return udp_port2payload(dport, length);
}
}

View File

@@ -133,3 +133,4 @@ const char *udp_port2payload(u16 dport, size_t *length);
int init_payloads(void);
#endif /* PAYLOAD_H */

View File

@@ -346,3 +346,4 @@ class PortList {
};
#endif

View File

@@ -562,3 +562,4 @@ char *port_reason_str(state_reason_t r) {
}
return reason;
}

View File

@@ -250,3 +250,4 @@ struct protoent *nmap_getprotbynum(int num) {
/* Couldn't find it ... oh well. */
return NULL;
}

View File

@@ -158,3 +158,4 @@ struct protoent *nmap_getprotbynum(int num);
"N/A")
#endif

View File

@@ -5864,3 +5864,4 @@ void ultra_scan(std::vector<Target *> &Targets, struct scan_lists *ports,
if (o.debugging > 2 && USI.pd != NULL)
pcap_print_stats(LOG_PLAIN, USI.pd);
}

View File

@@ -201,3 +201,4 @@ int determineScanGroupSize(int hosts_scanned_so_far,
struct scan_lists *ports);
#endif /* SCAN_ENGINE_H */

View File

@@ -155,3 +155,4 @@ void gettoppts(double level, char *portlist, struct scan_lists * ports);
void free_services();
#endif

View File

@@ -160,3 +160,4 @@ struct icmp
#define icmp_data icmp_dun.id_data
};
#endif /* HAVE_STRUCT_ICMP */

View File

@@ -721,3 +721,4 @@ Target *nexthost(HostGroupState *hs, const addrset *exclude_group,
return hs->hostbatch[hs->next_batch_no++];
}

View File

@@ -235,3 +235,4 @@ int dumpExclude(addrset *exclude_group);
void returnhost(HostGroupState *hs);
#endif /* TARGETS_H */

View File

@@ -2170,3 +2170,4 @@ int gettcpopt_ts(struct tcp_hdr *tcp, u32 *timestamp, u32 *echots) {
*echots = 0;
return 0;
}

View File

@@ -774,3 +774,4 @@ bool ScanProgressMeter::beginOrEndTask(const struct timeval *now, const char *ad
log_flush(LOG_STDOUT|LOG_XML);
return true;
}

View File

@@ -1649,3 +1649,4 @@ static struct timeval get_now(struct timeval *now) {
static const char *ss_to_string(const struct sockaddr_storage *ss) {
return inet_ntop_ez(ss, sizeof(*ss));
}

View File

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

View File

@@ -700,3 +700,4 @@ int win32_munmap(char *filestr, int filelen) {
return 0;
}
#endif

View File

@@ -229,3 +229,4 @@ int win32_munmap(char *filestr, int filelen);
#endif /* WIN32 */
#endif /* UTILS_H */

1
xml.cc
View File

@@ -452,3 +452,4 @@ bool xml_tag_open() {
bool xml_root_written() {
return xml.root_written;
}

1
xml.h
View File

@@ -153,3 +153,4 @@ bool xml_tag_open();
bool xml_root_written();
#endif