-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.py
28 lines (24 loc) · 1.03 KB
/
init.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
from app.VirusTotal.vt_reporter import VTReporter
from app.VirusTotal.vt_client import VirusTotalClient
from app.DataHandler.validator import DataValidator
from app.DBHandler.db_handler import DBHandler
from app.FileHandler.output_to_file import OutputHandler
class Initializator:
"""
A class for initializing the VirusTotal client.
Attributes:
api_key (str): The VirusTotal API key.
proxy (str): The proxy to use for requests.
client (vt.Client): The VirusTotal client.
reporter (VirusTotalReporter): The VirusTotal reporter.
validator (DataValidator): The data validator.
output (OutputHandler): The output handler.
"""
def __init__(self, api_key: str, proxy: str = None, case_num: str = None):
self.api_key = api_key
self.proxy = proxy
self.client = VirusTotalClient(self.api_key, self.proxy).init_client()
self.reporter = VTReporter(self.client)
self.validator = DataValidator()
self.output = OutputHandler(case_num)
self.db_handler = DBHandler()