mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 00:28:22 +00:00
chg: [trackers] add warnings logs
This commit is contained in:
parent
2d2e4a653e
commit
2fadbc8b87
4 changed files with 5 additions and 3 deletions
|
@ -74,6 +74,7 @@ class Tracker_Regex(AbstractModule):
|
|||
item_date = item.get_date()
|
||||
item_source = item.get_source()
|
||||
print(f'new tracked regex found: {tracker} in {item_id}')
|
||||
self.redis_logger.warning(f'new tracked regex found: {tracker} in {item_id}')
|
||||
|
||||
for tracker_uuid in uuid_list:
|
||||
# Source Filtering
|
||||
|
|
|
@ -113,14 +113,14 @@ class Tracker_Term(AbstractModule):
|
|||
nb_uniq_word += 1
|
||||
if nb_uniq_word >= nb_words_threshold:
|
||||
self.new_term_found(word_set, 'set', item)
|
||||
|
||||
|
||||
def new_term_found(self, term, term_type, item):
|
||||
uuid_list = Term.get_term_uuid_list(term, term_type)
|
||||
|
||||
item_id = item.get_id()
|
||||
item_date = item.get_date()
|
||||
item_source = item.get_source()
|
||||
self.redis_logger.info(f'new tracked term found: {term} in {item_id}')
|
||||
self.redis_logger.warning(f'new tracked term found: {term} in {item_id}')
|
||||
print(f'new tracked term found: {term} in {item_id}')
|
||||
for term_uuid in uuid_list:
|
||||
tracker_sources = Tracker.get_tracker_uuid_sources(term_uuid)
|
||||
|
|
|
@ -67,6 +67,7 @@ class Tracker_Typo_Squatting(AbstractModule):
|
|||
item_source = item.get_source()
|
||||
#self.redis_logger.info(f'new tracked typo found: {tracker} in {item_id}')
|
||||
print(f'new tracked typosquatting found: {tracker} in {item_id}')
|
||||
self.redis_logger.warning(f'tracker typosquatting: {tracker} in {item_id}')
|
||||
|
||||
print(Tracker.get_tracker_uuid_list(tracker, tracker_type))
|
||||
for tracker_uuid in Tracker.get_tracker_uuid_list(tracker, tracker_type):
|
||||
|
|
|
@ -60,7 +60,7 @@ class Tracker_Yara(AbstractModule):
|
|||
try:
|
||||
yara_match = self.rules.match(data=item_content, callback=self.yara_rules_match, which_callbacks=yara.CALLBACK_MATCHES, timeout=60)
|
||||
if yara_match:
|
||||
self.redis_logger.info(f'{self.item.get_id()}: {yara_match}')
|
||||
self.redis_logger.warning(f'tracker yara: new match {self.item.get_id()}: {yara_match}')
|
||||
print(f'{self.item.get_id()}: {yara_match}')
|
||||
except yara.TimeoutError as e:
|
||||
print(f'{self.item.get_id()}: yara scanning timed out')
|
||||
|
|
Loading…
Reference in a new issue