From e3d1c178e3b4556e49894fca70cbd920ffbdcd8a Mon Sep 17 00:00:00 2001 From: d33tah Date: Wed, 18 Jun 2014 10:18:58 +0000 Subject: [PATCH] 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. --- FPEngine.cc | 1 + FPEngine.h | 1 + FPModel.cc | 1 + FingerPrintResults.h | 1 + MACLookup.cc | 1 + MACLookup.h | 1 + NmapOps.cc | 1 + NmapOutputTable.cc | 1 + Target.h | 1 + TargetGroup.cc | 1 + TargetGroup.h | 1 + charpool.cc | 1 + charpool.h | 1 + global_structures.h | 1 + idle_scan.cc | 1 + idle_scan.h | 1 + main.cc | 1 + nmap.cc | 1 + nmap.h | 1 + nmap_amigaos.h | 1 + nmap_dns.cc | 1 + nmap_dns.h | 1 + nmap_error.cc | 1 + nmap_ftp.cc | 1 + nmap_ftp.h | 1 + nmap_tty.cc | 1 + nmap_winconfig.h | 1 + nse_binlib.h | 1 + nse_bit.h | 1 + nse_debug.cc | 1 + nse_dnet.cc | 1 + nse_dnet.h | 1 + nse_fs.h | 1 + nse_main.cc | 1 + nse_main.h | 1 + nse_nmaplib.cc | 1 + nse_nsock.cc | 1 + nse_nsock.h | 1 + nse_openssl.h | 1 + nse_ssl_cert.cc | 1 + nse_ssl_cert.h | 1 + nse_utility.cc | 1 + nse_utility.h | 1 + osscan.cc | 1 + osscan2.cc | 1 + output.h | 1 + payload.cc | 1 + payload.h | 1 + portlist.h | 1 + portreasons.cc | 1 + protocols.cc | 1 + protocols.h | 1 + scan_engine.cc | 1 + scan_engine.h | 1 + services.h | 1 + struct_ip.h | 1 + targets.cc | 1 + targets.h | 1 + tcpip.cc | 1 + timing.cc | 1 + traceroute.cc | 1 + traceroute.h | 1 + utils.cc | 1 + utils.h | 1 + xml.cc | 1 + xml.h | 1 + 66 files changed, 66 insertions(+) diff --git a/FPEngine.cc b/FPEngine.cc index da1651473..97042d928 100644 --- a/FPEngine.cc +++ b/FPEngine.cc @@ -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; } + diff --git a/FPEngine.h b/FPEngine.h index 23e121d97..958ce8e5f 100644 --- a/FPEngine.h +++ b/FPEngine.h @@ -471,3 +471,4 @@ std::vector load_fp_matches(); #endif /* __FPENGINE_H__ */ + diff --git a/FPModel.cc b/FPModel.cc index e84fff51a..6ed3b0f1f 100644 --- a/FPModel.cc +++ b/FPModel.cc @@ -3337,3 +3337,4 @@ std::vector load_fp_matches() { } return matches; } + diff --git a/FingerPrintResults.h b/FingerPrintResults.h index 8bcf90397..77627f40d 100644 --- a/FingerPrintResults.h +++ b/FingerPrintResults.h @@ -223,3 +223,4 @@ public: }; #endif /* FINGERPRINTRESULTS_H */ + diff --git a/MACLookup.cc b/MACLookup.cc index 388c1e391..ea30ca58c 100644 --- a/MACLookup.cc +++ b/MACLookup.cc @@ -246,3 +246,4 @@ bool MACCorp2Prefix(const char *vendorstr, u8 *mac_data) { } return false; } + diff --git a/MACLookup.h b/MACLookup.h index 2b810cc79..958412fd1 100644 --- a/MACLookup.h +++ b/MACLookup.h @@ -145,3 +145,4 @@ const char *MACPrefix2Corp(const u8 *prefix); bool MACCorp2Prefix(const char *vendorstr, u8 *mac_data); #endif /* MACLOOKUP_H */ + diff --git a/NmapOps.cc b/NmapOps.cc index 24fc1d0fb..caf4b1b6a 100644 --- a/NmapOps.cc +++ b/NmapOps.cc @@ -688,3 +688,4 @@ void NmapOps::chooseScripts(char* argument) { } } #endif + diff --git a/NmapOutputTable.cc b/NmapOutputTable.cc index 9469ba1d9..70b0aeaee 100644 --- a/NmapOutputTable.cc +++ b/NmapOutputTable.cc @@ -319,3 +319,4 @@ char *NmapOutputTable::printableTable(int *size) { if (size) *size = p; return tableout; } + diff --git a/Target.h b/Target.h index 0c69955d4..c6aff2bcd 100644 --- a/Target.h +++ b/Target.h @@ -375,3 +375,4 @@ class Target { }; #endif /* TARGET_H */ + diff --git a/TargetGroup.cc b/TargetGroup.cc index 5f3f02a1f..835e85ebd 100644 --- a/TargetGroup.cc +++ b/TargetGroup.cc @@ -785,3 +785,4 @@ unsigned long NewTargets::insert (const char *target) { return new_targets->push(target); } + diff --git a/TargetGroup.h b/TargetGroup.h index f8f6cdcf6..bb6eb7199 100644 --- a/TargetGroup.h +++ b/TargetGroup.h @@ -251,3 +251,4 @@ protected: }; #endif /* TARGETGROUP_H */ + diff --git a/charpool.cc b/charpool.cc index 87532d941..d8ab1b271 100644 --- a/charpool.cc +++ b/charpool.cc @@ -225,3 +225,4 @@ int modulus; return cp_strdup(src); } + diff --git a/charpool.h b/charpool.h index 21cc6eb4f..8e93a80d8 100644 --- a/charpool.h +++ b/charpool.h @@ -133,3 +133,4 @@ char *cp_strdup(const char *src); void cp_free(void); #endif + diff --git a/global_structures.h b/global_structures.h index 964478e78..fdb591b2b 100644 --- a/global_structures.h +++ b/global_structures.h @@ -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 */ + diff --git a/idle_scan.cc b/idle_scan.cc index ce67ef651..f7ea0161b 100644 --- a/idle_scan.cc +++ b/idle_scan.cc @@ -1460,3 +1460,4 @@ void idle_scan(Target *target, u16 *portarray, int numports, target->stopTimeOutClock(NULL); return; } + diff --git a/idle_scan.h b/idle_scan.h index ce8caeab5..5b6e7d198 100644 --- a/idle_scan.h +++ b/idle_scan.h @@ -144,3 +144,4 @@ void idle_scan(Target *target, u16 *portarray, int numports, char *proxy, const struct scan_lists *ports); #endif /* IDLE_SCAN_H */ + diff --git a/main.cc b/main.cc index 09ec82621..417df2143 100644 --- a/main.cc +++ b/main.cc @@ -228,3 +228,4 @@ int main(int argc, char *argv[]) { return nmap_main(argc, argv); } + diff --git a/nmap.cc b/nmap.cc index 74ec06bd0..3e2a0121b 100644 --- a/nmap.cc +++ b/nmap.cc @@ -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()); } + diff --git a/nmap.h b/nmap.h index a45ae84cc..cd2d4947a 100644 --- a/nmap.h +++ b/nmap.h @@ -459,3 +459,4 @@ int nmap_fileexistsandisreadable(const char* pathname); int gather_logfile_resumption_state(char *fname, int *myargc, char ***myargv); #endif /* NMAP_H */ + diff --git a/nmap_amigaos.h b/nmap_amigaos.h index 9529569f5..de46d20df 100644 --- a/nmap_amigaos.h +++ b/nmap_amigaos.h @@ -173,3 +173,4 @@ struct addrinfo { }; #endif /* _NMAP_AMIGAOS_H_ */ + diff --git a/nmap_dns.cc b/nmap_dns.cc index def54781a..fc4095204 100644 --- a/nmap_dns.cc +++ b/nmap_dns.cc @@ -1389,3 +1389,4 @@ std::list get_dns_servers() { } return serverList; } + diff --git a/nmap_dns.h b/nmap_dns.h index fc86ba0d2..e565fb5a5 100644 --- a/nmap_dns.h +++ b/nmap_dns.h @@ -131,3 +131,4 @@ void nmap_mass_rdns(Target ** targets, int num_targets); const char *lookup_cached_host(u32 ip); std::list get_dns_servers(); + diff --git a/nmap_error.cc b/nmap_error.cc index d1a6c3d9f..b172a5ff9 100644 --- a/nmap_error.cc +++ b/nmap_error.cc @@ -286,3 +286,4 @@ void gh_perror(const char *fmt, ...) { fflush(stderr); return; } + diff --git a/nmap_ftp.cc b/nmap_ftp.cc index 942251e2a..1dc05fcdb 100644 --- a/nmap_ftp.cc +++ b/nmap_ftp.cc @@ -382,3 +382,4 @@ void bounce_scan(Target *target, u16 *portarray, int numports, numports, (long) time(NULL) - starttime); return; } + diff --git a/nmap_ftp.h b/nmap_ftp.h index 5c04a6d36..7b9d7d34a 100644 --- a/nmap_ftp.h +++ b/nmap_ftp.h @@ -156,3 +156,4 @@ void bounce_scan(Target *target, u16 *portarray, int numports, struct ftpinfo *ftp); #endif /* NMAP_FTP_H */ + diff --git a/nmap_tty.cc b/nmap_tty.cc index 463b3645f..57f85f76a 100644 --- a/nmap_tty.cc +++ b/nmap_tty.cc @@ -374,3 +374,4 @@ bool keyWasPressed() return false; } + diff --git a/nmap_winconfig.h b/nmap_winconfig.h index d72ff34ef..40e3695e4 100644 --- a/nmap_winconfig.h +++ b/nmap_winconfig.h @@ -144,3 +144,4 @@ #define PCRE_INCLUDED 1 #endif /* NMAP_WINCONFIG_H */ + diff --git a/nse_binlib.h b/nse_binlib.h index 0a5455ec8..66e722912 100644 --- a/nse_binlib.h +++ b/nse_binlib.h @@ -6,3 +6,4 @@ LUALIB_API int luaopen_binlib (lua_State *L); #endif /* NSE_BINLIB */ + diff --git a/nse_bit.h b/nse_bit.h index c4dab2797..220c2fb14 100644 --- a/nse_bit.h +++ b/nse_bit.h @@ -6,3 +6,4 @@ LUALIB_API int luaopen_bit(lua_State *L); #endif + diff --git a/nse_debug.cc b/nse_debug.cc index f15f88fdc..60b62fea9 100644 --- a/nse_debug.cc +++ b/nse_debug.cc @@ -100,3 +100,4 @@ void lua_state_dump (lua_State *L) assert(lua_gettop(L) == top); } + diff --git a/nse_dnet.cc b/nse_dnet.cc index 23a60a2e0..dd8ab4b54 100644 --- a/nse_dnet.cc +++ b/nse_dnet.cc @@ -366,3 +366,4 @@ LUALIB_API int luaopen_dnet (lua_State *L) return 1; } + diff --git a/nse_dnet.h b/nse_dnet.h index 0e08f4cea..63a35771b 100644 --- a/nse_dnet.h +++ b/nse_dnet.h @@ -4,3 +4,4 @@ LUALIB_API int luaopen_dnet (lua_State *L); #endif + diff --git a/nse_fs.h b/nse_fs.h index dc9c5d824..e73e6cd63 100644 --- a/nse_fs.h +++ b/nse_fs.h @@ -5,3 +5,4 @@ LUALIB_API int luaopen_lfs (lua_State *L); #endif + diff --git a/nse_main.cc b/nse_main.cc index 362d1675d..1367fc316 100644 --- a/nse_main.cc +++ b/nse_main.cc @@ -816,3 +816,4 @@ void close_nse (void) L_NSE = NULL; } } + diff --git a/nse_main.h b/nse_main.h index c264d7631..01b270e96 100644 --- a/nse_main.h +++ b/nse_main.h @@ -74,3 +74,4 @@ void close_nse (void); #define SCRIPT_ENGINE_EXTENSION ".nse" #endif + diff --git a/nse_nmaplib.cc b/nse_nmaplib.cc index 0fe22144c..9ffc33df8 100644 --- a/nse_nmaplib.cc +++ b/nse_nmaplib.cc @@ -972,3 +972,4 @@ int luaopen_nmap (lua_State *L) return 1; } + diff --git a/nse_nsock.cc b/nse_nsock.cc index 87772a617..32b154bb3 100644 --- a/nse_nsock.cc +++ b/nse_nsock.cc @@ -1102,3 +1102,4 @@ LUALIB_API int luaopen_nsock (lua_State *L) return 1; } + diff --git a/nse_nsock.h b/nse_nsock.h index 7cf2d6983..614f71a1e 100644 --- a/nse_nsock.h +++ b/nse_nsock.h @@ -6,3 +6,4 @@ LUALIB_API int luaopen_nsock (lua_State *); #endif + diff --git a/nse_openssl.h b/nse_openssl.h index 634befd6b..f2db753da 100644 --- a/nse_openssl.h +++ b/nse_openssl.h @@ -6,3 +6,4 @@ LUALIB_API int luaopen_openssl(lua_State *L); #endif + diff --git a/nse_ssl_cert.cc b/nse_ssl_cert.cc index 86f58bf14..f2eb57bfd 100644 --- a/nse_ssl_cert.cc +++ b/nse_ssl_cert.cc @@ -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); } + diff --git a/nse_ssl_cert.h b/nse_ssl_cert.h index c8ef4bcaa..b71fe1020 100644 --- a/nse_ssl_cert.h +++ b/nse_ssl_cert.h @@ -125,3 +125,4 @@ int l_get_ssl_certificate(lua_State *L); void nse_nsock_init_ssl_cert(lua_State *L); + diff --git a/nse_utility.cc b/nse_utility.cc index 9ce7c574f..d320a8eb1 100644 --- a/nse_utility.cc +++ b/nse_utility.cc @@ -203,3 +203,4 @@ Port *nseU_getport (lua_State *L, Target *target, Port *port, int idx) lua_pop(L, 2); return p; } + diff --git a/nse_utility.h b/nse_utility.h index 7f2e4e4bd..0c125c5dc 100644 --- a/nse_utility.h +++ b/nse_utility.h @@ -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 + diff --git a/osscan.cc b/osscan.cc index 7b414f0b6..13caed8fa 100644 --- a/osscan.cc +++ b/osscan.cc @@ -1301,3 +1301,4 @@ FingerPrintDB *parse_fingerprint_reference_file(const char *dbname) { return parse_fingerprint_file(filename); } + diff --git a/osscan2.cc b/osscan2.cc index 732d24f22..aa4d3a75b 100644 --- a/osscan2.cc +++ b/osscan2.cc @@ -3726,3 +3726,4 @@ int OSScan::os_scan(std::vector &Targets) { else return OP_FAILURE; } + diff --git a/output.h b/output.h index 72eab63d5..331a31612 100644 --- a/output.h +++ b/output.h @@ -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 */ + diff --git a/payload.cc b/payload.cc index 3710cdb47..b4110ec32 100644 --- a/payload.cc +++ b/payload.cc @@ -419,3 +419,4 @@ const char *get_udp_payload(u16 dport, size_t *length) { return udp_port2payload(dport, length); } } + diff --git a/payload.h b/payload.h index 2c8522418..54174efe1 100644 --- a/payload.h +++ b/payload.h @@ -133,3 +133,4 @@ const char *udp_port2payload(u16 dport, size_t *length); int init_payloads(void); #endif /* PAYLOAD_H */ + diff --git a/portlist.h b/portlist.h index 711056c57..f2f251a2b 100644 --- a/portlist.h +++ b/portlist.h @@ -346,3 +346,4 @@ class PortList { }; #endif + diff --git a/portreasons.cc b/portreasons.cc index aad2fe0e6..fd607e510 100644 --- a/portreasons.cc +++ b/portreasons.cc @@ -562,3 +562,4 @@ char *port_reason_str(state_reason_t r) { } return reason; } + diff --git a/protocols.cc b/protocols.cc index a7b191091..c71e9d78d 100644 --- a/protocols.cc +++ b/protocols.cc @@ -250,3 +250,4 @@ struct protoent *nmap_getprotbynum(int num) { /* Couldn't find it ... oh well. */ return NULL; } + diff --git a/protocols.h b/protocols.h index 3fb7aa4c4..088cb3235 100644 --- a/protocols.h +++ b/protocols.h @@ -158,3 +158,4 @@ struct protoent *nmap_getprotbynum(int num); "N/A") #endif + diff --git a/scan_engine.cc b/scan_engine.cc index 3120319ae..e50bcc51d 100644 --- a/scan_engine.cc +++ b/scan_engine.cc @@ -5864,3 +5864,4 @@ void ultra_scan(std::vector &Targets, struct scan_lists *ports, if (o.debugging > 2 && USI.pd != NULL) pcap_print_stats(LOG_PLAIN, USI.pd); } + diff --git a/scan_engine.h b/scan_engine.h index c8d958633..846b61617 100644 --- a/scan_engine.h +++ b/scan_engine.h @@ -201,3 +201,4 @@ int determineScanGroupSize(int hosts_scanned_so_far, struct scan_lists *ports); #endif /* SCAN_ENGINE_H */ + diff --git a/services.h b/services.h index 3f184aef3..3649e9be6 100644 --- a/services.h +++ b/services.h @@ -155,3 +155,4 @@ void gettoppts(double level, char *portlist, struct scan_lists * ports); void free_services(); #endif + diff --git a/struct_ip.h b/struct_ip.h index 405063988..7a568bcfe 100644 --- a/struct_ip.h +++ b/struct_ip.h @@ -160,3 +160,4 @@ struct icmp #define icmp_data icmp_dun.id_data }; #endif /* HAVE_STRUCT_ICMP */ + diff --git a/targets.cc b/targets.cc index b6acc5a2f..d495b3e3f 100644 --- a/targets.cc +++ b/targets.cc @@ -721,3 +721,4 @@ Target *nexthost(HostGroupState *hs, const addrset *exclude_group, return hs->hostbatch[hs->next_batch_no++]; } + diff --git a/targets.h b/targets.h index 2708f7ba5..e55fb175c 100644 --- a/targets.h +++ b/targets.h @@ -235,3 +235,4 @@ int dumpExclude(addrset *exclude_group); void returnhost(HostGroupState *hs); #endif /* TARGETS_H */ + diff --git a/tcpip.cc b/tcpip.cc index 218dbd12c..15d6c23ae 100644 --- a/tcpip.cc +++ b/tcpip.cc @@ -2170,3 +2170,4 @@ int gettcpopt_ts(struct tcp_hdr *tcp, u32 *timestamp, u32 *echots) { *echots = 0; return 0; } + diff --git a/timing.cc b/timing.cc index dc87d8226..a249f5ce6 100644 --- a/timing.cc +++ b/timing.cc @@ -774,3 +774,4 @@ bool ScanProgressMeter::beginOrEndTask(const struct timeval *now, const char *ad log_flush(LOG_STDOUT|LOG_XML); return true; } + diff --git a/traceroute.cc b/traceroute.cc index e7507b803..a2fc0a007 100644 --- a/traceroute.cc +++ b/traceroute.cc @@ -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)); } + diff --git a/traceroute.h b/traceroute.h index c603f378b..d4b7eb508 100644 --- a/traceroute.h +++ b/traceroute.h @@ -130,3 +130,4 @@ int traceroute(std::vector &Targets); void traceroute_hop_cache_clear(); + diff --git a/utils.cc b/utils.cc index 56a0c09b3..f17249dd8 100644 --- a/utils.cc +++ b/utils.cc @@ -700,3 +700,4 @@ int win32_munmap(char *filestr, int filelen) { return 0; } #endif + diff --git a/utils.h b/utils.h index c8a9ada2f..f93ae3979 100644 --- a/utils.h +++ b/utils.h @@ -229,3 +229,4 @@ int win32_munmap(char *filestr, int filelen); #endif /* WIN32 */ #endif /* UTILS_H */ + diff --git a/xml.cc b/xml.cc index 26c9725f4..32e3dff54 100644 --- a/xml.cc +++ b/xml.cc @@ -452,3 +452,4 @@ bool xml_tag_open() { bool xml_root_written() { return xml.root_written; } + diff --git a/xml.h b/xml.h index 510c902eb..5e65fb41e 100644 --- a/xml.h +++ b/xml.h @@ -153,3 +153,4 @@ bool xml_tag_open(); bool xml_root_written(); #endif +