Nmap mrinfo NSE Script
This page contains detailed information about how to use the mrinfo NSE script. For list of all NSE scripts, visit the Nmap NSE Library.
Select: |
---|
Script Overview
Script source code: https://github.com/nmap/nmap/tree/master/scripts/mrinfo.nse
Script categories: discovery, safe, broadcast
Target service / protocol: -
Target network port(s): -
List of CVEs: -
Script Description
The mrinfo.nse script queries targets for multicast routing information.
This works by sending a DVMRP Ask Neighbors 2 request to the target and listening for DVMRP Neighbors 2 responses that are sent back and which contain local addresses and the multicast neighbors on each interface of the target. If no specific target is specified, the request will be sent to the 224.0.0.1 All Hosts multicast address.
This script is similar somehow to the mrinfo utility included with Windows and Cisco IOS.
Mrinfo NSE Script Arguments
This is a full list of arguments supported by the mrinfo.nse script:
mrinfo.target
Host to which the request is sent. If not set, the request will be sent to 224.0.0.1
.
Time to wait for responses. Defaults to 5s
.
Sets the number of the maximum allowed new targets. If set to 0 or less then there is no limit. The default value is 0.
newtargetsIf specified, lets NSE scripts add new targets.
- - -
To use these script arguments, add them to the Nmap command line using the --script-args arg1=value,[arg2=value,..]
syntax. For example:
nmap --script=mrinfo --script-args mrinfo.target=value,mrinfo.timeout=value <target>
Mrinfo NSE Script Example Usage
Here's an example of how to use the mrinfo.nse script:
nmap --script mrinfo
nmap --script mrinfo -e eth1
nmap --script mrinfo --script-args 'mrinfo.target=172.16.0.4'
Mrinfo NSE Script Example Output
Here's a sample output from the mrinfo.nse script:
Pre-scan script results:
| mrinfo:
| Source: 224.0.0.1
| Version 12.4
| Local address: 172.16.0.2
| Neighbor: 172.16.0.4
| Neighbor: 172.16.0.3
| Local address: 172.17.0.1
| Neighbor: 172.17.0.2
| Local address: 172.18.0.1
| Neighbor: 172.18.0.2
| Source: 224.0.0.1
| Version 12.4
| Local address: 172.16.0.4
| Neighbor: 172.16.0.3
| Neighbor: 172.16.0.2
| Local address: 172.17.0.2
| Neighbor: 172.17.0.1
| Source: 224.0.0.1
| Version 12.4
| Local address: 172.16.0.3
| Neighbor: 172.16.0.4
| Neighbor: 172.16.0.2
| Local address: 172.18.0.2
| Neighbor: 172.18.0.1
|_ Use the newtargets script-arg to add the responses as targets
Mrinfo NSE Script Example XML Output
There is no sample XML output for this module. However, by providing the -oX <file>
option, Nmap will produce a XML output and save it in the file.xml
file.
Author
- Hani Benhabiles
References
- https://nmap.org/nsedoc/scripts/mrinfo.html
- https://github.com/nmap/nmap/tree/master/scripts/mrinfo.nse
See Also
Visit Nmap NSE Library for more scripts.
The mrinfo.nse script may fail with the following error messages. Check for the possible causes by using the code snippets highlighted below found in the script source code. This can often times help in identifying the root cause of the problem.
Couldn't get interface for %s
Here is a relevant code snippet related to the "Couldn't get interface for %s" error message:
248: interface = nmap.get_interface_info(interface)
249: else
250: interface = getInterface(target)
251: end
252: if not interface then
253: return stdnse.format_output(false, ("Couldn't get interface for %s"):format(target))
254: end
255:
256: stdnse.debug1("will send to %s via %s interface.", target, interface.shortname)
257:
258: -- Thread that listens for responses
Version
This page has been created based on Nmap version 7.92.
Go back to menu.