Nmap Development mailing list archives

Ncat no longer showing "Connected to" message in verbose mode


From: David Fifield <david () bamsoftware com>
Date: Fri, 25 Nov 2016 19:51:37 -0800

With the -v flag, Ncat used to print out a message to stderr when the
connection succeeds:
        $ ncat -v scanme.nmap.org 80
        Ncat: Version 7.12SVN ( https://nmap.org/ncat )
        Ncat: Connected to 45.33.32.156:80.

Since r36004, it doesn't print the "Connected to" message anymore. It
confused me a few times when I was using Ncat to debug a connectivity
issue.

The log message for r36004 is
        Adds zero-byte option(-z) for Ncat. Fixes #22 and #225

I would guess this part of the patch is causing the problem:

        @@ -1104,7 +1113,10 @@ static void connect_handler(nsock_pool nsp, nsock_event evt, void *data)
             }
         #endif

        -    connect_report(cs.sock_nsi);
        +    if (o.proto != IPPROTO_UDP && o.zerobyte) {
        +      connect_report(cs.sock_nsi);
        +      nsock_loop_quit(nsp);
        +    }

             /* Create IOD for nsp->stdin */
             if ((cs.stdin_nsi = nsock_iod_new2(nsp, 0, NULL)) == NULL)
_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: