Pas plus de 5 secondes par hote scanner

darcs-hash:20060205005545-d1718-f5b16a4a33f7da6f29c3c2993ace51eff74c568c.gz
This commit is contained in:
bernat 2006-02-05 01:55:45 +01:00
parent 22be72b28d
commit ff56755abe

View file

@ -34,7 +34,7 @@ for b in bornes:
# Est-ce un hotspot ?
hotspot = "<nvram>crans_hotspot=1" in b.info() and 1 or 0
# Est-ce que la borne est up ?
if os.system("nmap -p 22 -sS %s | grep -E -q '22/tcp (filtered|open)'" % b.nom()) == 0:
if os.system("nmap --host_timeout 5000 -p 22 -sS %s | grep -E -q '22/tcp (filtered|open)'" % b.nom()) == 0:
up = 1
else:
up = 0