bonus.centrum.cz credit earner, requires "~/priv/centrum.pwd"
authorshort <>
Tue, 10 Jul 2001 18:31:50 +0000 (18:31 +0000)
committershort <>
Tue, 10 Jul 2001 18:31:50 +0000 (18:31 +0000)
bin/centrum.sh [new file with mode: 0755]

diff --git a/bin/centrum.sh b/bin/centrum.sh
new file mode 100755 (executable)
index 0000000..80ce2ac
--- /dev/null
@@ -0,0 +1,30 @@
+#! /bin/sh
+#max of max is 999!
+max=310
+umask 077
+exec &>~/priv/centrum.log
+cd ~
+rm -rf ~/centrum
+mkdir ~/centrum
+cd ~/centrum
+i=1
+last=
+while [ $i -le $max ];do
+  j="`echo -n 000$i|tail -c 3`"
+  echo -n "$j: `date` - "
+  lynx -auth short:`cat ~/priv/centrum.pwd` -reload -source 'http://hazard.centrum.cz/~short~eb3c8f5deb72db253053b59290c804d9/hry/bandita_code.phtml' >$j.html
+  date
+  now="`sed -n 's/^.*Kredity.*VALUE="\([0-9]*\)".*$/\1/p' <$j.html`"
+  if [ "$now" = "$last" ];then break;fi
+  last="$now"
+  sleep 17
+  i=$[$i+1]
+  done
+echo -n "Termination: "
+if [ $i -gt $max ];then echo "max $max credits exceeded."
+else echo "Count "$last" matched on file $j.html."
+fi
+echo "Current credits: $last"
+tar cf - *|bzip2 -v >~/priv/centrum.tar.bz2
+cd ~
+rm -rf ~/centrum