vinitshahdeo/PortScanner

The low & high range of ports in scanner.py is hardcoded

开放

#1 创建于 2020年6月4日

 (6 条评论) (0 个反应) (0 位负责人)Python (122 个派生)auto 404
beginner friendlyfirst-timers-onlygood first issuehelp wantedup for grabs

仓库指标

星标
 (150 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Reading config.json and using range.low and range.high in scanner.py


The range for ports shouldn't be hardcoded. It should be ideally fetched from config.json as it's being used in server/index.js.

for port in range(1,8888):  
        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        result = sock.connect_ex((remoteServerIP, port))
        if result == 0:
            print "Port {}: 	 Open".format(port)
        sock.close()

贡献者指南