-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-verbose.patch
23 lines (23 loc) · 1.1 KB
/
single-verbose.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff -up nc110/netcat.c.2~ nc110/netcat.c
--- nc110/netcat.c.2~ 2025-01-25 18:20:48.973444838 +0100
+++ nc110/netcat.c 2025-01-25 18:22:51.418910963 +0100
@@ -2302,6 +2302,11 @@ Debug (("netfd %d from port %d to port %
/* if we're scanning at a "one -v" verbosity level, don't print refusals.
Give it another -v if you want to see everything. */
if ((Single || (o_verbose > 1)) || (errno != ECONNREFUSED)) {
+ /* bug 65413 - if we're not scanning, (and if we're not doing
+ * zero-io! see bug 247895) we always want an error to be printed
+ * for refused connects. This is a disgustingly ugly way to do it;
+ * I really should just rewrite the holler() interface... */
+ if (Single && !o_zero) o_verbose++;
#ifdef INET6
if (want6)
holler ("%s [%s] %d (%s)",
@@ -2310,6 +2315,7 @@ Debug (("netfd %d from port %d to port %
#endif
holler ("%s [%s] %d (%s)",
whereto->name, whereto->addrs[0], curport, portpoop->name);
+ if (Single && !o_zero) o_verbose--;
}
} /* if netfd */
close (netfd); /* just in case we didn't already */