question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
vinitshahdeocommented, Jun 8, 2020

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

0reactions
subhangi2731commented, Mar 9, 2021

can you please assign it to me?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python port scanner marks every port as closed when using ...
I have tried to omit the for loop and the range function, using the port number explicitly and it works, but for some...
Read more >
Snort 3 Inspector Reference - Port Scan Inspector [Cisco ...
a high number of ports that are scanned only once. a single (or a low number of) scanned hosts. The distributed portscan detects...
Read more >
Port Scanner using Python - GeeksforGeeks
Port Scanner is built on Python 3 and uses some extra libraries such as socket and pyfiglet (for a fancy banner).
Read more >
Writing a Basic Port Scanner in Python
For this paper we will be building a basic port scanner in python, add multi-threading techniques and set up a basic command line...
Read more >
Project 5 - Port Scanner | Pacific Cybersecurity
In this course project, you will develop a Python script that performs TCP and UDP port scanning. Description. A port scanner program identifies...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found