Olivier MORIN - 2020-12-31

More traces...

#!/bin/bash
WGET=`which wget`
OUTPUT=/var/www/purge/purge.log
OPTION=--quiet
HOTE=?
USER=admin
PASSWORD=?
DAYS=30
date >> $OUTPUT
$WGET -O $OUTPUT.1 $OPTION  --proxy=off  --keep-session-cookies --save-cookies /tmp/cookies.txt --post-data "action=login&step=2&username=$USER&pwd=$PASSWORD" http://$HOTE/index.php
$WGET -O $OUTPUT.2 $OPTION --proxy=off --load-cookies /tmp/cookies.txt --post-data "action=adminmaintenance&step=2&c_older=1&older=$DAYS&login=admin&date=&size=&run=Continuer"  http://$HOTE>
# pour tester superssion des fichiers de l'utilisateur
#$WGET -O $OUTPUT.2 $OPTION --proxy=off --load-cookies /tmp/cookies.txt --post-data "action=adminmaintenance&step=2&older=&c_login=1&login=$USER&date=&size=&run=Continuer"  http://$HOTE/ind>
grep -Eo '[0-9]{10}' $OUTPUT.2 >> $OUTPUT
$WGET -O $OUTPUT.3 $OPTION  --proxy=off --load-cookies /tmp/cookies.txt --post-data "action=adminmaintenance&step=2&delete=Oui%2C+effacer+tout" http://$HOTE/index.php
$WGET -O $OUTPUT.4 $OPTION  --proxy=off --load-cookies /tmp/cookies.txt http://$HOTE/index.php?action=logout