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 """Files paths"""
449 # Files directly under configdir
450 self.shared_config_json = os.path.join(self.configdir, 'shared_config.json')
451 self.actions_file = os.path.join(self.configdir, 'actions.json')
452 # Files directly under resourcesdir
453 self.commentsfile = os.path.join(self.commentsdir, 'comments.json')
454 # Files directly under datadir
455 self.netkbfile = os.path.join(self.datadir, "netkb.csv")
456 self.livestatusfile = os.path.join(self.datadir, 'livestatus.csv')
457 self.gamification_file = os.path.join(self.datadir, 'gamification.json')
458 self.pwnagotchi_status_file = os.path.join(self.datadir, 'pwnagotchi_status.json')
459 # Files directly under vulnerabilities_dir (kept in sync via _update_output_paths)
460 self.vuln_summary_file = os.path.join(self.vulnerabilities_dir, 'vulnerability_summary.csv')
461 self.vuln_scan_progress_file = os.path.join(self.vulnerabilities_dir, 'scan_progress.json')
462 # Files directly under dictionarydir
463 self.usersfile = os.path.join(self.dictionarydir, "users.txt")
464 self.passwordsfile = os.path.join(self.dictionarydir, "passwords.txt")
465 # Files directly under crackedpwddir
466 self._refresh_credential_files()
467 self.crackedpwd_dir = self.crackedpwddir
468 #Files directly under logsdir
469 self.webconsolelog = os.path.join(self.logsdir, 'temp_log.txt')
470

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