From c7aeb0c646fa2f63856660705227ffdb4752be58 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Tue, 4 Apr 2023 14:12:23 +0200 Subject: [PATCH] fix: [modules] small fixs --- bin/crawlers/Crawler.py | 2 +- bin/importer/ZMQImporter.py | 4 ++-- bin/modules/CveModule.py | 3 +-- bin/modules/Decoder.py | 6 +++--- bin/modules/Tools.py | 4 +--- bin/modules/submit_paste.py | 2 +- bin/packages/lib_refine.py | 2 +- configs/core.cfg.sample | 5 +++++ 8 files changed, 15 insertions(+), 13 deletions(-) diff --git a/bin/crawlers/Crawler.py b/bin/crawlers/Crawler.py index 1c1245a7..6967da77 100755 --- a/bin/crawlers/Crawler.py +++ b/bin/crawlers/Crawler.py @@ -43,7 +43,7 @@ class Crawler(AbstractModule): # LACUS self.lacus = crawlers.get_lacus() - self.is_lacus_up = crawlers.get_lacus().is_up + self.is_lacus_up = is_lacus_connected(delta_check=0) # Capture self.har = None diff --git a/bin/importer/ZMQImporter.py b/bin/importer/ZMQImporter.py index 100b166d..144af904 100755 --- a/bin/importer/ZMQImporter.py +++ b/bin/importer/ZMQImporter.py @@ -57,11 +57,11 @@ class ZMQModuleImporter(AbstractModule): config_loader = ConfigLoader() addresses = config_loader.get_config_str('ZMQ_Global', 'address') - addresses = addresses.split(',').strip() + addresses = addresses.split(',') channel = config_loader.get_config_str('ZMQ_Global', 'channel') self.zmq_importer = ZMQImporters() for address in addresses: - self.zmq_importer.add(address, channel) + self.zmq_importer.add(address.strip(), channel) # TODO MESSAGE SOURCE - UI def get_message(self): diff --git a/bin/modules/CveModule.py b/bin/modules/CveModule.py index 60c1899f..93e2e17f 100755 --- a/bin/modules/CveModule.py +++ b/bin/modules/CveModule.py @@ -69,5 +69,4 @@ class CveModule(AbstractModule): if __name__ == '__main__': module = CveModule() - # module.run() - module.compute('crawled/2022/09/15/circl.lu1e4f9721-06dc-404f-aabf-3c3bd0b533bd 9') + module.run() diff --git a/bin/modules/Decoder.py b/bin/modules/Decoder.py index b14b5879..bcb9bfd2 100755 --- a/bin/modules/Decoder.py +++ b/bin/modules/Decoder.py @@ -25,9 +25,9 @@ from lib.objects.Items import Item from lib.objects.Decodeds import Decoded config_loader = ConfigLoader() -hex_max_execution_time = config_loader.get_config_int("Hex", "max_execution_time") -binary_max_execution_time = config_loader.get_config_int("Binary", "max_execution_time") -base64_max_execution_time = config_loader.get_config_int("Base64", "max_execution_time") +hex_max_execution_time = config_loader.get_config_int("Decoder", "max_execution_time_hexadecimal") +binary_max_execution_time = config_loader.get_config_int("Decoder", "max_execution_time_binary") +base64_max_execution_time = config_loader.get_config_int("Decoder", "max_execution_time_base64") config_loader = None diff --git a/bin/modules/Tools.py b/bin/modules/Tools.py index 0803ec2b..57dc6a23 100755 --- a/bin/modules/Tools.py +++ b/bin/modules/Tools.py @@ -10,7 +10,6 @@ Search tools outpout import os import sys -import time sys.path.append(os.environ['AIL_BIN']) ################################## @@ -433,6 +432,5 @@ class Tools(AbstractModule): if __name__ == '__main__': module = Tools() - # module.run() - module.compute('crawled/2022/09/15/circl.lu179c7903-5b21-452e-9f25-4b61d9934e2b') + module.run() diff --git a/bin/modules/submit_paste.py b/bin/modules/submit_paste.py index eddd797b..f6123b95 100755 --- a/bin/modules/submit_paste.py +++ b/bin/modules/submit_paste.py @@ -48,7 +48,7 @@ class SubmitPaste(AbstractModule): super(SubmitPaste, self).__init__(queue_name='submit_paste') # TODO KVROCKS - self.r_serv_db = ConfigLoader.ConfigLoader().get_redis_conn("Kvrocks_DB") + self.r_serv_db = ConfigLoader.ConfigLoader().get_db_conn("Kvrocks_DB") self.r_serv_log_submit = ConfigLoader.ConfigLoader().get_redis_conn("Redis_Log_submit") self.pending_seconds = 3 diff --git a/bin/packages/lib_refine.py b/bin/packages/lib_refine.py index eb4ea50f..f26723bc 100644 --- a/bin/packages/lib_refine.py +++ b/bin/packages/lib_refine.py @@ -16,7 +16,7 @@ sys.path.append(os.environ['AIL_BIN']) from lib import ConfigLoader config_loader = ConfigLoader.ConfigLoader() -dns_server = config_loader.get_config_str("Web", "dns") +dns_server = config_loader.get_config_str("DomClassifier", "dns") config_loader = None def is_luhn_valid(card_number): diff --git a/configs/core.cfg.sample b/configs/core.cfg.sample index 5e1b1856..475f7220 100644 --- a/configs/core.cfg.sample +++ b/configs/core.cfg.sample @@ -90,6 +90,11 @@ criticalNumberToAlert=8 #Will be considered as false positive if less that X matches from the top password list minTopPassList=5 +[Decoder] +max_execution_time_base64 = 60 +max_execution_time_binary = 60 +max_execution_time_hexadecimal = 60 + [Onion] save_i2p = False max_execution_time = 180