Skip to content

sachingoray/Python-port-scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Python Port Scanner

This is a simple port scanner made in Python.
You can enter an IPv4 address and a port range, and the program will scan and show which ports are open.


Features

  • Checks if the IP address format is correct
  • Checks if the port range format is correct
  • Scans all ports in the selected range
  • Shows all open ports
  • Shows how long the scan took
  • Easy to use and simple to read

How to Run

  1. Make sure Python 3 is installed.
  2. Save the file as port_scanner.py.
  3. Open your terminal.
  4. Run the program using:
python3 port_scanner.py

Enter the IP address.

Enter the port range (example: 1-1000).

Example::
#Please Enter your IP address that you want to scan: 192.168.1.10
#Perfect! Valid IP_address '192.168.1.10', Your IP is scanning :)

#Please Enter your port range that you want to scan i.e (int)-(int):: 1-100

Possible Output::
port 22 is open on 192.168.1.10
port 80 is open on 192.168.1.10

Scan Completed in 2.45 seconds


Why I Built This

I built this tool to learn more about networking and Python socket programming.
It helped me understand how ports work and how to scan them safely.

Author

Sachin Shrestha (2025)
GitHub: https://github.com/sachingoray/Python-port-scanner
LinkedIn: https://www.linkedin.com/in/sachin-shrestha-989756181/

About

Python port scanner that checks open TCP ports on a target host. Demonstrates basic networking concepts using sockets, useful for learning scanning techniques and understanding network service availability.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages