1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| #!/bin/sh
cle=/var/keys/SoftCam.Key
UPDURL=http://upload.unisatellite.free.fr/aes/linuxkeys.php
tmp=/var/keys/new
while [ 1 ]; do
nkey=$(wget -q -O - $UPDURL | cut -d : -f 5,6 | sed -e "1,3s/://")
new=`echo V 007C00 01 "$nkey"`
echo "new"
echo $new
comp2=`expr substr "$new" 1 44`
current=`grep -i $nkey $cle | tail -1`
echo "current"
comp=`expr substr "$current" 1 44`
echo $current
if [ "$comp2" = "$comp" ]
then
echo "clé existante"
else
echo $new date > $tmp
cat $cle >> $tmp
mv $tmp $cle
echo "clé ajoutée"
# wget http://192.168.1.4/cgi-bin/ResetCam
fi
sleep 60
echo "-----------------------------------"
echo " "
done |
Partager