zip -P assword stuff you_are_a_pirate.pdfLe mot de passe et donc tapé en clair dans le terminal et reste visible dans l'historique du terminal (/$home/.bash_history).
Pour contourner ce petit risque potentiel, il est préférable de taper :
zip -e stuff you_are_a_pirate.pdfLe mot de passe de chiffrement sera alors demandé en deux fois, non affiché sur le terminal ni enregistré dans l'historique du terminal /$home/.bash_history .
Enter password :
Verify password :
Extrait du manuel de la commande "zip" :
-P password
--password password
Use password to encrypt zipfile entries (if any). THIS IS INSE-
CURE! Many multi-user operating systems provide ways for any
user to see the current command line of any other user; even on
stand-alone systems there is always the threat of over-the-
shoulder peeking. Storing the plaintext password as part of a
command line in an automated script is even worse. Whenever
possible, use the non-echoing, interactive prompt to enter pass-
words. (And where security is truly important, use strong
encryption such as Pretty Good Privacy instead of the relatively
weak standard encryption provided by zipfile utilities.)
Derniers commentaires