MCPcopy Create free account
hub / github.com/CScorza/IntelOSINT / _load_credentials

Function _load_credentials

IntelOSINT.py:2071–2091  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2069
2070
2071def _load_credentials():
2072 path = Path(CREDS_FILE)
2073 if not path.exists():
2074 return None
2075 try:
2076 raw_text = path.read_text(encoding="utf-8")
2077 except Exception:
2078 return None
2079 if not raw_text:
2080 return None
2081 try:
2082 parsed = json.loads(raw_text)
2083 except Exception:
2084 return None
2085 if isinstance(parsed, dict):
2086 decrypted = _decrypt_creds(parsed)
2087 if isinstance(decrypted, dict):
2088 return decrypted
2089 if "__cred_store" not in parsed:
2090 return parsed
2091 return None
2092
2093
2094def _save_credentials(payload):

Callers 1

__init__Method · 0.85

Calls 1

_decrypt_credsFunction · 0.85

Tested by

no test coverage detected