A Basic port scanner to use on Linux.
- Basic Port Scanning: Scans specified ports on a given IP address.
- Scan Types: Supports SYN ACK, UDP, and Comprehensive scan types.
- Nmap Integration: Leverages the
nmaplibrary for port scanning capabilities. - Simple Automation: Provides a command-line interface for easy automation.
- Python 3.x: Ensure Python 3 is installed on your Linux system.
- Nmap: Requires Nmap to be installed.
sudo apt update sudo apt install nmap
- Python Nmap Library: Install the
python-nmaplibrary.pip install python-nmap
-
Clone the Repository:
git clone https://github.com/Paddywelch117/PortScanner.git cd PortScanner -
Install Dependencies:
pip install python-nmap
-
Execute the Script:
python Scanner.py
-
Follow the Prompts:
- Enter the IP address to scan.
- Select the type of scan to perform (SYN ACK, UDP, or Comprehensive).
import nmap
scanner = nmap.PortScanner()
ip_addr = "127.0.0.1" # Replace with desired IP address
scan_type = 1 # 1: SYN ACK, 2: UDP, 3: Comprehensive
if scan_type == 1:
scanner.scan(ip_addr, arguments="-sS") # SYN ACK Scan
elif scan_type == 2:
scanner.scan(ip_addr, arguments="-sU") # UDP Scan
elif scan_type == 3:
scanner.scan(ip_addr, arguments="-sS -sV -sC -A -O") # Comprehensive Scan
print(scanner.scaninfo())
print(scanner[ip_addr].tcp().keys())No specific configuration file is required. You can modify the Scanner.py script directly to customize scan arguments or add more scan types.
Contributions are welcome! Please follow these guidelines:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes.
- Submit a pull request with a clear description of your changes.
No license specified. All rights reserved.
- Nmap - The powerful port scanner used by this script.
- python-nmap - Python library for interacting with Nmap.