Guest User

Nathan

a guest
Mar 8th, 2011
1,098
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.13 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. page=$1
  4. notfound=0
  5. while true
  6. do
  7.         content=$( curl --silent --cookie i_need_it=fapfap http://apina.biz/$page )
  8.         if echo $content | grep anon > /dev/null 2>&1
  9.         then
  10.                 echo $page - $(date) - anon
  11.                 page=$(($page + 1))
  12.         elif echo $content | grep 'Entry not found' > /dev/null 2>&1
  13.         then
  14.                 echo $page - $(date) - not found
  15.                 notfound=$(($notfound + 1))
  16.                 sleep 30
  17.         else
  18.                 curl --silent --cookie i_need_it=fapfap --form comment="My name is Nathan and I always win" http://apina.biz/$page
  19.                 echo $page - $(date) - first | tee -a apina_log
  20.                 page=$(($page + 1))
  21.         fi
  22.         if [ "$notfound" -eq "10" ]
  23.         then
  24.                 page=$(($page + 1))
  25.                 notfound=0
  26.                 if curl --silent --cookie i_need_it=fapfap http://apina.biz/$page | grep 'Entry not found' > /dev/null 2>&1
  27.                 then
  28.                         echo $page - $(date) - "not found!"
  29.                         page=$(($page - 1))
  30.                 fi
  31.         fi
  32. done
Advertisement
Add Comment
Please, Sign In to add comment