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

Method load_scanner

orchestrator.py:248–261  ·  view source on GitHub ↗

Load the network scanner

(self, module_name)

Source from the content-addressed store, hash-verified

246 logger.error(f"Failed to load action {module_name}: {e}")
247
248 def load_scanner(self, module_name):
249 """Load the network scanner"""
250 try:
251 module = importlib.import_module(f'actions.{module_name}')
252 b_class = getattr(module, 'b_class', None)
253 if not b_class:
254 logger.error(f"Module {module_name} missing 'b_class' attribute")
255 return
256 self.network_scanner = getattr(module, b_class)(self.shared_data)
257 logger.info(f"Network scanner {b_class} loaded successfully")
258 except ImportError as e:
259 logger.error(f"Failed to import scanner module {module_name}: {e}")
260 except Exception as e:
261 logger.error(f"Error loading scanner {module_name}: {e}")
262
263 def load_nmap_vuln_scanner(self, module_name):
264 """Load the nmap vulnerability scanner"""

Callers 1

load_actionsMethod · 0.95

Calls 2

errorMethod · 0.80
infoMethod · 0.80

Tested by

no test coverage detected