
Python scanner that checks hosts for the OpenSSH regreSSHion vulnerability (CVE-2024-6387)
This script scans a list of target IP addresses or ranges to determine if they are running vulnerable To CVE-2024-6387.
argparse module for command-line argument parsing.ipaddress module for handling IP addresses and CIDR notation.usage: openssh_checker.py [-h] [--port PORT] [-t TIMEOUT] [-l LIST] targets [targets ...]
Check if servers are running a vulnerable version of OpenSSH.
positional arguments:
targets IP addresses, domain names, file paths containing IP addresses, or CIDR network ranges.
optional arguments:
-h, --help show this help message and exit
--port PORT Port number to check (default: 22).
-t TIMEOUT, --timeout TIMEOUT
Connection timeout in seconds (default: 1 second).
-l LIST, --list LIST File containing a list of IP addresses to check.
Check a single IP address:
python3 openssh_checker.py 192.168.1.1
Check multiple IP addresses from a file:
python3 openssh_checker.py -l ip_list.txt
Check a CIDR range:
python3 openssh_checker.py 192.168.1.0/24
The script outputs detailed information about each target: