Skip to content

AfifaNaser/python-port-scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TCP SYN Port Scanner

A TCP SYN port scanner built with Python and Scapy. The tool scans common TCP ports on a target host and checks whether the target responds to DNS queries.

Demo

TCP SYN Port Scanner Demo

Features

  • Performs TCP SYN scans on common ports
  • Detects common network services (HTTP, HTTPS, DNS, SMTP, SMB)
  • Detects whether the target is running a DNS service
  • Displays open ports in a clean, readable format
  • Accepts a user-provided target IP address

Technologies Used

  • Python 3
  • Scapy
  • Npcap (Windows)

Learning Objectives

This project was developed to strengthen practical cybersecurity and networking skills, including:

  • Packet crafting with Scapy
  • TCP SYN scanning
  • DNS queries over UDP
  • Understanding common network services and ports
  • Writing modular Python applications

Installation

  1. Clone this repository:
git clone https://github.com/AfifaNaser/python-port-scanner.git
  1. Navigate to the project folder:
cd python-port-scanner
  1. Install the required dependency:
pip install -r requirements.txt

Note: On Windows, Scapy requires Npcap to be installed.

Usage

Run the scanner:

python port_scanner.py

When prompted, enter the target IP address.

Example:

Enter target IP address: 127.0.0.1

Example Output

========================================
Scanning Target: 127.0.0.1
========================================

Detected Open Ports:

80    HTTP
443   HTTPS

No DNS response received.

Scan completed successfully.

Project Structure

python-port-scanner/
│
├── port_scanner.py      # Main application
├── requirements.txt     # Project dependencies
├── README.md            # Project documentation
├── .gitignore           # Git ignored files
└── LICENSE              # MIT License

Disclaimer

This project was created for educational and learning purposes only.

Only use this tool on systems and networks that you own or have explicit permission to test.

The author is not responsible for any misuse of this software.

Author

Afifa Nasser

About

A TCP SYN Port Scanner built with Python and Scapy.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages