-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
34 lines (28 loc) · 1.02 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# config.py
import configparser
def get_virustotal_api_key():
config = configparser.ConfigParser()
config.read('config/config.ini')
return config.get('VirusTotal', 'api_key')
def get_safe_browsing_api_key():
config = configparser.ConfigParser()
config.read('config/config.ini')
if config.has_section('GoogleSafeBrowsing'):
return config.get('GoogleSafeBrowsing', 'api_key')
return None
def get_urlscan_api_key():
config = configparser.ConfigParser()
config.read('config/config.ini')
return config.get('Urlscan', 'api_key')
def get_openai_api_key():
config = configparser.ConfigParser()
config.read('config/config.ini')
if config.has_section('OpenAI'):
return config.get('OpenAI', 'api_key')
return None
def get_hybrid_analysis_api_key():
config = configparser.ConfigParser()
config.read('config/config.ini')
if config.has_section('HybridAnalysis'):
return config.get('HybridAnalysis', 'api_key')
return None