mirror of
https://github.com/gfwlist/gfwlist.git
synced 2024-12-24 15:45:19 +00:00
New script: lookup.sh
This commit is contained in:
parent
12bccd6ee5
commit
b83a3c7efe
18
lookup.sh
Executable file
18
lookup.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ $# != 1 ]; then
|
||||
echo -e "Usage:\n $./lookup.sh wordpress\n $./lookup.sh ghs\n";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
while read line
|
||||
do
|
||||
|
||||
host=$( echo "$line" |
|
||||
grep -oE "[a-z0-9]([a-z0-9_\.\-]*[a-z0-9])?\.[a-z]{2,3}" |
|
||||
grep -vE "dot$|htm$|php$" );
|
||||
|
||||
[ "$host" ] && [ "$(nslookup $host | grep $1)" ] && echo $host;
|
||||
|
||||
done < "list.txt"
|
||||
|
Loading…
Reference in New Issue
Block a user