На странице: 24 48 96

Большая Тёрка / Мысли /

OrangesX


Atrinax

OrangeBot for Bash

Oranges, advertising

  1. #!/bin/bash
  2. empty=
  3. last=
  4. goodoranges=`cat ./goodoranges`
  5. badoranges=`cat ./badoranges`
  6. while [ 1 ]
  7. do
  8. 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
  9. do
  10. last=empty
  11. sleep `expr '(' $RANDOM '*' 1 / 32767 ')' + 1`
  12. 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}'`
  13. if [ "$last" != "$empty" ]
  14. then
  15. 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`
  16. notfound=1
  17. for bad in $badoranges
  18. do
  19. if [ "$bad" = "$checksum" ]
  20. then
  21. echo "Pwnorange at userfoto/letter/$i/"
  22. notfound=0
  23. break
  24. fi
  25. done
  26. if [ "$notfound" = "1" ]
  27. then
  28. for good in $goodoranges
  29. do
  30. if [ "$good" = "$checksum" ]
  31. then
  32. echo "Fresh orange at userfoto/letter/$i"
  33. 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
  34. notfound=0
  35. break
  36. fi
  37. done
  38. fi
  39. if [ "$notfound" = "1" ]
  40. then
  41. echo "Unknown type of picture"
  42. echo "New checksum/=$checksum"
  43. fi
  44. fi
  45. done
  46. done

Все равно забанили :)

Такие дела.

14 комментариев