Commit deba4909 authored by Robert David Graham's avatar Robert David Graham
Browse files

heartBEAT detection, but not heartBLEED

parent a25a5813
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1139,6 +1139,10 @@ masscan_set_parameter(struct Masscan *masscan,
        if (count2 - count1)
        fprintf(stderr, "%s: excluding %u ranges from file\n",
                value, count2 - count1);
    } else if (EQUALS("heartbleed", name)) {
        masscan->is_heartbleed = 1;
        masscan_set_parameter(masscan, "no-capture", "cert");
        masscan_set_parameter(masscan, "banners", "true");
    } else if (EQUALS("hello-file", name)) {
        /* When connecting via TCP, send this file */
        FILE *fp;
@@ -1586,7 +1590,7 @@ is_singleton(const char *name)
        "badsum", "reason", "open", "open-only",
        "packet-trace", "release-memory",
        "log-errors", "append-output", "webxml", "no-stylesheet",
        "no-stylesheet",
        "no-stylesheet", "heartbleed",
        "send-eth", "send-ip", "iflist", "randomize-hosts",
        "nmap", "trace-packet", "pfring", "sendq",
        "banners", "banner", "nobanners", "nobanner",
+5 −0
Original line number Diff line number Diff line
@@ -617,6 +617,11 @@ receive_thread(void *v)
                                    "http-user-agent",
                                    masscan->http_user_agent_length,
                                    masscan->http_user_agent);
        if (masscan->is_heartbleed)
            tcpcon_set_parameter(   tcpcon,
                                    "heartbleed",
                                    1,
                                    "1");
        if (masscan->tcp_connection_timeout) {
            char foo[64];
            sprintf_s(foo, sizeof(foo), "%u", masscan->tcp_connection_timeout);
+1 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ masscan_app_to_string(enum ApplicationProtocol proto)
    case PROTO_HTML_TITLE: return "title";
    case PROTO_HTML_FULL: return "html";
    case PROTO_NTP:     return "ntp";
    case PROTO_VULN:    return "vuln";
    default:
        sprintf_s(tmp, sizeof(tmp), "(%u)", proto);
        return tmp;
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ enum ApplicationProtocol {
    PROTO_HTML_TITLE,
    PROTO_HTML_FULL,
    PROTO_NTP,              /* network time protocol, udp/123 */
    PROTO_VULN,
};

const char *
+1 −0
Original line number Diff line number Diff line
@@ -164,6 +164,7 @@ struct Masscan
    unsigned is_test_csv:1;     /* (temporary testing feature) */
    unsigned is_infinite:1;     /* -infinite */
    unsigned is_readscan:1;     /* --readscan, Operation_Readscan */
    unsigned is_heartbleed:1;   /* --heartbleed, scan for this vuln */

    /**
     * Wait forever for responses, instead of the default 10 seconds
Loading