modified: pixi.toml
[GalaxyCodeBases.git] / etc / agfw / autoproxy-gfwlist / lookup.sh
blob9a3d41b34585a810d4fbec7b5ed11d884215a450
1 #!/bin/bash
3 if [ $# != 1 ]; then
4 echo -e "\
5 Usage:
6 $./lookup.sh wordpress
7 $./lookup.sh ghs.l.google
8 $./lookup.sh 72.14.203.121 // ghs
9 $./lookup.sh 67.207.139.81 // Posterous
10 $./lookup.sh 72.32.231.8 // Tumblr
11 $./lookup.sh typepad
13 exit 1;
16 while read line
19 host=$( echo "$line" |
20 grep -oE "[a-z0-9]([a-z0-9_\.\-]*[a-z0-9])?\.[a-z]{2,4}" |
21 grep -vE "(aspx?|dotn|exe|fan|html?|php|zh)$"
24 [ "$host" ] && [ "$(nslookup $host | grep -i $1)" ] && echo $host;
26 done < "list.txt"