Skip to content

Simple Python port scanner that checks a user-defined range of TCP ports on a host. Shows which ports are open ✅ or closed ❌ with a clean final summary.

Notifications You must be signed in to change notification settings

LaraPD/Port-Scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

🔍 Port Scanner

This script is used to scan a range of user-defined ports on a host. It reports which ports are open or closed. Its design is simple and readable.

🌍 Available languages | ESPAÑOL 🔁 ENGLISH

✨ Features

  • User inputs: host and port range.
  • Shows the result of each port (OPEN ✅ / CLOSED ❌).
  • Prints a final summary listing open ports.
  • Only performs TCP scanning (no UDP).
  • No services detected: only open or closed port.

📚 Requirements

  • Python 3.x
  • No extra packages required.

🎯 Usage

Clone the repository and run the script from the terminal:

python port_scanner.py

🐍 Go to the code

❗You will be prompted for target IP and a port range

✍️ Example

image

⏳ Tip (Only Windows)

If you want to compare the script results with the current network activity on your machine, run in the CMD terminal:

netstat -b

This lists active connections and the executables using them.

However, if you only need ports and states (no executables), you can use:

netstat -an

📌 Recommendations

  • Use small ranges to reduce scan time.
  • Be aware that firewalls or security tools may block or log your scans.
  • Increase/decrease the settimeout() value depending on network latency.
  • Maybe you need administrator/root privileges to scan lower ports (<1024).

⚠️ Only scan systems you own or have explicit permission to test. Unauthorized scanning may be ILLEGAL ⚠️

About

Simple Python port scanner that checks a user-defined range of TCP ports on a host. Shows which ports are open ✅ or closed ❌ with a clean final summary.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages