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

Function __scan_progressive__

pager_lib/nmap/nmap.py:737–751  ·  view source on GitHub ↗

Used by PortScannerAsync for callback

(  # NOQA: CFQ002
    self, hosts, ports, arguments, callback, sudo, timeout
)

Source from the content-addressed store, hash-verified

735
736
737def __scan_progressive__( # NOQA: CFQ002
738 self, hosts, ports, arguments, callback, sudo, timeout
739):
740 """
741 Used by PortScannerAsync for callback
742 """
743 for host in self._nm.listscan(hosts):
744 try:
745 scan_data = self._nm.scan(host, ports, arguments, sudo, timeout)
746 except PortScannerError:
747 scan_data = None
748
749 if callback is not None:
750 callback(host, scan_data)
751 return
752
753
754############################################################################

Callers

nothing calls this directly

Calls 3

listscanMethod · 0.80
callbackFunction · 0.50
scanMethod · 0.45

Tested by

no test coverage detected