-
#!/bin/bash
-
-
empty=
-
last=
-
goodoranges=`cat ./goodoranges`
-
badoranges=`cat ./badoranges`
-
-
while [ 1 ]
-
do
-
-
for i in a b c d e f g h i j k l m n o p q r s t u v w x y z 1 2 3 4 5 6 7 8 9 0
-
do
-
-
last=empty
-
-
sleep `expr '(' $RANDOM '*' 1 / 32767 ')' + 1`
-
-
last=`wget -q --load-cookies ./cookies --save-cookies ./cookies --keep-session-cookies --header='User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3' --header='Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' --header='Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' --header='Accept-Encoding: gzip,deflate' --header='Accept-Language: ru,en-us;q=0.7,en;q=0.3' -O - http://www.cn.ru/userfoto/letter/$i/ | gunzip | grep '<a rel="nofollow" href="/orange/get/' | awk -F\" '{print $2}'`
-
-
if [ "$last" != "$empty" ]
-
then
-
checksum=`wget -q --load-cookies ./cookies --save-cookies ./cookies --keep-session-cookies --header='User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3' --header='Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' --header='Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' --header='Accept-Encoding: gzip,deflate' --header='Accept-Language: ru,en-us;q=0.7,en;q=0.3' -O - http://www.cn.ru${last/get/img} | md5sum | cut -d' ' -f1`
-
-
notfound=1
-
-
for bad in $badoranges
-
do
-
if [ "$bad" = "$checksum" ]
-
then
-
echo "Pwnorange at userfoto/letter/$i/"
-
notfound=0
-
break
-
fi
-
done
-
-
if [ "$notfound" = "1" ]
-
then
-
for good in $goodoranges
-
do
-
if [ "$good" = "$checksum" ]
-
then
-
echo "Fresh orange at userfoto/letter/$i"
-
wget -q --load-cookies ./cookies --save-cookies ./cookies --keep-session-cookies --header='User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3' --header='Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' --header='Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7' --header='Accept-Encoding: gzip,deflate' --header='Accept-Language: ru,en-us;q=0.7,en;q=0.3' -O /dev/null http://www.cn.ru$last
-
notfound=0
-
break
-
fi
-
done
-
fi
-
-
if [ "$notfound" = "1" ]
-
then
-
echo "Unknown type of picture"
-
echo "New checksum/=$checksum"
-
fi
-
-
fi
-
-
done
-
-
done