Open BentonEdmondson opened 3 years ago
Some (many?) pdfs are not working with the Python 3 version, but can often be decrypted with the Python 2 version.
Thanks for the suggestion. I tried the Python 2 version and got this:
Traceback (most recent call last):
In <module>
sys.exit(cli_main())
In cli_main
result = decryptBook(userkey, inpath, outpath)
In decryptBook
serializer = PDFSerializer(inf, userkey)
In __init__
doc.initialize(userkey)
In initialize
return self.initialize_ebx(password, docid, param)
In initialize_ebx
rights = zlib.decompress(rights, -15)
zlib.error: Error -5 while decompressing data: incomplete or truncated stream
It is essentially the same error, complaining that ADEPT_LICENSE
is missing
Of course the ADEPT_LICENSE is missing.
Where did this PDF come from?
In books downloaded using ADE 2.x the ADEPT_LICENSE field should be present. ADE inserts it into the file after it is downloaded. (I have seen it missing in some B&N PDF files, which can have this data stored in a separate database.)
I assume the 'V': 4 means that this is ADE v4 content making it undecryptable for now. Is this correct?
No. V=4 is the normal expected value.
It came from libgourou (http://indefero.soutade.fr/p/libgourou/), which I realized doesn't support PDF (http://indefero.soutade.fr/p/libgourou/issues/17/) which explains it. I guess the client has to add in ADEPT_LICENSE once it receives the file from Adobe?
I guess the client has to add in ADEPT_LICENSE once it receives the file from Adobe?
Yes.
Ok. When downloading EPUBs does the client modify them upon receipt or does it just download the EPUB and call it good?
When downloading EPUBs does the client modify them upon receipt or does it just download the EPUB and call it good?
EPUBs are modified by ADE in much the same way to add a rights.xml file.
Alright. Thanks for the help
I now have a pdf with ADEPT_LICENSE
present and I'm still getting the issue. It's The Goodbye Summer (realized as summer.pdf) from the Adobe ADE sample library. ineptpdf.py
gives me
rights = zlib.decompress(rights, -15)
zlib.error: Error -5 while decompressing data: incomplete or truncated stream
Any idea what the problem is? Does the pre-decryption pdf itself look correct? I checked and it has ADEPT_LICENSE
. Also I'm using the same keyfile.der
that I use on epubs that works.
I don't know what that error is. But I was able to download the book with ADE 2.0.1 and then decrypt it with the DeDRM 7.2.1 plugin.
@ElleKayEm alright. Can you verify that DeDRM works on the pdf I downloaded?: summer.pdf
Each ADE download is locked to the downloading user's key. No one else is going to be able to decrypt a file you downloaded.
That said, I took a look at the file and the rights information is malformed in it. Are you still trying to use libgourou for the download?
Ah I forgot about that. Yes I am using libgourou. I'll open an issue there.
@j-howell actually, I should ask, how is it malformed?
@j-howell actually, I should ask, how is it malformed?
It appears to be truncated, but it is hard to be certain.
I'm using ineptpdf to decrypt a PDF. I am getting this error:
At line 1425 the value of
self.encryption
isOf course the
ADEPT_LICENSE
is missing. I assume the'V': 4
means that this is ADE v4 content making it undecryptable for now. Is this correct?