mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
Restore a check for nmap.is_privileged to targets-sniffer.nse. I asked
Nick to remove this, but it turns out nmap.pcap_open has a bad failure mode when you're not root. It sleeps for several seconds then throws an error. So rather than tackle that I'll add this check back to the script.
This commit is contained in:
parent
d0bcacd18a
commit
f43ca1ae27
1 changed files with 2 additions and 1 deletions
|
|
@ -58,7 +58,8 @@ local function get_ip_addresses(layer3)
|
|||
end
|
||||
|
||||
prerule = function()
|
||||
return stdnse.get_script_args("targets-sniffer.iface") or nmap.get_interface()
|
||||
return nmap.is_privileged() and
|
||||
(stdnse.get_script_args("targets-sniffer.iface") or nmap.get_interface())
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue