Script targets-sniffer

Script types: prerule
Categories: broadcast, discovery, safe
Download: https://svn.nmap.org/nmap/scripts/targets-sniffer.nse

Script Summary

Sniffs the local network for a configurable amount of time (10 seconds by default) and prints discovered addresses. If the newtargets script argument is set, discovered addresses are added to the scan queue.

Requires root privileges. Either the targets-sniffer.iface script argument or -e Nmap option to define which interface to use.

Script Arguments

targets-sniffer.iface

The interface to use for sniffing.

targets-sniffer.timeout

The amount of time to listen for packets. Default 10s.

newtargets

If true, add discovered targets to the scan queue.

max-newtargets

See the documentation for the target library.

Example Usage

nmap -sL --script=targets-sniffer --script-args=newtargets,targets-sniffer.timeout=5s,targets-sniffer.iface=eth0

Script Output

Pre-scan script results:
| targets-sniffer:
| 192.168.0.1
| 192.168.0.3
| 192.168.0.35
|_192.168.0.100

Requires


Author:

  • Nick Nikolaou

License: Same as Nmap--See https://nmap.org/book/man-legal.html