Skip to content

Instantly share code, notes, and snippets.

@liilac
Created May 3, 2020 03:57
Show Gist options
  • Select an option

  • Save liilac/50331e10406e64a7f95c26f2ab2b96ac to your computer and use it in GitHub Desktop.

Select an option

Save liilac/50331e10406e64a7f95c26f2ab2b96ac to your computer and use it in GitHub Desktop.
#!/bin/sh
STATIC_NMAP_URL="https://github.com/andrew-d/static-binaries/raw/master/binaries/linux/x86_64/nmap"
BINDIR=$HOME/.local/bin
NMAP_OUT=$BINDIR/nmap
if [[ ! -d $BINDIR ]] ;
then
mkdir -p $BINDIR
fi
wget -O "$NMAP_OUT" "$STATIC_NMAP_URL" || curl -o "$NMAP_OUT" "$STATIC_NMAP_URL"
if [[ -f "$NMAP_OUT" ]] ;
then
echo "Looks like nmap was installed to your home directory!"
echo $NMAP_OUT
$NMAP_OUT --version || echo "There may have been a problem actually..."
else
echo "Hrm, does not look like that worked :("
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment