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

Method __getitem__

pager_lib/nmap/nmap.py:588–600  ·  view source on GitHub ↗

returns a host detail

(self, host)

Source from the content-addressed store, hash-verified

586 return scan_result
587
588 def __getitem__(self, host):
589 """
590 returns a host detail
591 """
592 if sys.version_info[0] == 2:
593 assert type(host) in (
594 str,
595 ), f"Wrong type for [host], should be a string [was {type(host)}]"
596 else:
597 assert (
598 type(host) is str
599 ), f"Wrong type for [host], should be a string [was {type(host)}]"
600 return self._scan_result["scan"][host]
601
602 def all_hosts(self):
603 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected