# # AutoPac_FR.sh # Author: Henry Hertz Hobbit # Version: 3.2.0 # 2012-03-24 23:27 UTC # # http://www.gnu.org/licenses/lgpl.txt # # Ce fichier de script qui fournit un moyen d'améliorer # automatiquement la PAC par l'intermédiaire de filtres # UnixUtils. Vous devez installer UnixUtils première though. # Voir le UtilsSetup.txt fichier dans le dossier # UnixUtilsInstallation_FR à le faire. L'alternative est # d'utiliser la version complète de CygWin. Pour les # utilisateurs de Windows qui est excessif. Ce script devra être # réécrite pour CygWin. # CURDIR=`pwd` cd ${SYSTEMDRIVE} cd / if [ -f /usr/local/wbin/sha1sum.exe ] then CHECKSUMPROG=sha1sum CHECKSUMDATA=sums.sha1 echo Utilisation des sommes de contrôle SHA1 else CHECKSUMPROG=md5sum CHECKSUMDATA=sums.md5 echo Utilisation des sommes de contrôle MD5 fi # Obsolète - hostsfile.org n'existe plus # Faire un peu de l'équilibrage de charge primitive pour laquelle nous # nous retirons d'accueil fichiers. La dernière clause d'autre, c'est # pour quand rien n'est encore là. # if [ -f /etc/LastUsedSMPAC.txt ] # then # rm -f /etc/LastUsedSMPAC.txt # touch /etc/LastUsedHFPAC.txt # DOWNLOADHOST=www.hostsfile.org # else # if [ -f /etc/LastUsedHFPAC.txt ] # then # rm -f /etc/LastUsedHFPAC.txt # touch /etc/LastUsedSMPAC.txt # DOWNLOADHOST=www.securemecca.com # else # touch /etc/LastUsedSMPAC.txt # DOWNLOADHOST=www.securemecca.com # fi # fi if [ -f /etc/LastUsedSMPAC.txt ] then rm -f /etc/LastUsedSMPAC.txt fi if [ -f /etc/LastUsedHFPAC.txt ] then rm -f /etc/LastUsedHFPAC.txt fi DOWNLOADHOST=www.securemecca.com DOUPDATE=1 if [ ! -d etc ] then mkdir etc DOUPDATE=0 fi if [ ! -d etc ] then echo echo LE MANQUE DE SCRIPT echo echo Appuyez sur Entrée pour quitter read TOLKEIN exit 1 fi # Si nous sommes à jour puis la sortie wget -q ${DOWNLOADHOST}/Downloads/pdate.txt if [ -f pdate.txt ] then if [ -f /etc/pdate.txt ] then if diff /etc/pdate.txt pdate.txt then rm -f pdate.txt echo "LE FILTRE PAC n'a pas changé" echo Appuyez sur Entrée pour quitter echo read TOLKEIN exit 0 fi fi cp -fp pdate.txt /etc/pdate.txt fi rm -f pdate.txt cd etc rm -fr AutoPac_FR.msw rm -f AutoPac_FR.msw.* # 2011-10 Microsoft Windows BUG if [ ! -d OneFile ] then mkdir OneFile fi if [ -f "${ProgramFiles}\7-Zip\7z.exe" ] && [ ! -f 7z.exe ] then cp -f "${ProgramFiles}\7-Zip\7z.exe" 7z.exe wget -q ${DOWNLOADHOST}/Downloads/AutoPac_FR.msw.7z ./7z.exe x AutoPac_FR.msw.7z rm -f 7z.exe else wget -q ${DOWNLOADHOST}/Downloads/AutoPac_FR.msw.zip unzip AutoPac_FR.msw.zip fi rm -f AutoPac_FR.msw.* if [ -d AutoPac_FR.msw ] then cd AutoPac_FR.msw # Si vous utilisez http://www.securemecca.com/public/UnixUtils/UnxUtils.zip # et ont sha1sum.exe alors il utilise cela. Sinon, il utilise l'ancienne # md5sum.exe. if ${CHECKSUMPROG} -c ${CHECKSUMDATA} then echo de contrôle sont bien ... l\'installation echo cd .. case ${DOUPDATE} in 1) touch SaveRules.txt rm -f oldproxy_fr.txt rm -f olddbgproxy_fr.txt if [ -f proxy_fr.txt ] then grep -U PERSONNELLE proxy_fr.txt >> SaveRules.txt mv proxy_fr.txt oldproxy_fr.txt fi if [ -f dbgproxy_fr.txt ] then grep -U PERSONNELLE dbgproxy_fr.txt >> SaveRules.txt mv dbgproxy_fr.txt olddbgproxy_fr.txt fi ;; *) ;; esac cp -p AutoPac_FR.msw/proxy_fr.txt proxy_fr.txt cp -p AutoPac_FR.msw/dbgproxy_fr.txt dbgproxy_fr.txt cp -p AutoPac_FR.msw/pornproxy_fr.txt pornproxy_fr.txt # 2011-10 Microsoft Windows BUG # if [ -d OldFile ] # then cp -p AutoPac_FR.msw/proxy_fr.txt OneFile/proxy_fr.txt # fi if [ -f AutoPac_FR_Old.sh ] then echo "Vous disposez d'un nouveau AutoPac_EN.sh AutoPac_EN.msw dans le dossier." echo Remplacer votre AutoPac_EN.sh avec le nouveau le plus tôt possible. echo fi echo Installation terminée. Leaving AutoPac_FR.msw avec echo cryptage OpenPGP signature en faveur d\'une vérification. echo else echo le contrôle SUCCOMBE ... sortir echo fi else echo SUCCOMBE soit déroulante ou décompresser des fichiers. echo fi echo Appuyez sur Entrée pour quitter echo read TOLKEIN cd ${CURDIR} exit