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

Method _apply_network_context

shared.py:450–467  ·  view source on GitHub ↗

Store active network metadata and optionally reconfigure storage.

(self, context, configure_db=True)

Source from the content-addressed store, hash-verified

448 self.passwordsfile = os.path.join(self.dictionarydir, "passwords.txt")
449 # Files directly under crackedpwddir
450 self._refresh_credential_files()
451 self.crackedpwd_dir = self.crackedpwddir
452 #Files directly under logsdir
453 self.webconsolelog = os.path.join(self.logsdir, 'temp_log.txt')
454
455 def _apply_network_context(self, context, configure_db=True):
456 """Store active network metadata and optionally reconfigure storage."""
457 if not context:
458 return
459 self.active_network_ssid = context.get('ssid')
460 self.active_network_slug = context.get('slug')
461 self.current_network_dir = context.get('network_dir')
462 self.current_network_db_path = context.get('db_path')
463 self.network_intelligence_dir = context.get('intelligence_dir')
464 self.network_threat_dir = context.get('threat_intelligence_dir')
465 loot_data_dir = context.get('data_stolen_dir') or self._default_datastolendir
466 loot_credentials_dir = context.get('credentials_dir') or self._default_crackedpwddir
467 self._update_loot_paths(loot_data_dir, loot_credentials_dir)
468 scan_results_dir = context.get('scan_results_dir') or self._default_scan_results_dir
469 vulnerabilities_dir = context.get('vulnerabilities_dir') or self._default_vulnerabilities_dir
470 self._update_output_paths(scan_results_dir, vulnerabilities_dir)

Callers 3

__init__Method · 0.95
set_active_networkMethod · 0.95
_apply_contextMethod · 0.80

Calls 4

_update_loot_pathsMethod · 0.95
_update_output_pathsMethod · 0.95
_configure_databaseMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected