vinitshahdeo / PortScanner

A go-to tool for scanning network. Scan all the open ports for a given host with just one click.
https://vinitshahdeo.github.io/PortScanner/
MIT License
125 stars 114 forks source link

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

Open vinitshahdeo opened 4 years ago

vinitshahdeo commented 4 years ago

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()
TaniaMalhotra commented 4 years ago

Hii I have opened a PR for the same

vinitshahdeo commented 4 years ago

Thanks @TaniaMalhotra, will have a look into this. 👍

tinovasq commented 4 years ago

Hello! I noticed that someone already solved this issue, but I wanted to go ahead and throw in my own since I didn't see the PR until I was finished with it. I also updated the necessary syntax to work in py3.8

vinitshahdeo commented 4 years ago

@tinovasq That's great. 👏 Will have look into this.

vinitshahdeo commented 4 years ago

@TaniaMalhotra Check Water Monitoring System. See if you can find something interesting there.

subhangi2731 commented 3 years ago

can you please assign it to me?