3 ms·
View the source of the pdf, find the trailer dictionary (ctrl-f "/Encrypt"), and note the object number of the encryption dictionary. An example trailer below,
by tyingq 3y ago
View the source of the pdf, find the trailer dictionary (ctrl-f "/Encrypt"), and note the object number of the encryption dictionary. An example trailer below, here the encryption dictionary happens to be object ID 94,0
% Trailer dictionary
trailer
<<
/Size 95 % number of objects in the file
/Root 93 0 R % the page tree is object ID (93,0)
/Encrypt 94 0 R % the encryption dict is object ID (94,0)
/ID [<1cf5...>] % an arbitrary file identifier
>>
Use the object id to find the encryption dictionary:
% Encryption dictionary
94 0 obj
<<
/Filter /Standard % use the standard security handler
/V 1 % algorithm 1
/R 2 % revision 2
/U (xxx...xxx) % hashed user password (32 bytes)
/O (xxx...xxx) % hashed owner password (32 bytes)
/P 65472 % flags specifying the allowed operations
>>
endobj
Generally, if /V and /R are both 4 or less, you can find tools to crack it yourself on a normal PC.
More info on the values of /V and /R here: https://qpdf.readthedocs.io/en/stable/encryption.html https://qpdf.readthedocs.io/en/stable/encryption.html
- mvelbaum 3y agoThis is what I get: 20 0 obj << /R 4 /O (...) /U (...) /P -1548 /Length 128 /V 4 /EncryptMetadata true /Filter /Standard /StmF /StdCF /StrF /StdCF /CF << /StdCF << /AuthEvent /DocOpen /CFM /AESV2 >>>>>> endobj I tried a bunch of tools, including https://www.elcomsoft.com/apdfpr.html?src=prog_apdfprp https://www.elcomsoft.com/apdfpr.html?src=prog_apdfprp to get it to quickly remove the password, but nothing worked :/