OP 01 October, 2024 - 07:40 PM
(This post was last modified: 01 October, 2024 - 07:46 PM by fireworks. Edited 2 times in total.)
Running the Script:
Save the script as port_scanner.py and run it from the command line:
For example, to scan a host 192.168.1.1 for open ports between 1 and 1000, use:
Key Points:
Target: The IP or hostname of the machine you are scanning.
Ports: You can define a port range, e.g., from port 1 to 65535 (default if no range is specified).
Dependencies:
This script uses only the built-in Python libraries (socket, argparse, and datetime), so there are no external dependencies.
edit:
The above quote has been enhanced with three other features:
multi-threading
logging and
banner grabbing capabilities
Running the Script:
Save the script as enhanced_port_scanner.py and run it from the command line:
For example, to scan ports from 1 to 1000 on the target 192.168.1.1 with 20 threads, use:
Dependencies:
No external dependencies are required. This script only uses Python’s built-in libraries (socket, argparse, threading, and queue).
leaving a like is much appreciated and help me to keep publishing threads.