Created
August 25, 2018 03:21
-
-
Save jeovazero/1e9f8ac6b4ced0b725e096d7d7d45d3a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -lt 2 ] | |
then echo -e "Falta argumentos\nUsage:\n$ $0 <input_file> <output_file>" | |
else | |
echo "Tem certeza que deseja executar:" | |
echo "$ openssl enc -aes-256-cbc -salt -in $1 -out $2" | |
echo "? [s/n]" | |
read OP | |
if [ $OP = "s" ] | |
then | |
echo "Criando o arquivo criptografado..." | |
`openssl enc -aes-256-cbc -salt -in $1 -out $2` | |
echo "Arquivo criado!" | |
echo "Remover arquivo? [s/n]" | |
read OQ | |
if [ $OQ = "s" ] | |
then `shred -f -u -z -n 10 $1 -v` | |
else echo "Arquivo original nao removido." | |
fi | |
else echo "Nada executado!" | |
fi | |
fi | |
# jeotario |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment