This Python script provides a simple menu-driven interface for common Nmap (Network Mapper) functionalities on Linux. It allows users to easily execute various network scanning tasks without needing to remember specific Nmap command-line options.
The script offers the following Nmap options through a numbered menu:
- Network Discovery: Performs a basic ping scan to identify live hosts on a network.
- Port Scan: Scans specified target(s) for open ports using the SYN scan technique.
- OS Detection: Attempts to determine the operating system of the target host(s).
- Service Version Detection: Identifies the versions of services running on open ports.
- Aggressive Scan: Combines OS detection, version detection, script scanning, and traceroute for a comprehensive scan.
- Firewall Evasion (Decoy Scan): Attempts to evade firewalls by using decoy IP addresses in the scan.
- Traceroute: Displays the path taken by packets to reach the target host(s).
- Vulnerability Scan: Utilizes Nmap's scripting engine (NSE) to scan for known vulnerabilities.
- Help: Displays a brief description of each menu option.
- Exit: Closes the program.
- Linux Operating System: This script is designed to run on Linux as it directly calls the
nmapcommand. - Nmap Installed: The
nmaputility must be installed on your system. You can typically install it using your distribution's package manager (e.g.,sudo apt-get install nmapon Debian/Ubuntu,sudo yum install nmapon CentOS/RHEL,sudo pacman -S nmapon Arch Linux). - Python 3: This script is written in Python 3.
-
Download the script: You can download the
nmap-menu.pyfile from your GitHub repository.git clone (https://github.com/TheHackersWorkshop/nmap)
-
Make it executable (optional but recommended):
chmod +x nmap-menu.py
-
Open a terminal: Navigate to the directory where you saved the
nmap-menu.pyfile. -
Run the script:
python3 main.py
-
Follow the menu: The script will display the main menu with numbered options. Enter the number corresponding to the Nmap scan you want to perform and press Enter.
-
Provide target information: The script will prompt you to enter the target IP address(es) or network range as required for the selected scan.
-
View the results: The output of the Nmap command will be displayed in your terminal.
-
Return to the menu: After the scan is complete, you will be presented with the main menu again to perform another scan or exit.
This script is intended for educational and ethical network security testing purposes only. Using Nmap to scan networks or hosts without proper authorization is illegal and unethical. The author is not responsible for any misuse of this script. Always ensure you have explicit permission before scanning any network or system.
Contributions to this project are welcome. If you have suggestions for improvements, bug fixes, or new features, please feel free to submit a pull request.