Skip to content

arshshukla99/Port_Scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 

Repository files navigation

Python TCP Port Scanner

A Simple Multithreaded Port Scanner built using Socket.

It was made to understand :

  • TCP Connections.
  • Network Scanning.
  • Open and Closed ports.
  • Services on each ports.
  • Socket Programming.
  • Multithreading in Python.
  • Service Detection.
  • Banner Grabbing.
  • Error Management
  • Working with json Files.

Features Include :

  • Scan Real Time custom port ranges.
  • Can Scan all the 65535 Ports.
  • Proper Error Handling Included.
  • Multithread support that provide fast results.
  • Service Detection for all the 65535 ports.
  • Banner Grabbing for Open Ports.
  • JSON Export of the Open Ports

Technologies Used :

  • Python 3.14.2
  • Socket Module
  • Threading Module
  • Sys Module
  • Argparse Module
  • Colorama Module
  • JSON Module

How it Works :

It First takes several inputs from the user like - IP Address & Range of ports i.e. Starting Port and Ending Port. Note - Supports Provide IPv4 address only.

Then it Attempts to connect on each port which is in the range of Start Port to End Port on the provided IP address.

  • If Connection Succeeds -> Port {Number} is OPEN :
  • If Connection Failed -> Port is CLOSED

How to Use :

Step 1 : Clone the Repository

$ git clone https://github.com/arshshukla99/Port_Scanner

Step 2 : Navigate to the Project Folder

$ cd port_scanner.py

Step 3 : Run the Script 'port_scanner.py'

$ python3 port_scanner.py -t 192.168.43.169 -s 1 -e 1000

Example Output

$ python3 port_scanner.py -t 192.168.43.169 -s 1 -e 1000
----------------------------------------------------------------------------------------------------
                                    Simple Port Scanner
----------------------------------------------------------------------------------------------------
Port 139 is OPEN : netbios-ssn
Port 135 is OPEN : epmap
Port 445 is OPEN : microsoft-ds
Port 623 is OPEN : asf-rmcp

Scan Performed in : 2.6426780223846436

Example Screenshot

image

Releases

No releases published

Packages

 
 
 

Contributors

Languages