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

Method has_host

pager_lib/nmap/nmap.py:653–665  ·  view source on GitHub ↗

returns True if host has result, False otherwise

(self, host)

Source from the content-addressed store, hash-verified

651 return self._scan_result["nmap"]["scanstats"]
652
653 def has_host(self, host):
654 """
655 returns True if host has result, False otherwise
656 """
657 assert (
658 type(host) is str
659 ), f"Wrong type for [host], should be a string [was {type(host)}]"
660 assert "scan" in self._scan_result, "Do a scan before trying to get result !"
661
662 if host in list(self._scan_result["scan"].keys()):
663 return True
664
665 return False
666
667 def csv(self):
668 """

Callers

nothing calls this directly

Calls 1

keysMethod · 0.45

Tested by

no test coverage detected