class platypush.plugins.nmap.NmapPlugin(**kwargs)[source]

Nmap network scanner/mapper integration.


Initialize self. See help(type(self)) for accurate signature.

scan(hosts: str, ports: str, args: str, sudo: bool = False) → Dict[str, Any][source]

Perform a port scan towards a certain host or network.

  • hosts – Host name/IP or IP subnet to scan (e.g.
  • ports – Port number, (comma-separated) list or (dash-separated) range to scan (default: all).
  • args – Additional command line arguments for nmap.
  • sudo – Execute nmap as root through sudo (default: False).

Scan results, as an ip -> host map.