-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Description
Describe the bug
NSE script outputs are not printed directly under the scanned host and port. Instead, they are printed much later making them unusable.
To Reproduce
$ nmap -p 80,443 --script=/dev/shm/hostmap-crtsh.nse --script=http-robots.txt --script-args=newtargets lebihan.pl
Starting Nmap 7.91 ( https://nmap.org ) at 2020-11-07 16:14 CET
Nmap scan report for lebihan.pl (89.72.190.170)
Host is up (0.00086s latency).
rDNS record for 89.72.190.170: 89-72-190-170.dynamic.chello.pl
PORT STATE SERVICE
80/tcp open http
443/tcp open https
| http-robots.txt: 1 disallowed entry
|_/
Host script results:
| hostmap-crtsh:
| subdomains:
| www.lebihan.pl
| algorytmy.lebihan.pl
| biboumi.lebihan.pl
| conference.lebihan.pl
| mta-sts.lebihan.pl
| nextcloud.lebihan.pl
| www.nextcloud.lebihan.pl
| jmap.lebihan.pl
| strona-abcdbanku.com.lebihan.pl
|_ proxy.lebihan.pl
Nmap scan report for www.lebihan.pl (89.72.190.170)
Host is up (0.0020s latency).
rDNS record for 89.72.190.170: 89-72-190-170.dynamic.chello.pl
PORT STATE SERVICE
80/tcp open http
443/tcp open https
Nmap scan report for algorytmy.lebihan.pl (89.72.190.170)
Host is up (0.0017s latency).
rDNS record for 89.72.190.170: 89-72-190-170.dynamic.chello.pl
PORT STATE SERVICE
80/tcp open http
443/tcp open https
Nmap scan report for biboumi.lebihan.pl (89.72.190.170)
Host is up (0.0017s latency).
rDNS record for 89.72.190.170: 89-72-190-170.dynamic.chello.pl
PORT STATE SERVICE
80/tcp open http
443/tcp open https
Nmap scan report for conference.lebihan.pl (89.72.190.170)
Host is up (0.0017s latency).
rDNS record for 89.72.190.170: 89-72-190-170.dynamic.chello.pl
PORT STATE SERVICE
80/tcp open http
443/tcp open https
Nmap scan report for mta-sts.lebihan.pl (89.72.190.170)
Host is up (0.0017s latency).
rDNS record for 89.72.190.170: 89-72-190-170.dynamic.chello.pl
PORT STATE SERVICE
80/tcp open http
443/tcp open https
Nmap scan report for nextcloud.lebihan.pl (89.72.190.170)
Host is up (0.0018s latency).
rDNS record for 89.72.190.170: 89-72-190-170.dynamic.chello.pl
PORT STATE SERVICE
80/tcp open http
443/tcp open https
Nmap scan report for www.nextcloud.lebihan.pl (89.72.190.170)
Host is up (0.0018s latency).
rDNS record for 89.72.190.170: 89-72-190-170.dynamic.chello.pl
PORT STATE SERVICE
80/tcp open http
443/tcp open https
Nmap scan report for jmap.lebihan.pl (89.72.190.170)
Host is up (0.0018s latency).
rDNS record for 89.72.190.170: 89-72-190-170.dynamic.chello.pl
PORT STATE SERVICE
80/tcp open http
443/tcp open https
Nmap scan report for strona-abcdbanku.com.lebihan.pl (89.72.190.170)
Host is up (0.0019s latency).
rDNS record for 89.72.190.170: 89-72-190-170.dynamic.chello.pl
PORT STATE SERVICE
80/tcp open http
443/tcp open https
Nmap scan report for proxy.lebihan.pl (89.72.190.170)
Host is up (0.0020s latency).
rDNS record for 89.72.190.170: 89-72-190-170.dynamic.chello.pl
PORT STATE SERVICE
80/tcp open http
443/tcp open https
| http-robots.txt: 1 disallowed entry
|_/
| http-robots.txt: 1 disallowed entry
|_/
| http-robots.txt: 1 disallowed entry
|_/
| http-robots.txt: 1 disallowed entry
|_/
| http-robots.txt: 1 disallowed entry
|_/
| http-robots.txt: 1 disallowed entry
|_/
| http-robots.txt: 1 disallowed entry
|_/
| http-robots.txt: 1 disallowed entry
|_/
Nmap done: 11 IP addresses (11 hosts up) scanned in 26.15 seconds
Expected behavior
NSE script output should be under the correct host and port as achieved by using --max-hostgroup 1 as a workaround.
$ nmap --max-hostgroup 1 -p 80,443 --script=/dev/shm/hostmap-crtsh.nse --script=http-robots.txt --script-args=newtargets lebihan.pl
Starting Nmap 7.91 ( https://nmap.org ) at 2020-11-07 16:15 CET
Nmap scan report for lebihan.pl (89.72.190.170)
Host is up (0.0010s latency).
rDNS record for 89.72.190.170: 89-72-190-170.dynamic.chello.pl
PORT STATE SERVICE
80/tcp open http
443/tcp open https
| http-robots.txt: 1 disallowed entry
|_/
Host script results:
| hostmap-crtsh:
| subdomains:
| www.lebihan.pl
| algorytmy.lebihan.pl
| biboumi.lebihan.pl
| conference.lebihan.pl
| mta-sts.lebihan.pl
| nextcloud.lebihan.pl
| www.nextcloud.lebihan.pl
| jmap.lebihan.pl
| strona-abcdbanku.com.lebihan.pl
|_ proxy.lebihan.pl
Nmap scan report for www.lebihan.pl (89.72.190.170)
Host is up (0.0018s latency).
rDNS record for 89.72.190.170: 89-72-190-170.dynamic.chello.pl
PORT STATE SERVICE
80/tcp open http
443/tcp open https
| http-robots.txt: 1 disallowed entry
|_/
Nmap scan report for algorytmy.lebihan.pl (89.72.190.170)
Host is up (0.0013s latency).
rDNS record for 89.72.190.170: 89-72-190-170.dynamic.chello.pl
PORT STATE SERVICE
80/tcp open http
443/tcp open https
Nmap scan report for biboumi.lebihan.pl (89.72.190.170)
Host is up (0.0013s latency).
rDNS record for 89.72.190.170: 89-72-190-170.dynamic.chello.pl
PORT STATE SERVICE
80/tcp open http
443/tcp open https
| http-robots.txt: 1 disallowed entry
|_/
Nmap scan report for conference.lebihan.pl (89.72.190.170)
Host is up (0.0013s latency).
rDNS record for 89.72.190.170: 89-72-190-170.dynamic.chello.pl
PORT STATE SERVICE
80/tcp open http
443/tcp open https
| http-robots.txt: 1 disallowed entry
|_/
Nmap scan report for mta-sts.lebihan.pl (89.72.190.170)
Host is up (0.0013s latency).
rDNS record for 89.72.190.170: 89-72-190-170.dynamic.chello.pl
PORT STATE SERVICE
80/tcp open http
443/tcp open https
Nmap scan report for nextcloud.lebihan.pl (89.72.190.170)
Host is up (0.0014s latency).
rDNS record for 89.72.190.170: 89-72-190-170.dynamic.chello.pl
PORT STATE SERVICE
80/tcp open http
443/tcp open https
| http-robots.txt: 1 disallowed entry
|_/
Nmap scan report for www.nextcloud.lebihan.pl (89.72.190.170)
Host is up (0.0014s latency).
rDNS record for 89.72.190.170: 89-72-190-170.dynamic.chello.pl
PORT STATE SERVICE
80/tcp open http
443/tcp open https
| http-robots.txt: 1 disallowed entry
|_/
Nmap scan report for jmap.lebihan.pl (89.72.190.170)
Host is up (0.0014s latency).
rDNS record for 89.72.190.170: 89-72-190-170.dynamic.chello.pl
PORT STATE SERVICE
80/tcp open http
443/tcp open https
| http-robots.txt: 1 disallowed entry
|_/
Nmap scan report for strona-abcdbanku.com.lebihan.pl (89.72.190.170)
Host is up (0.0016s latency).
rDNS record for 89.72.190.170: 89-72-190-170.dynamic.chello.pl
PORT STATE SERVICE
80/tcp open http
443/tcp open https
| http-robots.txt: 1 disallowed entry
|_/
Nmap scan report for proxy.lebihan.pl (89.72.190.170)
Host is up (0.0015s latency).
rDNS record for 89.72.190.170: 89-72-190-170.dynamic.chello.pl
PORT STATE SERVICE
80/tcp open http
443/tcp open https
| http-robots.txt: 1 disallowed entry
|_/
Nmap done: 11 IP addresses (11 hosts up) scanned in 30.62 seconds
Version info (please complete the following information):
- OS: Debian testing (bullseye) kernel 5.9.0-1-amd64
- Output of
nmap --version:
Nmap version 7.91 ( https://nmap.org )
Platform: x86_64-pc-linux-gnu
Compiled with: liblua-5.3.3 openssl-1.1.1h libssh2-1.8.0 libz-1.2.11 libpcre-8.39 libpcap-1.9.1 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: epoll poll select
Note: /dev/shm/hostmap-crtsh.nse is the file from #2174
- Output of
nmap --iflist
Additional context
Add any other context about the problem here, such as special network type.
Neustradamus