noDRM / DeDRM_tools

DeDRM tools for ebooks
6.59k stars 287 forks source link

Fileopen Revision 4 Encryption fails #442

Open liqfx opened 7 months ago

liqfx commented 7 months ago

Question / bug report

Previously i've had no trouble using ineptpdf_5.4.51 to dedrm file open protected pdfs.

However on a recently downloaded file, I'm getting an error "Password is not correct".

I seamed to have tracked the problem to the fact that for this file R = 4, and it appears from the code comments that revision 4 encryption is currently unsupported.

Is there any chance revision 4 encryption could be looked or has the good run with this excellent script come to an end?

Which version of Calibre are you running?

ineptpdf_8.4.51

Which version of the DeDRM plugin are you running?

ineptpdf_8.4.51

If applicable, which version of the Kindle software are you running?

No response

Log output

    if not is_authenticated:
       raise ADEPTError('Password is not correct.')
noDRM commented 7 months ago

I can take a look and try to add it - but due to the fact that FileOpen DRM is locked to a particular machine I can't test this for myself so be prepared to test a whole bunch of versions until I get that working as intended ...

What are the other values in the root node? R is 4, what are "V" and "Length" (if present in your PDF)?

liqfx commented 7 months ago

Hey thanks, Yes V = 4 and length = 128

noDRM commented 7 months ago

Okay, first test, can you give this version a try and see if it works?

fileopen_test_1.zip

liqfx commented 7 months ago

I tried to open that file and it won't open/run.

To check my install was ok I opened the original one and it opens fine.

I'm running Python 2.7.18, pywin32, pycryptodome

noDRM commented 6 months ago

How about this one?

fileopen_test_2.zip

burner- commented 2 months ago

I have also problem with this. Version is 8.4.51 and I use pycryptodome. I got "Cannot find decryption key" Log file says: 1st preresult

Nascv=2&Nasct=987&Nasca=13539&Nasce=257&Nascd=THERE_WAS_SOME_KIND_KEY

Any ideas?

ElleKayEm commented 2 months ago

Try version 8.5: https://github.com/noDRM/DeDRM_tools/tree/master/Other_Tools/Tetrachroma_FileOpen_ineptpdf

burner- commented 2 months ago

Looks that actually it was 8.5.0. Dialog it self give that versionb even log file name give older.

ElleKayEm commented 2 months ago

I don't know then. I just saw someone else report that 8.5 worked for them.

burner- commented 2 months ago

that 1st preresut looks right formatted for this?

ElleKayEm commented 2 months ago

I have no experience with this myself. I just saw that issue #436 and #514 were closed because 8.5 worked for them.