Commit 9d8c1488 authored by Robert David Graham's avatar Robert David Graham Committed by GitHub
Browse files

Merge pull request #240 from mzpqnxow/feature.output.icmp.scan.20160723

[PATCH] BUGFIX: fixed the boot status output to have correct information when an ICMP only scan is starting
parents aa8040a5 9ce79a91
Loading
Loading
Loading
Loading
+12
Changes for src/main.c: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -1262,11 +1262,23 @@ main_scan(struct Masscan *masscan)
        gmtime_s(&x, &now);
        strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%S GMT", &x);
        LOG(0, "\nStarting masscan " MASSCAN_VERSION " (http://bit.ly/14GZzcT) at %s\n", buffer);

        if (count_ports == 1 && \
            masscan->ports.list->begin == Templ_ICMP_echo && \
            masscan->ports.list->end == Templ_ICMP_echo)
            { /* ICMP only */
                LOG(0, " -- forced options: -sn -n --randomize-hosts -v --send-eth\n");
                LOG(0, "Initiating ICMP Echo Scan\n");
                LOG(0, "Scanning %u hosts\n",(unsigned)count_ips);
             }
        else /* This could actually also be a UDP only or mixed UDP/TCP/ICMP scan */
            {
                LOG(0, " -- forced options: -sS -Pn -n --randomize-hosts -v --send-eth\n");
                LOG(0, "Initiating SYN Stealth Scan\n");
                LOG(0, "Scanning %u hosts [%u port%s/host]\n",
                    (unsigned)count_ips, (unsigned)count_ports, (count_ports==1)?"":"s");
            }
    }

    /*
     * Now wait for <ctrl-c> to be pressed OR for threads to exit