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

Function _read_env_file_values

IntelOSINT.py:1913–1929  ·  view source on GitHub ↗
(env_path: Path)

Source from the content-addressed store, hash-verified

1911
1912
1913def _read_env_file_values(env_path: Path) -> dict:
1914 values = {}
1915 if not env_path.exists():
1916 return values
1917 try:
1918 for raw_line in env_path.read_text(encoding="utf-8").splitlines():
1919 line = raw_line.strip()
1920 if not line or line.startswith("#") or "=" not in line:
1921 continue
1922 key, value = line.split("=", 1)
1923 key = key.strip()
1924 value = value.strip().strip('"').strip("'")
1925 if key:
1926 values[key] = value
1927 except Exception:
1928 print("[!] File .env presente ma non leggibile. Verifica permessi e formato.")
1929 return values
1930
1931
1932def _is_valid_fernet_key(raw_value: str) -> bool:

Callers 1

_bootstrap_tokensFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected