vinitshahdeo/PortScanner

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

オープン

#1 opened on 2020/06/04

 (6 件のコメント) (0 件のリアクション) (0 人の担当者)Python (122 件のフォーク)auto 404
beginner friendlyfirst-timers-onlygood first issuehelp wantedup for grabs

Repository metrics

Stars
 (150 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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()

コントリビューターガイド