Skip to content

Instantly share code, notes, and snippets.

@atomass
Created December 10, 2018 13:39
Show Gist options
  • Save atomass/3d4f647998f1ff450ab207b0e24e7586 to your computer and use it in GitHub Desktop.
Save atomass/3d4f647998f1ff450ab207b0e24e7586 to your computer and use it in GitHub Desktop.
PDF password unlock
#!/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}"
@atomass
Copy link
Author

atomass commented Dec 10, 2018

Usage
pdfunlock inputfile outputfile

Save an unprotected copy of the inputfile pdf file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment