Skip to content

Instantly share code, notes, and snippets.

@mikalv
Created March 15, 2016 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikalv/9033a03ba94cfe7be2c3 to your computer and use it in GitHub Desktop.
Save mikalv/9033a03ba94cfe7be2c3 to your computer and use it in GitHub Desktop.
#!/usr/local/bin/python
import pyPdf
import sys
def main():
pdf = pyPdf.PdfFileReader(open(sys.argv[0]))
if pdf.getIsEncrypted():
print "Kryptert"
else:
print "Ikke kryptert"
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment