blob: 590a104e91433e08950f16d52cf2534f6eccea8b (
plain) (
tree)
|
|
#!/bin/bash
set -ex
n=`rev <<<$0 | cut -d/ -f1 | rev`
s=10
[ x$2 != x ] && s=$2
while :
do
t=`mktemp -p "" $n.XXX`
curl --cookie "$3" $1 | grep -v __RequestVerificationToken > $t
f=`sha256sum $t | cut -d\ -f1`
[ -f $f ] && rm $t || ( mv $t $f && eval "$4" )
sleep $s
done
|