Loading src/event-timeout.c +2 −2 Original line number Diff line number Diff line Loading @@ -76,8 +76,8 @@ timeouts_add(struct Timeouts *timeouts, struct TimeoutEntry *entry, size_t offset, uint64_t timestamp) { unsigned index; time_t now = time(0); time_t time_future = (unsigned)(timestamp/16384ULL); //time_t now = time(0); //time_t time_future = (unsigned)(timestamp/16384ULL); /* Unlink from wherever the entry came from */ timeout_unlink(entry); Loading src/proto-banner1.c +4 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,10 @@ struct Patterns patterns[] = { {"\x16\x03\x01",3, PROTO_SSL3, SMACK_ANCHOR_BEGIN}, {"\x16\x03\x02",3, PROTO_SSL3, SMACK_ANCHOR_BEGIN}, {"\x16\x03\x03",3, PROTO_SSL3, SMACK_ANCHOR_BEGIN}, {"\x15\x03\x00",3, PROTO_SSL3, SMACK_ANCHOR_BEGIN}, {"\x15\x03\x01",3, PROTO_SSL3, SMACK_ANCHOR_BEGIN}, {"\x15\x03\x02",3, PROTO_SSL3, SMACK_ANCHOR_BEGIN}, {"\x15\x03\x03",3, PROTO_SSL3, SMACK_ANCHOR_BEGIN}, {0,0} }; Loading src/proto-http.c +1 −1 Original line number Diff line number Diff line Loading @@ -310,7 +310,7 @@ http_selftest(void) /*************************************************************************** ***************************************************************************/ struct Banner1Stream banner_http = { "http", 80, http_hello, sizeof(http_hello), "http", 80, http_hello, sizeof(http_hello)-1, http_selftest, http_init, http_parse, Loading src/proto-tcp.c +9 −10 Original line number Diff line number Diff line Loading @@ -640,12 +640,8 @@ tcpcon_handle(struct TCP_ConnectionTable *tcpcon, struct TCP_Control_Block *tcb, const unsigned char *x; switch (tcb->port_them) { case 80: x = (const unsigned char *) "GET / HTTP/1.0\r\n" "User-Agent: masscan/1.0 (https://github.com/robertdavidgraham/masscan)\r\n" //"Connection: Keep-Alive\r\n" //"Content-Length: 0\r\n" "\r\n"; x = (const unsigned char *)banner_ssl.hello; x_len = banner_ssl.hello_length; break; case 443: /* HTTP/s */ case 465: /* SMTP/s */ Loading @@ -659,13 +655,16 @@ tcpcon_handle(struct TCP_ConnectionTable *tcpcon, struct TCP_Control_Block *tcb, case 9050: /* Tor */ tcb->banner1_state.is_sent_sslhello = 1; x = (const unsigned char *)banner_ssl.hello; x_len = banner_ssl.hello_length; break; default: x = 0; break; } if (x) { /* send request */ x_len = strlen((const char*)x); if (x && x_len) { /* Send request. This actually doens't send the packet right * now, but instead queues up a packet that the transmit * thread will send soon. */ tcpcon_send_packet(tcpcon, tcb, 0x18, x, x_len); Loading Loading
src/event-timeout.c +2 −2 Original line number Diff line number Diff line Loading @@ -76,8 +76,8 @@ timeouts_add(struct Timeouts *timeouts, struct TimeoutEntry *entry, size_t offset, uint64_t timestamp) { unsigned index; time_t now = time(0); time_t time_future = (unsigned)(timestamp/16384ULL); //time_t now = time(0); //time_t time_future = (unsigned)(timestamp/16384ULL); /* Unlink from wherever the entry came from */ timeout_unlink(entry); Loading
src/proto-banner1.c +4 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,10 @@ struct Patterns patterns[] = { {"\x16\x03\x01",3, PROTO_SSL3, SMACK_ANCHOR_BEGIN}, {"\x16\x03\x02",3, PROTO_SSL3, SMACK_ANCHOR_BEGIN}, {"\x16\x03\x03",3, PROTO_SSL3, SMACK_ANCHOR_BEGIN}, {"\x15\x03\x00",3, PROTO_SSL3, SMACK_ANCHOR_BEGIN}, {"\x15\x03\x01",3, PROTO_SSL3, SMACK_ANCHOR_BEGIN}, {"\x15\x03\x02",3, PROTO_SSL3, SMACK_ANCHOR_BEGIN}, {"\x15\x03\x03",3, PROTO_SSL3, SMACK_ANCHOR_BEGIN}, {0,0} }; Loading
src/proto-http.c +1 −1 Original line number Diff line number Diff line Loading @@ -310,7 +310,7 @@ http_selftest(void) /*************************************************************************** ***************************************************************************/ struct Banner1Stream banner_http = { "http", 80, http_hello, sizeof(http_hello), "http", 80, http_hello, sizeof(http_hello)-1, http_selftest, http_init, http_parse, Loading
src/proto-tcp.c +9 −10 Original line number Diff line number Diff line Loading @@ -640,12 +640,8 @@ tcpcon_handle(struct TCP_ConnectionTable *tcpcon, struct TCP_Control_Block *tcb, const unsigned char *x; switch (tcb->port_them) { case 80: x = (const unsigned char *) "GET / HTTP/1.0\r\n" "User-Agent: masscan/1.0 (https://github.com/robertdavidgraham/masscan)\r\n" //"Connection: Keep-Alive\r\n" //"Content-Length: 0\r\n" "\r\n"; x = (const unsigned char *)banner_ssl.hello; x_len = banner_ssl.hello_length; break; case 443: /* HTTP/s */ case 465: /* SMTP/s */ Loading @@ -659,13 +655,16 @@ tcpcon_handle(struct TCP_ConnectionTable *tcpcon, struct TCP_Control_Block *tcb, case 9050: /* Tor */ tcb->banner1_state.is_sent_sslhello = 1; x = (const unsigned char *)banner_ssl.hello; x_len = banner_ssl.hello_length; break; default: x = 0; break; } if (x) { /* send request */ x_len = strlen((const char*)x); if (x && x_len) { /* Send request. This actually doens't send the packet right * now, but instead queues up a packet that the transmit * thread will send soon. */ tcpcon_send_packet(tcpcon, tcb, 0x18, x, x_len); Loading