Created
May 3, 2020 03:57
-
-
Save liilac/50331e10406e64a7f95c26f2ab2b96ac to your computer and use it in GitHub Desktop.
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
| #!/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