MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / scanstats

Method scanstats

pager_lib/nmap/nmap.py:639–651  ·  view source on GitHub ↗

returns scanstats structure {'uphosts': '3', 'timestr': 'Thu Jun 3 21:45:07 2010', 'downhosts': '253', 'totalhosts': '256', 'elapsed': '5.79'} # NOQA: E501 may raise AssertionError exception if called before scanning

(self)

Source from the content-addressed store, hash-verified

637 return self._scan_result["nmap"]["scaninfo"]
638
639 def scanstats(self):
640 """
641 returns scanstats structure
642 {'uphosts': '3', 'timestr': 'Thu Jun 3 21:45:07 2010', 'downhosts': '253', 'totalhosts': '256', 'elapsed': '5.79'} # NOQA: E501
643
644 may raise AssertionError exception if called before scanning
645 """
646 assert "nmap" in self._scan_result, "Do a scan before trying to get result !"
647 assert (
648 "scanstats" in self._scan_result["nmap"]
649 ), "Do a scan before trying to get result !"
650
651 return self._scan_result["nmap"]["scanstats"]
652
653 def has_host(self, host):
654 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected