From 027a7a32641451d87be0b4d46c49e286c8cf89ea Mon Sep 17 00:00:00 2001 From: wps2015 <1546118682@qq.com> Date: Thu, 28 Jul 2016 16:51:22 +0800 Subject: [PATCH] correct a bug --- LNScan.py | 15 +++++++++------ README.md | 7 ++++--- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/LNScan.py b/LNScan.py index 63d2be6..d2bcbe2 100644 --- a/LNScan.py +++ b/LNScan.py @@ -79,13 +79,16 @@ def http_scan(self, url): title = res_h1.group(1).strip() else: title = "Null" - if res_charset: - coding = res_charset.group(1).strip().lower() - self.ip_result[url]['title'] = title.encode(coding) - else: - self.ip_result[url]['title'] = title.encode('utf-8', 'ignore') + try: + if res_charset: + coding = res_charset.group(1).strip().lower() + self.ip_result[url]['title'] = title.encode(coding) + else: + self.ip_result[url]['title'] = title.encode('utf-8', 'ignore') + except Exception, e: + self.ip_result[url]['title'] = url except Exception, e: - self.ip_result[url]['title'] = url + self.ip_result[url]['title'] = '' def port_scan(self, url, _ports): http_port = [80, 81, 8080, 8081, 8090] diff --git a/README.md b/README.md index 42fde26..081b4d9 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,10 @@ LNScan(Local Network Scanner),作为一个内部网络扫描器,仅是为了 #### Features -* 支持给定ip段或者域名/ip导入 -* 抓取title、并检测常见端口,如80, 8080, 6379, 27017等 -* 支持多http端口的BBScan扫描 +- 快速高效,多进程 + 多线程结合 +- 支持指定ip段,或者文件导入(ip/域名) +- 敏感文件扫描支持多web端口 +- 扫描结束后生成格式鲜明的html报告,方便查看 #### Usage