2 # This is a legacy script that uses "dig" or "drill" to do DNS lookups via TCP.
4 # DNS server used to resolve names
5 test -z "$DNS_SERVER" && DNS_SERVER
=8.8.8.8
10 echo " proxyresolv <hostname> "
15 test -z $LD_PRELOAD && export LD_PRELOAD
=libproxychains4.so
17 if type dig 1>/dev
/null
2>&1 ; then
18 dig $1 @
$DNS_SERVER +tcp |
awk '/A.?[0-9]+\.[0-9]+\.[0-9]/{print $5;}'
19 elif type drill
1>/dev
/null
2>&1 ; then
20 drill
-t4 $1 @
$DNS_SERVER |
awk '/A.+[0-9]+\.[0-9]+\.[0-9]/{print $5;}'
22 echo "error: neither dig nor drill found" >&2