Ah, I thought you wanted to compile a list of blocked websites on airtel.
Do you already own a x86 based router? (I can't remember)
PFSENSE now
It takes quite some time for pfblockerng to lookuo 4k sites.
Ah, I thought you wanted to compile a list of blocked websites on airtel.
Do you already own a x86 based router? (I can't remember)
#!/bin/bash
BL="0"
sed -i '/^$/d' sitelist.txt
sed -i 's/ .*$//' sitelist.txt
sed -i 's/ //g' sitelist.txt
LINE=$(wc -l < sitelist.txt)
for (( i = 1; i <= $LINE; ++i ))
do
SITE=$(sed "${i}q;d" sitelist.txt)
curl -L -m 3 $SITE -o tmpfile.txt
EXIT="$?"
grep "airtel.in/dot/" -q tmpfile.txt
EXIT1="$?"
echo
echo
echo
if [[ "$EXIT1" == "0" ]]; then
BL=$((BL + 1))
cat << _site_ >> blocked.txt
$SITE
_site_
echo "$SITE seems to be blocked"
elif [[ "$EXIT" =~ ^(5|6|7|28|35|47|52)$ ]]; then
curl -L -m 2 $SITE
EXIT="$?"
if [[ "$EXIT" =~ ^(5|6|7|28|35|47|52)$ ]]; then
BL=$((BL + 1))
cat << _site_ >> blocked.txt
$SITE
_site_
echo "$SITE seems to be blocked"
fi
else
cat << _sitefree_ >> not-blocked.txt
$SITE
_sitefree_
fi
done
echo
echo
rm tmpfile.txt
echo "$BL out of $LINE Websites found blocked, Please open blocked.txt and not-blocked.txt for respective lists"
nano blocktest.sh
chmod +x blocktest.sh
./blocktest
So, that means the rest 3958 sites were blocked right?Out of which 342 were not blocked
Yeah I would love to execute the same operation and observe the results wrt my ISP. But unfortunately, I don't have a Raspberry Pi kit which leads to the only way to do this is by checking every individual site manually.if you want to run this program, just use any Debian based distribution