Skip to content

Commit e3d1c17

Browse files
author
d33tah
committed
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.
1 parent e69325c commit e3d1c17

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+66
-0
lines changed

FPEngine.cc

+1
Original file line numberDiff line numberDiff line change
@@ -2691,3 +2691,4 @@ void response_reception_handler_wrapper(nsock_pool nsp, nsock_event nse, void *a
26912691
global_netctl.response_reception_handler(nsp, nse, arg);
26922692
return;
26932693
}
2694+

FPEngine.h

+1
Original file line numberDiff line numberDiff line change
@@ -471,3 +471,4 @@ std::vector<FingerMatch> load_fp_matches();
471471

472472

473473
#endif /* __FPENGINE_H__ */
474+

FPModel.cc

+1
Original file line numberDiff line numberDiff line change
@@ -3337,3 +3337,4 @@ std::vector<FingerMatch> load_fp_matches() {
33373337
}
33383338
return matches;
33393339
}
3340+

FingerPrintResults.h

+1
Original file line numberDiff line numberDiff line change
@@ -223,3 +223,4 @@ class FingerPrintResultsIPv6 : public FingerPrintResults {
223223
};
224224

225225
#endif /* FINGERPRINTRESULTS_H */
226+

MACLookup.cc

+1
Original file line numberDiff line numberDiff line change
@@ -246,3 +246,4 @@ bool MACCorp2Prefix(const char *vendorstr, u8 *mac_data) {
246246
}
247247
return false;
248248
}
249+

MACLookup.h

+1
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,4 @@ const char *MACPrefix2Corp(const u8 *prefix);
145145
bool MACCorp2Prefix(const char *vendorstr, u8 *mac_data);
146146

147147
#endif /* MACLOOKUP_H */
148+

NmapOps.cc

+1
Original file line numberDiff line numberDiff line change
@@ -688,3 +688,4 @@ void NmapOps::chooseScripts(char* argument) {
688688
}
689689
}
690690
#endif
691+

NmapOutputTable.cc

+1
Original file line numberDiff line numberDiff line change
@@ -319,3 +319,4 @@ char *NmapOutputTable::printableTable(int *size) {
319319
if (size) *size = p;
320320
return tableout;
321321
}
322+

Target.h

+1
Original file line numberDiff line numberDiff line change
@@ -375,3 +375,4 @@ class Target {
375375
};
376376

377377
#endif /* TARGET_H */
378+

TargetGroup.cc

+1
Original file line numberDiff line numberDiff line change
@@ -785,3 +785,4 @@ unsigned long NewTargets::insert (const char *target) {
785785

786786
return new_targets->push(target);
787787
}
788+

TargetGroup.h

+1
Original file line numberDiff line numberDiff line change
@@ -251,3 +251,4 @@ class NewTargets {
251251
};
252252

253253
#endif /* TARGETGROUP_H */
254+

charpool.cc

+1
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,4 @@ int modulus;
225225

226226
return cp_strdup(src);
227227
}
228+

charpool.h

+1
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,4 @@ char *cp_strdup(const char *src);
133133
void cp_free(void);
134134

135135
#endif
136+

global_structures.h

+1
Original file line numberDiff line numberDiff line change
@@ -342,3 +342,4 @@ struct scan_lists {
342342
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;
343343

344344
#endif /*GLOBAL_STRUCTURES_H */
345+

idle_scan.cc

+1
Original file line numberDiff line numberDiff line change
@@ -1460,3 +1460,4 @@ void idle_scan(Target *target, u16 *portarray, int numports,
14601460
target->stopTimeOutClock(NULL);
14611461
return;
14621462
}
1463+

idle_scan.h

+1
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,4 @@ void idle_scan(Target *target, u16 *portarray, int numports,
144144
char *proxy, const struct scan_lists *ports);
145145

146146
#endif /* IDLE_SCAN_H */
147+

main.cc

+1
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,4 @@ int main(int argc, char *argv[]) {
228228

229229
return nmap_main(argc, argv);
230230
}
231+

nmap.cc

+1
Original file line numberDiff line numberDiff line change
@@ -3131,3 +3131,4 @@ static void display_nmap_version() {
31313131
log_write(LOG_STDOUT, "\n");
31323132
log_write(LOG_STDOUT, "Available nsock engines: %s\n", nsock_list_engines());
31333133
}
3134+

nmap.h

+1
Original file line numberDiff line numberDiff line change
@@ -459,3 +459,4 @@ int nmap_fileexistsandisreadable(const char* pathname);
459459
int gather_logfile_resumption_state(char *fname, int *myargc, char ***myargv);
460460

461461
#endif /* NMAP_H */
462+

nmap_amigaos.h

+1
Original file line numberDiff line numberDiff line change
@@ -173,3 +173,4 @@ struct addrinfo {
173173
};
174174

175175
#endif /* _NMAP_AMIGAOS_H_ */
176+

nmap_dns.cc

+1
Original file line numberDiff line numberDiff line change
@@ -1389,3 +1389,4 @@ std::list<std::string> get_dns_servers() {
13891389
}
13901390
return serverList;
13911391
}
1392+

nmap_dns.h

+1
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,4 @@ void nmap_mass_rdns(Target ** targets, int num_targets);
131131
const char *lookup_cached_host(u32 ip);
132132

133133
std::list<std::string> get_dns_servers();
134+

nmap_error.cc

+1
Original file line numberDiff line numberDiff line change
@@ -286,3 +286,4 @@ void gh_perror(const char *fmt, ...) {
286286
fflush(stderr);
287287
return;
288288
}
289+

nmap_ftp.cc

+1
Original file line numberDiff line numberDiff line change
@@ -382,3 +382,4 @@ void bounce_scan(Target *target, u16 *portarray, int numports,
382382
numports, (long) time(NULL) - starttime);
383383
return;
384384
}
385+

nmap_ftp.h

+1
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,4 @@ void bounce_scan(Target *target, u16 *portarray, int numports,
156156
struct ftpinfo *ftp);
157157

158158
#endif /* NMAP_FTP_H */
159+

nmap_tty.cc

+1
Original file line numberDiff line numberDiff line change
@@ -374,3 +374,4 @@ bool keyWasPressed()
374374

375375
return false;
376376
}
377+

nmap_winconfig.h

+1
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,4 @@
144144
#define PCRE_INCLUDED 1
145145

146146
#endif /* NMAP_WINCONFIG_H */
147+

nse_binlib.h

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
LUALIB_API int luaopen_binlib (lua_State *L);
77

88
#endif /* NSE_BINLIB */
9+

nse_bit.h

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
LUALIB_API int luaopen_bit(lua_State *L);
77

88
#endif
9+

nse_debug.cc

+1
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,4 @@ void lua_state_dump (lua_State *L)
100100

101101
assert(lua_gettop(L) == top);
102102
}
103+

nse_dnet.cc

+1
Original file line numberDiff line numberDiff line change
@@ -366,3 +366,4 @@ LUALIB_API int luaopen_dnet (lua_State *L)
366366

367367
return 1;
368368
}
369+

nse_dnet.h

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
LUALIB_API int luaopen_dnet (lua_State *L);
55

66
#endif
7+

nse_fs.h

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
LUALIB_API int luaopen_lfs (lua_State *L);
66

77
#endif
8+

nse_main.cc

+1
Original file line numberDiff line numberDiff line change
@@ -816,3 +816,4 @@ void close_nse (void)
816816
L_NSE = NULL;
817817
}
818818
}
819+

nse_main.h

+1
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,4 @@ void close_nse (void);
7474
#define SCRIPT_ENGINE_EXTENSION ".nse"
7575

7676
#endif
77+

nse_nmaplib.cc

+1
Original file line numberDiff line numberDiff line change
@@ -972,3 +972,4 @@ int luaopen_nmap (lua_State *L)
972972

973973
return 1;
974974
}
975+

nse_nsock.cc

+1
Original file line numberDiff line numberDiff line change
@@ -1102,3 +1102,4 @@ LUALIB_API int luaopen_nsock (lua_State *L)
11021102

11031103
return 1;
11041104
}
1105+

nse_nsock.h

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
LUALIB_API int luaopen_nsock (lua_State *);
77

88
#endif
9+

nse_openssl.h

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
LUALIB_API int luaopen_openssl(lua_State *L);
77

88
#endif
9+

nse_ssl_cert.cc

+1
Original file line numberDiff line numberDiff line change
@@ -530,3 +530,4 @@ void nse_nsock_init_ssl_cert(lua_State *L)
530530
lua_setfield(L, -2, "__index");
531531
ssl_cert_methods_index_ref = luaL_ref(L, LUA_REGISTRYINDEX);
532532
}
533+

nse_ssl_cert.h

+1
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,4 @@
125125

126126
int l_get_ssl_certificate(lua_State *L);
127127
void nse_nsock_init_ssl_cert(lua_State *L);
128+

nse_utility.cc

+1
Original file line numberDiff line numberDiff line change
@@ -203,3 +203,4 @@ Port *nseU_getport (lua_State *L, Target *target, Port *port, int idx)
203203
lua_pop(L, 2);
204204
return p;
205205
}
206+

nse_utility.h

+1
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,4 @@ Target *nseU_gettarget (lua_State *L, int idx);
147147
Port *nseU_getport (lua_State *L, Target *target, Port *port, int idx);
148148

149149
#endif
150+

osscan.cc

+1
Original file line numberDiff line numberDiff line change
@@ -1301,3 +1301,4 @@ FingerPrintDB *parse_fingerprint_reference_file(const char *dbname) {
13011301

13021302
return parse_fingerprint_file(filename);
13031303
}
1304+

osscan2.cc

+1
Original file line numberDiff line numberDiff line change
@@ -3726,3 +3726,4 @@ int OSScan::os_scan(std::vector<Target *> &Targets) {
37263726
else
37273727
return OP_FAILURE;
37283728
}
3729+

output.h

+1
Original file line numberDiff line numberDiff line change
@@ -290,3 +290,4 @@ void nmap_adjust_loglevel(nsock_pool nsp, bool trace);
290290
void nmap_nsock_stderr_logger(nsock_pool nsp, const struct nsock_log_rec *rec);
291291

292292
#endif /* OUTPUT_H */
293+

payload.cc

+1
Original file line numberDiff line numberDiff line change
@@ -419,3 +419,4 @@ const char *get_udp_payload(u16 dport, size_t *length) {
419419
return udp_port2payload(dport, length);
420420
}
421421
}
422+

payload.h

+1
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,4 @@ const char *udp_port2payload(u16 dport, size_t *length);
133133
int init_payloads(void);
134134

135135
#endif /* PAYLOAD_H */
136+

portlist.h

+1
Original file line numberDiff line numberDiff line change
@@ -346,3 +346,4 @@ class PortList {
346346
};
347347

348348
#endif
349+

portreasons.cc

+1
Original file line numberDiff line numberDiff line change
@@ -562,3 +562,4 @@ char *port_reason_str(state_reason_t r) {
562562
}
563563
return reason;
564564
}
565+

protocols.cc

+1
Original file line numberDiff line numberDiff line change
@@ -250,3 +250,4 @@ struct protoent *nmap_getprotbynum(int num) {
250250
/* Couldn't find it ... oh well. */
251251
return NULL;
252252
}
253+

protocols.h

+1
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,4 @@ struct protoent *nmap_getprotbynum(int num);
158158
"N/A")
159159

160160
#endif
161+

scan_engine.cc

+1
Original file line numberDiff line numberDiff line change
@@ -5864,3 +5864,4 @@ void ultra_scan(std::vector<Target *> &Targets, struct scan_lists *ports,
58645864
if (o.debugging > 2 && USI.pd != NULL)
58655865
pcap_print_stats(LOG_PLAIN, USI.pd);
58665866
}
5867+

scan_engine.h

+1
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,4 @@ int determineScanGroupSize(int hosts_scanned_so_far,
201201
struct scan_lists *ports);
202202

203203
#endif /* SCAN_ENGINE_H */
204+

services.h

+1
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,4 @@ void gettoppts(double level, char *portlist, struct scan_lists * ports);
155155
void free_services();
156156

157157
#endif
158+

struct_ip.h

+1
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,4 @@ struct icmp
160160
#define icmp_data icmp_dun.id_data
161161
};
162162
#endif /* HAVE_STRUCT_ICMP */
163+

targets.cc

+1
Original file line numberDiff line numberDiff line change
@@ -721,3 +721,4 @@ Target *nexthost(HostGroupState *hs, const addrset *exclude_group,
721721

722722
return hs->hostbatch[hs->next_batch_no++];
723723
}
724+

targets.h

+1
Original file line numberDiff line numberDiff line change
@@ -235,3 +235,4 @@ int dumpExclude(addrset *exclude_group);
235235
void returnhost(HostGroupState *hs);
236236

237237
#endif /* TARGETS_H */
238+

tcpip.cc

+1
Original file line numberDiff line numberDiff line change
@@ -2170,3 +2170,4 @@ int gettcpopt_ts(struct tcp_hdr *tcp, u32 *timestamp, u32 *echots) {
21702170
*echots = 0;
21712171
return 0;
21722172
}
2173+

timing.cc

+1
Original file line numberDiff line numberDiff line change
@@ -774,3 +774,4 @@ bool ScanProgressMeter::beginOrEndTask(const struct timeval *now, const char *ad
774774
log_flush(LOG_STDOUT|LOG_XML);
775775
return true;
776776
}
777+

traceroute.cc

+1
Original file line numberDiff line numberDiff line change
@@ -1649,3 +1649,4 @@ static struct timeval get_now(struct timeval *now) {
16491649
static const char *ss_to_string(const struct sockaddr_storage *ss) {
16501650
return inet_ntop_ez(ss, sizeof(*ss));
16511651
}
1652+

traceroute.h

+1
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,4 @@
130130
int traceroute(std::vector<Target *> &Targets);
131131

132132
void traceroute_hop_cache_clear();
133+

utils.cc

+1
Original file line numberDiff line numberDiff line change
@@ -700,3 +700,4 @@ int win32_munmap(char *filestr, int filelen) {
700700
return 0;
701701
}
702702
#endif
703+

utils.h

+1
Original file line numberDiff line numberDiff line change
@@ -229,3 +229,4 @@ int win32_munmap(char *filestr, int filelen);
229229
#endif /* WIN32 */
230230

231231
#endif /* UTILS_H */
232+

xml.cc

+1
Original file line numberDiff line numberDiff line change
@@ -452,3 +452,4 @@ bool xml_tag_open() {
452452
bool xml_root_written() {
453453
return xml.root_written;
454454
}
455+

xml.h

+1
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,4 @@ bool xml_tag_open();
153153
bool xml_root_written();
154154

155155
#endif
156+

0 commit comments

Comments
 (0)