1
0
mirror of https://github.com/rofl0r/proxychains-ng synced 2026-05-18 11:49:52 +08:00

add support for "proxy_dns_old" to use old 3.1 DNS lookup method

some lamer on IRC by the name of annoner/R3M0RS3/penis was complaining
that 3.1 is a lot better than proxychains-ng, because it happens to
work with the browser he's interested in.
since this wasn't the first time this is requested, let's give this
those lamers what they want: lame code!
This commit is contained in:
rofl0r
2020-09-20 22:11:17 +01:00
Unverified
parent 3e791fd797
commit 2ab631918d
5 changed files with 115 additions and 13 deletions
+11 -6
View File
@@ -1,10 +1,8 @@
#!/bin/sh
# This is a legacy script that uses "dig" to do DNS lookups via TCP.
# it is not actively maintained since proxychains no longer depends
# on it. i leave it here as a bonus.
# This is a legacy script that uses "dig" or "drill" to do DNS lookups via TCP.
# DNS server used to resolve names
DNS_SERVER=8.8.8.8
test -z "$DNS_SERVER" && DNS_SERVER=8.8.8.8
if [ $# = 0 ] ; then
@@ -14,5 +12,12 @@ if [ $# = 0 ] ; then
fi
export LD_PRELOAD=libproxychains4.so
dig $1 @$DNS_SERVER +tcp | awk '/A.?[0-9]+\.[0-9]+\.[0-9]/{print $5;}'
test -z $LD_PRELOAD && export LD_PRELOAD=libproxychains4.so
if type dig 1>/dev/null 2>&1 ; then
dig $1 @$DNS_SERVER +tcp | awk '/A.?[0-9]+\.[0-9]+\.[0-9]/{print $5;}'
elif type drill 1>/dev/null 2>&1 ; then
drill -t4 $1 @$DNS_SERVER | awk '/A.+[0-9]+\.[0-9]+\.[0-9]/{print $5;}'
else
echo "error: neither dig nor drill found" >&2
fi