Reporting vulnerabilities

The vulns NSE library provides a set of useful functions for vulnerability management. Its purpose is to offer developers a common interface for storing and reporting vulnerabilities. The vulnerabilities are stored in the Nmap registry and can be accessed by other scripts during runtime. The library also helps keep track of all states of the vulnerabilities. The states are represented by the following string constants defined in the library:

  • vulns.STATE.NOT_VULN
  • vulns.STATE.LIKELY_VULN
  • vulns.STATE.VULN
  • vulns.STATE.DoS
  • vulns.STATE.EXPLOIT

Vulnerability reports are passed to the library as Lua tables. A vulnerability table needs two mandatory fields: title and state, but there are several other optional fields; some of them, ...

Get Mastering the Nmap Scripting Engine now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.