Skip to content

Instantly share code, notes, and snippets.

@simonkuang
Forked from jonas8/gfwdomains.sh
Created October 28, 2015 01:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonkuang/b5faa4d26478a2d494c2 to your computer and use it in GitHub Desktop.
Save simonkuang/b5faa4d26478a2d494c2 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