File: proxyresolv

package info (click to toggle)
proxychains 3.1-6
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,668 kB
  • ctags: 253
  • sloc: sh: 10,464; ansic: 1,012; makefile: 35
file content (16 lines) | stat: -rwxr-xr-x 338 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# This script is called by proxychains to resolve DNS names

# DNS server used to resolve names
DNS_SERVER=${PROXYRESOLV_DNS:-4.2.2.2}


if [ $# = 0 ] ; then
	echo "	usage:"
	echo "		proxyresolv <hostname> "
	exit
fi


export LD_PRELOAD=libproxychains.so.3
dig $1 @$DNS_SERVER +tcp | awk '/A.+[0-9]+\.[0-9]+\.[0-9]/{print $5;}'