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

Method __init__

actions/connector_utils.py:55–66  ·  view source on GitHub ↗

Initialize the file tracker. Args: protocol: Protocol name (ssh, ftp, smb, rdp, telnet) datadir: Data directory for storing tracking files

(self, protocol, datadir)

Source from the content-addressed store, hash-verified

53 """Helper class to track stolen files and avoid re-downloading."""
54
55 def __init__(self, protocol, datadir):
56 """
57 Initialize the file tracker.
58
59 Args:
60 protocol: Protocol name (ssh, ftp, smb, rdp, telnet)
61 datadir: Data directory for storing tracking files
62 """
63 self.protocol = protocol
64 self.db_file = os.path.join(datadir, f'stolen_files_{protocol}.json')
65 self.stolen_files = {}
66 self._load_db()
67
68 def _load_db(self):
69 """Load the database of already stolen files."""

Callers

nothing calls this directly

Calls 1

_load_dbMethod · 0.95

Tested by

no test coverage detected