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 合併指標
 (30 天內沒有已合併 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()

貢獻者指南