From 7ce1594221384e2c5e94dcffbad86dd3872a8ee9 Mon Sep 17 00:00:00 2001 From: jorhelp <2373911050@qq.com> Date: Sat, 6 Aug 2022 20:36:12 +0800 Subject: [PATCH] fix the pr bugs --- scan/modules.py | 2 +- scan/scanner.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scan/modules.py b/scan/modules.py index ea6c8d3..f6341b7 100644 --- a/scan/modules.py +++ b/scan/modules.py @@ -33,7 +33,7 @@ def device_type(ip: str) -> list: f"http://{ip}", # dlink ] # these are need to be hashed - for url in url_list[:3]: + for url in url_list[:-1]: try: r = requests.get(url, timeout=TIMEOUT, verify=False) if r.status_code == 200: diff --git a/scan/scanner.py b/scan/scanner.py index f7ba087..d0978d0 100644 --- a/scan/scanner.py +++ b/scan/scanner.py @@ -166,7 +166,7 @@ def scan(self, ip_term: str): elif dev_type == 'dlink': if 'cve_2020_25078' in self.modules: found |= self.scan_meta(ip, 'cve_2020_25078') elif dev_type == 'uniview-nvr': - if 'uniview_disclosure' in self.modules: found != self.scan_meta(ip, 'uniview_disclosure') + if 'uniview_disclosure' in self.modules: found |= self.scan_meta(ip, 'uniview_disclosure') if not found and dev_type != 'unidentified': save_res([ip, dev_type], os.path.join(self.args.out_path, RESULTS_FAILED))