Loading src/main-conf.c +22 −0 Original line number Diff line number Diff line Loading @@ -285,6 +285,10 @@ masscan_echo(struct Masscan *masscan, FILE *fp) masscan->http_headers[i].header_value_length, masscan->http_headers[i].header_value); } fprintf(fp, "%scapture = cert\n", masscan->is_capture_cert?"":"no"); fprintf(fp, "%scapture = html\n", masscan->is_capture_html?"":"no"); } /*************************************************************************** Loading Loading @@ -784,6 +788,24 @@ masscan_set_parameter(struct Masscan *masscan, free(masscan->bpf_filter); masscan->bpf_filter = (char*)malloc(len); memcpy(masscan->bpf_filter, value, len); } else if (EQUALS("capture", name)) { if (EQUALS("cert", value)) masscan->is_capture_cert = 1; else if (EQUALS("html", value)) masscan->is_capture_html = 1; else { fprintf(stderr, "FAIL: %s: unknown capture type\n", value); exit(1); } } else if (EQUALS("nocapture", name)) { if (EQUALS("cert", value)) masscan->is_capture_cert = 0; else if (EQUALS("html", value)) masscan->is_capture_html = 0; else { fprintf(stderr, "FAIL: %s: unknown capture type\n", value); exit(1); } } else if (EQUALS("ping", name) || EQUALS("ping-sweep", name)) { /* Add ICMP ping request */ struct Range range; Loading src/main.c +7 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,8 @@ #include "main-globals.h" /* all the global variables in the program */ #include "proto-zeroaccess.h" #include "siphash24.h" #include "proto-x509.h" #include <assert.h> #include <limits.h> Loading Loading @@ -561,6 +563,9 @@ receive_thread(void *v) out, masscan->tcb.timeout ); tcpcon_set_banner_flags(tcpcon, masscan->is_capture_cert, masscan->is_capture_html); if (masscan->http_user_agent_length) tcpcon_set_parameter( tcpcon, "http-user-agent", Loading Loading @@ -1258,6 +1263,7 @@ int main(int argc, char *argv[]) strcpy_s( masscan->rotate_directory, sizeof(masscan->rotate_directory), "."); masscan->is_capture_cert = 1; /* * On non-Windows systems, read the defaults from the file in Loading Loading @@ -1286,6 +1292,7 @@ int main(int argc, char *argv[]) /* Init some protocol parser data structures */ snmp_init(); x509_init(); /* Set randomization seed for SYN-cookies */ syn_set_entropy(masscan->seed); Loading src/masscan.h +2 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,8 @@ struct Masscan unsigned is_interactive:1; /* --interactive */ unsigned is_arp:1; /* --arp */ unsigned is_gmt:1; /* --gmt, all times in GMT */ unsigned is_capture_cert:1; /* --capture cert */ unsigned is_capture_html:1; /* --capture html */ /** * Wait forever for responses, instead of the default 10 seconds Loading src/proto-banner1.h +2 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ #define STATE_DONE 0xFFFFFFFF #include <stdio.h> #include "proto-banout.h" #include "proto-x509.h" struct Banner1 { Loading Loading @@ -34,6 +35,7 @@ struct SSL_SERVER_CERT { unsigned state; unsigned b64x; } sub; struct CertDecode x509; }; struct SSLRECORD { Loading src/proto-banout.c +0 −4 Original line number Diff line number Diff line Loading @@ -205,10 +205,6 @@ banout_selftest(void) if (banout->next == 0) return 1; if (banout->next->next == 0) return 1; if (banout->next->next->next != 0) return 1; if (banout_string_length(banout, 1) != 40) return 1; if (banout_string_length(banout, 2) != 50) Loading Loading
src/main-conf.c +22 −0 Original line number Diff line number Diff line Loading @@ -285,6 +285,10 @@ masscan_echo(struct Masscan *masscan, FILE *fp) masscan->http_headers[i].header_value_length, masscan->http_headers[i].header_value); } fprintf(fp, "%scapture = cert\n", masscan->is_capture_cert?"":"no"); fprintf(fp, "%scapture = html\n", masscan->is_capture_html?"":"no"); } /*************************************************************************** Loading Loading @@ -784,6 +788,24 @@ masscan_set_parameter(struct Masscan *masscan, free(masscan->bpf_filter); masscan->bpf_filter = (char*)malloc(len); memcpy(masscan->bpf_filter, value, len); } else if (EQUALS("capture", name)) { if (EQUALS("cert", value)) masscan->is_capture_cert = 1; else if (EQUALS("html", value)) masscan->is_capture_html = 1; else { fprintf(stderr, "FAIL: %s: unknown capture type\n", value); exit(1); } } else if (EQUALS("nocapture", name)) { if (EQUALS("cert", value)) masscan->is_capture_cert = 0; else if (EQUALS("html", value)) masscan->is_capture_html = 0; else { fprintf(stderr, "FAIL: %s: unknown capture type\n", value); exit(1); } } else if (EQUALS("ping", name) || EQUALS("ping-sweep", name)) { /* Add ICMP ping request */ struct Range range; Loading
src/main.c +7 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,8 @@ #include "main-globals.h" /* all the global variables in the program */ #include "proto-zeroaccess.h" #include "siphash24.h" #include "proto-x509.h" #include <assert.h> #include <limits.h> Loading Loading @@ -561,6 +563,9 @@ receive_thread(void *v) out, masscan->tcb.timeout ); tcpcon_set_banner_flags(tcpcon, masscan->is_capture_cert, masscan->is_capture_html); if (masscan->http_user_agent_length) tcpcon_set_parameter( tcpcon, "http-user-agent", Loading Loading @@ -1258,6 +1263,7 @@ int main(int argc, char *argv[]) strcpy_s( masscan->rotate_directory, sizeof(masscan->rotate_directory), "."); masscan->is_capture_cert = 1; /* * On non-Windows systems, read the defaults from the file in Loading Loading @@ -1286,6 +1292,7 @@ int main(int argc, char *argv[]) /* Init some protocol parser data structures */ snmp_init(); x509_init(); /* Set randomization seed for SYN-cookies */ syn_set_entropy(masscan->seed); Loading
src/masscan.h +2 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,8 @@ struct Masscan unsigned is_interactive:1; /* --interactive */ unsigned is_arp:1; /* --arp */ unsigned is_gmt:1; /* --gmt, all times in GMT */ unsigned is_capture_cert:1; /* --capture cert */ unsigned is_capture_html:1; /* --capture html */ /** * Wait forever for responses, instead of the default 10 seconds Loading
src/proto-banner1.h +2 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ #define STATE_DONE 0xFFFFFFFF #include <stdio.h> #include "proto-banout.h" #include "proto-x509.h" struct Banner1 { Loading Loading @@ -34,6 +35,7 @@ struct SSL_SERVER_CERT { unsigned state; unsigned b64x; } sub; struct CertDecode x509; }; struct SSLRECORD { Loading
src/proto-banout.c +0 −4 Original line number Diff line number Diff line Loading @@ -205,10 +205,6 @@ banout_selftest(void) if (banout->next == 0) return 1; if (banout->next->next == 0) return 1; if (banout->next->next->next != 0) return 1; if (banout_string_length(banout, 1) != 40) return 1; if (banout_string_length(banout, 2) != 50) Loading