From 30423e7bf54aa1965e8683966b7ffcc9679a08d0 Mon Sep 17 00:00:00 2001 From: Jing Ling Date: Wed, 16 Sep 2020 00:56:57 +0800 Subject: [PATCH] typos --- common/utils.py | 4 ++-- modules/banner.py | 3 +-- modules/iscdn.py | 5 ----- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/common/utils.py b/common/utils.py index ad6f4b3..8a617e3 100644 --- a/common/utils.py +++ b/common/utils.py @@ -689,11 +689,11 @@ def match_subdomains(domain, html, distinct=True, fuzzy=True): def check_random_subdomain(subdomains): if not subdomains: logger.log('ALERT', f'The generated dictionary is empty') - return False + return for subdomain in subdomains: if subdomain: logger.log('ALERT', f'Please check whether {subdomain} is correct or not') - return True + return def get_url_resp(url): diff --git a/modules/banner.py b/modules/banner.py index 4d0757d..83464bc 100644 --- a/modules/banner.py +++ b/modules/banner.py @@ -43,7 +43,7 @@ class MultiIdentify(Module): pool = Pool(processes_num) rules = self.load_rules() _identify = Identify(rules) - for i in range(processes_num): + for _ in range(processes_num): pool.apply_async(func=_identify.run, args=(task_queue, done_queue)) pool.close() pool.join() @@ -116,7 +116,6 @@ class Identify(object): self.parse(item) banners = [] for name, rule in self.RULES.items(): - # print(name) r = self._check_rule(rule) if r: if 'implies' in rule: diff --git a/modules/iscdn.py b/modules/iscdn.py index 70ea532..10920ef 100644 --- a/modules/iscdn.py +++ b/modules/iscdn.py @@ -17,11 +17,6 @@ cdn_cname_keyword = utils.load_json(data_dir.joinpath('cdn_cname_keywords.json') cdn_header_key = utils.load_json(data_dir.joinpath('cdn_header_keys.json')) -def check_cname_count(cnames): - if len(cnames) > 1: - return True - - def check_cname_keyword(cname): names = cname.lower().split(',') for name in names: