From 1b6a9febc839b340c57ac3814ef68fa52821d963 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Fri, 8 Jul 2022 11:27:04 +0200 Subject: [PATCH] fix: [tracker typo squatting] fix perf --- bin/trackers/Tracker_Typo_Squatting.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bin/trackers/Tracker_Typo_Squatting.py b/bin/trackers/Tracker_Typo_Squatting.py index 28c7e01f..6f2d3a4d 100755 --- a/bin/trackers/Tracker_Typo_Squatting.py +++ b/bin/trackers/Tracker_Typo_Squatting.py @@ -54,13 +54,12 @@ class Tracker_Typo_Squatting(AbstractModule): print('Tracked typosquatting refreshed') host, id = message.split() - item = Item(id) # Cast message as Item - for key in self.typosquat_tracked_words_list: - #print(key) - if host in self.typosquat_tracked_words_list[key]: - self.new_tracker_found(key, 'typosquatting', item) + for tracker in self.typosquat_tracked_words_list: + if host in self.typosquat_tracked_words_list[tracker]: + item = Item(id) + self.new_tracker_found(tracker, 'typosquatting', item) def new_tracker_found(self, tracker, tracker_type, item): item_id = item.get_id()