diff options
author | Epoch Qwert <epoch@53flpnlls43fcguy.onion> | 2014-11-23 14:25:42 -0600 |
---|---|---|
committer | Epoch Qwert <epoch@53flpnlls43fcguy.onion> | 2014-11-23 14:25:42 -0600 |
commit | 30300843e0c66ca3eefa97f5787f95b07c256d2f (patch) | |
tree | b29343b30092689786ffcac3913b683ff7555dbe /nocompile/libexec | |
parent | a23b5f921d551863dbcae494e58622164a1d3492 (diff) | |
download | misc-30300843e0c66ca3eefa97f5787f95b07c256d2f.tar.gz misc-30300843e0c66ca3eefa97f5787f95b07c256d2f.zip |
fixed gitignore. >_> added a bunch of new piddly shit.
Diffstat (limited to 'nocompile/libexec')
-rwxr-xr-x | nocompile/libexec/gopherd.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nocompile/libexec/gopherd.sh b/nocompile/libexec/gopherd.sh index e50b129..768d02b 100755 --- a/nocompile/libexec/gopherd.sh +++ b/nocompile/libexec/gopherd.sh @@ -1,5 +1,5 @@ #!/bin/bash -#I'm aware of the LFI. Have fun looking around my server. +#set these two variables if you have your server behind DMZ read -t 10 req base="$1" req=$(echo "$req" | tr -d '\r') @@ -10,7 +10,7 @@ if grep -v "^${base}" <<< "${realpath}" > /dev/null;then exit 1 fi myIP=$(/usr/local/bin/hop0 $(/usr/local/libexec/peerip)) -hostname=$(dig -x ${myIP} +short | rev | tail -c+2 | rev ) +hostname=$(dig -x ${myIP} +short | head -n1 | rev | tail -c+2 | rev ) if [ ! "${hostname}" ]; then hostname=${myIP} else |