Using Python Please Answer Following Thank Question Say Encrypted Pdf Forgotten Password R Q37152953

Using Python, please answer the following. Thankyou!

Question:

Say you have an encrypted PDF that you have forgotten thepassword to, but you remember it was a single English word.

Instead you can write a program in Python that will decrypt thePDF by trying every possible English word until it finds one thatworks.

Download the text file from link 1 provided below:

Link 1:https://github.com/tempRUS/python/blob/master/dictionary.txt

This dictionary file contains over 44,000 English words with oneword per line. Create a list of word strings by reading thisfile.

Then loop over each word in this list, passing it to thedecrypt() method.

If this method returns the integer 0 , the password was

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.