Created
December 10, 2018 13:39
-
-
Save atomass/3d4f647998f1ff450ab207b0e24e7586 to your computer and use it in GitHub Desktop.
PDF password unlock
This file contains hidden or 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 | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
NC='\033[0m' # No Color | |
echo -n "PDF Password: " && read -s && echo "" && qpdf --password=$REPLY --decrypt "$1" "$2" && echo -e "${GREEN}DONE${NC}" || echo -e "${RED}FAILED${NC}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage
pdfunlock inputfile outputfile
Save an unprotected copy of the
inputfile
pdf file