Advertisement
aestu

crackpkcs12.sh

May 8th, 2011
2,473
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.38 KB | None | 0 0
  1. #!/bin/bash
  2. # Crack PKCS12 file using a dictionary attack
  3. #
  4. # See https://sourceforge.net/projects/crackpkcs12/ for a more efficient
  5. # and fast way to do it using the C program.
  6.  
  7. DICCIONARIO=$1
  8. ARCHIVO=$2
  9.  
  10. for PSW in $(cat $DICCIONARIO)
  11. do
  12. if ( openssl pkcs12 -noout -passin pass:${PSW} -in ${ARCHIVO} 2> /dev/null )
  13. then
  14. echo
  15. echo Contraseña encontrada: $PSW
  16. exit
  17. fi
  18. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement