INNER CODE UNIT · Python
Core
XDeadHackerX/The_spy_job · requisitos/theHarvester/theHarvester/lib/core.py:12
class Core:
@staticmethod
def version() -> str:
return '4.0.3'
@staticmethod
def api_keys() -> dict:
try:
with open('/etc/theHarvester/api-keys.yaml', 'r') as api_keys:
keys = yaml.safe_load(api_keys)
except FileNotFoundError:
try:
with open('/usr/local/etc/theHarvester/api-keys.yaml', 'r') as api_keys:
keys = yaml.safe_load(api_keys)
except FileNotFoundError:
with open('api-keys.yaml', 'r') as api_keys:
keys = yaml.safe_load(api_keys)
return keys['apikeys']