Last active
July 7, 2023 03:28
-
-
Save directentis1/5dc79a9f8115d00daa518ffc0768ae2f to your computer and use it in GitHub Desktop.
the script to download latest version of nmap from its primarily website
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# Fetch the latest version number from the Nmap website | |
latest_version=$(curl -s https://nmap.org/dist/ | grep -oP 'nmap-\K([\d\.]+)' | head -n 1) | |
# Create a directory to store the downloaded RPMs | |
mkdir -p nmap_rpms | |
cd nmap_rpms | |
# Download the latest versions of Nmap, Nping, and Ncat | |
wget "https://nmap.org/dist/nmap-${latest_version}-1.x86_64.rpm" | |
wget "https://nmap.org/dist/nping-0.${latest_version}-1.x86_64.rpm" | |
wget "https://nmap.org/dist/ncat-${latest_version}-1.x86_64.rpm" | |
wget "https://nmap.org/dist/zenmap-${latest_version}-1.noarch.rpm" | |
# Return to the original directory | |
cd .. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment