1
0
src/dotfiles-old/misc/nmap.sh
Deven Blake e4d0be0ec2 misc
2021-06-18 07:44:46 -04:00

31 lines
781 B
Bash

#!/bin/sh
# builds and installs nmap 7.80 because the fucking pieces of shit that
# maintain nmap decided to make 7.90+ NONFREE.
# i do like nmap and i have nothing personal against the actual maintainers.
# but come ON.
# anyway...
set -e
FILENAME="nmap-7.80.tar.bz2"
ORIGINAL_DIST_BZ2="https://nmap.org/dist/nmap-7.80.tar.bz2"
ARCHIVED_DIST_BZ2="http://web.archive.org/web/20200922062002/https://nmap.org/dist/nmap-7.80.tar.bz2"
cd $HOME/src
curl "$ORIGINAL_DIST_BZ2" >"$FILENAME" || curl "$ARCHIVED_DIST_BZ2" >"$FILENAME"
bzip2 -cd <"$FILENAME" | tar -x
# see, i could do complicated math to determine this based on the filename, or
# i could hard-code this and let it error if i've inexplicably grabbed
# nmap-7.8.1
cd "nmap-7.8.0"
./configure
make
sudo make install