Nmap unittest NSE Script
This page contains detailed information about how to use the unittest NSE script. For list of all NSE scripts, visit the Nmap NSE Library.
Script Overview
Script source code: https://github.com/nmap/nmap/tree/master/scripts/unittest.nse
Script categories: safe
Target service / protocol: -
Target network port(s): -
List of CVEs: -
Script Description
The unittest.nse script runs unit tests on all NSE libraries.
Unittest NSE Script Arguments
This is a full list of arguments supported by the unittest.nse script:
unittest.run
Run tests. Causes unittest.testing()
to return true.
Run tests from only these libraries (defaults to all)
- - -
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=unittest --script-args unittest.run=value,unittest.tests=value <target>
Unittest NSE Script Example Usage
Here's an example of how to use the unittest.nse script:
nmap --script unittest --script-args unittest.run
Unittest NSE Script Example Output
Here's a sample output from the unittest.nse script:
Pre-scan script results:
| unittest:
|_ All tests passed
Unittest 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
- Daniel Miller
References
- https://nmap.org/nsedoc/scripts/unittest.html
- https://github.com/nmap/nmap/tree/master/scripts/unittest.nse
See Also
Visit Nmap NSE Library for more scripts.
Version
This page has been created based on Nmap version 7.92.