Skip to content

Instantly share code, notes, and snippets.

@jonas8
Created September 6, 2015 09:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jonas8/e75c8f25a627dd45e048 to your computer and use it in GitHub Desktop.
Save jonas8/e75c8f25a627dd45e048 to your computer and use it in GitHub Desktop.
gfw domains
Output="./greatfire.txt"
if [ -f $Output ]
then
rm $Output
fi
Threshold=20
for i in 0 1 2 3 4 5 6 7 8 9
do
curl -s --insecure "https://zh.greatfire.org/search/alexa-top-1000-domains?page=$i"| \
grep 'class="blocked"' | \
sed -e "s#^[^\/]*\/\([^\"]*\)[^\%]*\%...\([^\%]*\)\%.*#\1 \2#g"|\
awk '$2>='"$Threshold"' {print $1 }'\
>>$Output
sleep 10
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment