-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
32 lines (24 loc) · 1.6 KB
/
main.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
from postprocessing.postprocessing_service import PostProcessingService
from providers.collection_service_provider import CollectionServiceProviderType, boot as boot_collection
from providers.processing_service_provider import ProcessingServiceProviderType, boot as boot_processing
from providers.postprocessing_service_provider import PostProcessingServiceProviderType, boot as boot_postprocessing
from repository.credentials_fs_saver import CredentialsFsSaver
from collection.collection_service import CollectionService
from processing.processing_service import ProcessingService
from collection.dto.intel_collection_result import IntelCollectionResult
from models.credentials import Credentials
from typing import List
def main():
collection_provider: CollectionServiceProviderType = boot_collection()
processing_provider: ProcessingServiceProviderType = boot_processing()
postprocessing_provider: PostProcessingServiceProviderType = boot_postprocessing()
collection_service: CollectionService = collection_provider[CollectionService]
processing_service: ProcessingService = processing_provider[ProcessingService]
postprocessing_service: PostProcessingService = postprocessing_provider[PostProcessingService]
collected: List[IntelCollectionResult] = collection_service.collect()
processed: List[Credentials] = processing_service.process(collected)
postprocessed: List[Credentials] = postprocessing_service.execute(processed)
credentials_saver: CredentialsFsSaver = CredentialsFsSaver(filepath="output.json")
credentials_saver.save(postprocessed)
if __name__ == "__main__":
main()