Created
March 16, 2015 20:28
-
-
Save navinpai/7e11d2358848a590ed93 to your computer and use it in GitHub Desktop.
script to check how many of the top 100 sites are blocked by CyberRoam
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# To get the data | |
# curl -s -O http://s3.amazonaws.com/alexa-static/top-1m.csv.zip ; unzip -q -o top-1m.csv.zip top-1m.csv ; head -1000 top-1m.csv | cut -d, -f2 | cut -d/ -f1 > topsites.txt | |
# Process Data | |
cat topsites.txt | while read line | |
do | |
echo $line | |
count=$( wget -T 30 -qO- $line | grep -c "><font class=accessdeniedcategoryfont>") | |
if [ "$count" != "0" ] | |
then | |
echo "^BLOCKED" | |
echo $line >> blocked.txt | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment