Advertisement
R0lf_R1s1k0

decrypt_cipher.sh

Nov 13th, 2016
2,286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.30 KB | None | 0 0
  1. #/bin/bash
  2. CIPHER_LIST=$(openssl list-cipher-commands)
  3. for cipher in $CIPHER_LIST; do
  4.     openssl end -d -${cipher} -in $1 -pass pass:$2 > /dev/null 2>&1
  5.     if [[ $? -eq 0 ]]; then
  6.     echo "Cipher used was $cipher. unencrypting $1"
  7.     openssl enc -d -${cipher} -in $1 -out $3 -pass pass:$2
  8.     exit
  9. fi
  10. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement