Nmap Development mailing list archives

Nmap 4.21ALPHA4 DNS resolve timeout


From: Henrik Zagerholm <henke () mac se>
Date: Tue, 26 Jun 2007 11:19:13 +0200

Hello list,

I wonder if its possible to set a timeout for DNS resolving?

I've tried --host-timeout --initial-rtt-timeoute --max-rtt-timeoute  
without any success.

Another thing is that I've been able to reduce the time it takes for  
nmap to resolve names of active computers by sending in one IP adress  
at a time.

Eg.
henke@backend$ time nmap -sP 192.168.1.0/24

Starting Nmap 4.21ALPHA4 ( http://insecure.org ) at 2007-06-26 10:07  
CEST
Host 192.168.1.1 appears to be up.
Host 192.168.1.2 appears to be up.
Host 192.168.1.3 appears to be up.
Host 192.168.1.11 appears to be up.
Host 192.168.1.102 appears to be up.
Host jni (192.168.1.103) appears to be up.
Host jojkrider (192.168.1.107) appears to be up.
Host surak (192.168.1.120) appears to be up.
Host 192.168.1.128 appears to be up.
Host 192.168.1.129 appears to be up.
Host 192.168.1.133 appears to be up.
Host 192.168.1.136 appears to be up.
Host 192.168.1.137 appears to be up.
Host 192.168.1.140 appears to be up.
Host wellform.kic.se (192.168.1.142) appears to be up.
Host 192.168.1.144 appears to be up.
Host hp64412420716 (192.168.1.180) appears to be up.
Host 192.168.1.199 appears to be up.
Host 192.168.1.202 appears to be up.
Host 192.168.1.203 appears to be up.
Host 192.168.1.205 appears to be up.
Host 192.168.1.210 appears to be up.
Nmap finished: 256 IP addresses (22 hosts up) scanned in 15.675 seconds

real    0m15.680s
user    0m0.007s
sys     0m0.004s


Using my simple ruby script

henke@backend$ time ruby test.rb
Host 192.168.1.1
Host 192.168.1.2
Host 192.168.1.3
Host srvkic.kic.se (192.168.1.11)
Host 192.168.1.102
Host jni (192.168.1.103)
Host jojkrider (192.168.1.107)
Host kiclabb.kic.se (192.168.1.113)
Host surak (192.168.1.120)
Host 192.168.1.128
Host 192.168.1.129
Host cpq25891261711.kic.se (192.168.1.133)
Host 192.168.1.136
Host 192.168.1.137
Host 192.168.1.140
Host pc309741037666.kic.se (192.168.1.144)
Host hp64412420716 (192.168.1.180)
Host 192.168.1.199
Host 192.168.1.202
Host 192.168.1.203
Host 192.168.1.205
Host 192.168.1.210

real    0m2.894s
user    0m0.176s
sys     0m0.074s


So I get the same result but at a fraction of the time. The script  
just do 2 things:
1. nmap -sP -n 192.168.1.0/24 (avoiding DNS resolve)
2. Passing the active adresses one by one to nmap again nmap -sL (IP- 
adress)

Done!
How can this be?

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: