Port-Hunter
A powerful and fast multithreaded TCP/UDP port scanner with service detection.
Description :
Port-Hunter is a Python-based port scanner designed for efficient network reconnaissance. It supports scanning both TCP and UDP ports across multiple target IPs or hostnames, with the ability to detect common services running on open ports. Its multithreaded architecture ensures quick scanning times, making it a valuable tool for network administrators, security professionals, and anyone interested in understanding their network's open ports. Features
- Multithreaded Scanning: Utilizes multiple threads for faster scanning of multiple targets and ports.
- TCP and UDP Support: Scan both TCP and UDP protocols, or scan both simultaneously.
- Target Flexibility: Scan individual IPs, hostnames, or a comma-separated list of multiple targets.
- Port Range Scanning: Specify a single port or a range of ports to scan.
- Service Detection: Attempts to identify services running on open ports.
- Optional Output File: Save scan results to a specified file for later analysis.
- Verbose Logging: Enable detailed logging for debugging and deeper insights into the scanning process.
Usage :
-
To use real_portscanner.py, you need to provide at least the target(s) and port(s) to scan.
-
Bash
python real_portscanner.py -t TARGETS -p PORTS [OPTIONS]
Arguments :
-t, --targets TARGETS (Required)
Comma-separated list of target IPs or hostnames.
Example: 192.168.1.1,example.com
-p, --ports PORTS (Required)
Port range to scan (e.g., 1-1024), or a single port (e.g., 80).
Options :
-h, --help
Show the help message and exit.
-P, --protocol {tcp,udp,all}
Protocol to scan: 'tcp', 'udp', or 'all'.
Default: tcp
-o, --output OUTPUT_FILE
Optional: File to save results to.
Example: scan_results.txt
-th, --threads NUM_THREADS
Number of threads to use for scanning.
Default: 100
-v, --verbose
Enable verbose logging (shows debug messages in the log file).
Examples :
-
Scan a single TCP port on a single target:
-
Bash
python real_portscanner.py -t 192.168.1.1 -p 80 -P tcp
-
Scan a range of TCP ports on a hostname:
-
Bash
python real_portscanner.py -t example.com -p 1-1024 -P tcp
-
Scan both TCP and UDP ports on multiple targets and save to a file:
-
Bash
python real_portscanner.py -t 192.168.1.1,anotherhost.local -p 20-1000 -P all -o full_scan.txt
-
Scan with a custom number of threads and verbose output:
-
Bash
python real_portscanner.py -t myrouter.net -p 1-500 -th 200 -v
Installation :
Clone the repository: - Bash
git clone https://github.com/TheWatchDog13/Port-Hunter
- cd real_portscanner
-
Run the script:
-
Bash
-
python real_portscanner.py -h
-
Contributing :
Contributions are welcome! If you have suggestions for improvements, bug fixes, or new features, please open an issue or submit a pull request.