[codesyntax lang=”bash”]
#!/bin/bash # By Ed Wiget # This script grabs the latest nmap, zenmap, ncat, nping in rpm format and converts them to deb # 20121031 - original script # the version we are grabbing VER=6.01-1 # the architecture we are using ARCH=x86_64 # our working dir TEMP_DIR=~/nmap-files # check if it exists and if not, create it if [ ! -d ${TEMP_DIR} ]; then mkdir -p ${TEMP_DIR} fi # check to make sure alien is installed and if not, install it if [ ! -f /usr/bin/alien ]; then sudo apt-get install alien fi # cd to the working dir cd ${TEMP_DIR} # 386 files # http://nmap.org/dist/nmap-6.01-1.i386.rpm # http://nmap.org/dist/zenmap-6.01-1.noarch.rpm # http://nmap.org/dist/ncat-6.01-1.i386.rpm # http://nmap.org/dist/nping-0.6.01-1.i386.rpm # x86_64 files # http://nmap.org/dist/nmap-6.01-1.x86_64.rpm # http://nmap.org/dist/ncat-6.01-1.x86_64.rpm # http://nmap.org/dist/nping-0.6.01-1.x86_64.rpm # no arch # http://nmap.org/dist/zenmap-6.01-1.noarch.rpm # grab the files wget -O ${TEMP_DIR}/nmap-${VER}.${ARCH}.rpm http://nmap.org/dist/nmap-${VER}.${ARCH}.rpm wget -O ${TEMP_DIR}/ncat-${VER}.${ARCH}.rpm http://nmap.org/dist/ncat-${VER}.${ARCH}.rpm wget -O ${TEMP_DIR}/nping-0.${VER}.${ARCH}.rpm http://nmap.org/dist/nping-0.${VER}.${ARCH}.rpm wget -O ${TEMP_DIR}/zenmap-${VER}.noarch.rpm http://nmap.org/dist/zenmap-${VER}.noarch.rpm # remove any deb files currently in this dir rm -f *.deb # convert the downloaded files to deb sudo alien nmap-${VER}.${ARCH}.rpm sudo alien ncat-${VER}.${ARCH}.rpm sudo alien nping-0.${VER}.${ARCH}.rpm sudo alien zenmap-${VER}.noarch.rpm # install the packages sudo dpkg --install *.deb
[/codesyntax]
Leave a Reply
You must be logged in to post a comment.