Describe the bug
--stats-every not working when --noninteractive specified or with /dev/tty detached.
To Reproduce
- Run a normal scan with 1s interval for status messages
nmap --stats-every 1 $SCAN_CIDR
It should output stat messages every seconds, as expected.
- Run a
--noninteractive scan
nmap --stats-every 1 --noninteractive $SCAN_CIDR
It now render no output for stat messages.
- Run a scan with detached tty and stdio
(setsid nmap --stats-every 1 $SCAN_CIDR) < /dev/null |& cat
None of stat messages shows for nmap built after (suspectly) 10862c4
Expected behavior
--stats-every should always work regardless of --noninteractive and /dev/tty.
Version info (please complete the following information):
Works on without /dev/tty
- OS: [Ubuntu 22.04]
- Output of
nmap --version:
Nmap version 7.80 ( https://nmap.org )
Platform: x86_64-pc-linux-gnu
Compiled with: liblua-5.3.6 openssl-3.0.2 nmap-libssh2-1.8.2 libz-1.2.11 libpcre-8.39 libpcap-1.10.1 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: epoll poll select
Fails both case
- OS: [Ubuntu 24.04]
- Output of
nmap --version:
Nmap version 7.94SVN ( https://nmap.org )
Platform: x86_64-pc-linux-gnu
Compiled with: liblua-5.4.6 openssl-3.0.13 libssh2-1.11.0 libz-1.3 libpcre2-10.42 libpcap-1.10.4 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: epoll poll select
Describe the bug
--stats-everynot working when--noninteractivespecified or with/dev/ttydetached.To Reproduce
nmap --stats-every 1 $SCAN_CIDRIt should output stat messages every seconds, as expected.
--noninteractivescannmap --stats-every 1 --noninteractive $SCAN_CIDRIt now render no output for stat messages.
(setsid nmap --stats-every 1 $SCAN_CIDR) < /dev/null |& catNone of stat messages shows for nmap built after (suspectly) 10862c4
Expected behavior
--stats-everyshould always work regardless of--noninteractiveand/dev/tty.Version info (please complete the following information):
Works on without
/dev/ttynmap --version:Fails both case
nmap --version: