summaryrefslogtreecommitdiff
path: root/getsrv
diff options
context:
space:
mode:
authorepoch <epoch@hack.thebackupbox.net>2020-04-16 00:06:57 +0000
committerepoch <epoch@hack.thebackupbox.net>2020-04-16 00:06:57 +0000
commit245e54a0bdb845e336cc5d62b93ec8a1d4330695 (patch)
treec99970eba90c7b709c191ed6aa60652121d28356 /getsrv
parent61c209d35a47d126d0871bf03223eb1e8f7d8806 (diff)
downloaduritools-245e54a0bdb845e336cc5d62b93ec8a1d4330695.tar.gz
uritools-245e54a0bdb845e336cc5d62b93ec8a1d4330695.zip
made getsrv use host instead of dig by default.
Diffstat (limited to 'getsrv')
-rwxr-xr-xgetsrv8
1 files changed, 4 insertions, 4 deletions
diff --git a/getsrv b/getsrv
index 62f4f5c..58fb03b 100755
--- a/getsrv
+++ b/getsrv
@@ -12,12 +12,12 @@ if [ "_$*" != "_" ];then
else
filter=cat
fi
-if which dig >/dev/null;then
- dig +short -t SRV "$record"
- #echo "after dig" >&2
-elif which host >/dev/null;then
+if which host >/dev/null;then
host -t SRV "$record" | cut '-d ' -f5-
#echo "after host" >&2
+elif which dig >/dev/null;then
+ dig +short -t SRV "$record"
+ #echo "after dig" >&2
else
echo "how am I supposed to get a srv record without dig or host? giving up." >&2
exit 1