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)
| 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 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected