Skip to content

Commit

Permalink
correct a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sowish committed Jul 28, 2016
1 parent 82a4eef commit 027a7a3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
15 changes: 9 additions & 6 deletions LNScan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ LNScan(Local Network Scanner),作为一个内部网络扫描器,仅是为了


#### Features
* 支持给定ip段或者域名/ip导入
* 抓取title、并检测常见端口,如80, 8080, 6379, 27017等
* 支持多http端口的BBScan扫描
- 快速高效,多进程 + 多线程结合
- 支持指定ip段,或者文件导入(ip/域名)
- 敏感文件扫描支持多web端口
- 扫描结束后生成格式鲜明的html报告,方便查看

#### Usage

Expand Down

0 comments on commit 027a7a3

Please sign in to comment.