noDRM / DeDRM_tools

DeDRM tools for ebooks
7.28k stars 323 forks source link

B&N Comics do not get DeDRMed properly, resulting in ~2 lines of garbage characters over 2 pages. #641

Open tzachyb opened 1 month ago

tzachyb commented 1 month ago

Question / bug report

B&N Comics do not get properly DeDRMed. As these comics are not available digitally anywhere anymore, I am very vested to get access to them. Willing to lend books if requested.

I installed Nook for Windows, downloaded files , got the content for the missing rights.xml (see process in prior question from me), and added it as rights,xml to the archive under 2940045395991.epub\META-INF\ I also tried same after removing the permissions section of the XML, as follows:

<?xml version="1.0"?><adept:rights xmlns:adept="http://ns.adobe.com/adept">
<licenseToken xmlns="http://ns.adobe.com/adept">
    <licensee>JBlue-1</licensee>
    <resource>urn:uuid:a18f0232-c1bc-453a-b744-5de190532962</resource>
    <licenseURL>https://nasigningservice.adobe.com/licensesign</licenseURL>
    <operatorURL>http://edelivery.barnesandnoble.com/EDS/fulfillment</operatorURL>
    <encryptedKey keyInfo="passHash">LrGzW42iYON4G410DdWI2+ChFjz8VLs+b14T5KFjbwCSCb3j1s0eA3eqS0fcrIYZ</encryptedKey>
    <model version="1.0">2816</model>
    <signature>NpeszmMB4rFNJIc+MeBmd1zne7p4zaeo2W3Cl5aYlEt3RrA1YEflL0X0gH2XZ+i22S4CnhU3Oeqv2bp7tCjq3vcQvcVvv13Qu5gofDLIh/cPRiZ3pa1Kg1jAL96KfnwHiHz08RG8T+QCFerhCLFLpU1EjVgOjwRlvWhxT4s9wMs=</signature>
  </licenseToken><licenseServiceInfo xmlns="http://ns.adobe.com/adept">
  <licenseURL>https://nasigningservice.adobe.com/licensesign</licenseURL>
  <certificate>MIIEvjCCA6agAwIBAgIER2q5ljANBgkqhkiG9w0BAQUFADCBhDELMAkGA1UEBhMCVVMxIzAhBgNVBAoTGkFkb2JlIFN5c3RlbXMgSW5jb3Jwb3JhdGVkMRswGQYDVQQLExJEaWdpdGFsIFB1Ymxpc2hpbmcxMzAxBgNVBAMTKkFkb2JlIENvbnRlbnQgU2VydmVyIENl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AjAAMA0GCSqGSIb3DQEBBQUAA4IBAQC0l1L+BRCccZdb2d9zQBJ7JHkXWt1x/dUydU9I/na+QPFE5x+fGK4cRwaIfp6fNviGyvtJ6Wnxe6du/wlarC1o26UNpyWpnAltcy47LpVXsmcV5rUlhBx10l4lecuX0nx8/xF8joRz2BvvAusK+kxgKeiAjJg2W20wbJKh0Otct1ZihruQsEtGbZJ1L55xfNhrm6CKAHuGuTDYQ/S6W20dUaDUiNFhA2n2eEySLwUwgOuuhfVUPb8amQQKbF4rOQ2rdjAskEl/0CiavW6Xv0LGihThf6CjEbNSdy+vXQ7K9wFbKsE843DflpuSPfj2Aagtyrv/j1HsBjsf03e0uVu5</certificate>
</licenseServiceInfo>
</adept:rights>

In both cases, the result is a shortened book of just 2 pages, each containing only a line or 2 of garbage characters. In one of multiple attempts, the cover picture displayed the following error instead of the mostly blank first page:

Doctor Who_ Series III #1 Cover

Which version of Calibre are you running?

7.19

Which version of the DeDRM plugin are you running?

v10.0.3

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

No response

Log output

ApplicationPaletteChange event ignored
Using calibre Qt style: True
calibre Debug log
calibre 7.19  embedded-python: True
Windows-10-10.0.22631-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.22631')
Python 3.11.5
Windows: ('10', '10.0.22631', 'SP0', 'Multiprocessor Free')
Interface language: None
EXE path: G:\My Drive\PortableApps\calibrePortable\App\Calibre\calibre-debug.exe
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 15, 0) && DeDRM (10, 0, 3) && Package KFX (from KFX Input) (2, 15, 0) && KFX metadata reader (from KFX Input) (2, 15, 0) && From KFX (2, 15, 0) && KFX Input (2, 15, 0) && KindleUnpack - The Plugin (0, 83, 1)
calibre 7.19  embedded-python: True
Windows-10-10.0.22631-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.22631')
Python 3.11.5
Windows: ('10', '10.0.22631', 'SP0', 'Multiprocessor Free')
Interface language: None
EXE path: G:\My Drive\PortableApps\calibrePortable\App\Calibre\calibre-debug.exe
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 15, 0) && DeDRM (10, 0, 3) && Package KFX (from KFX Input) (2, 15, 0) && KFX metadata reader (from KFX Input) (2, 15, 0) && From KFX (2, 15, 0) && KFX Input (2, 15, 0) && KindleUnpack - The Plugin (0, 83, 1)
QPA platform: windows
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 109.4937343358396 x 109.18208955223879
[0.00] Starting up...
[0.00] Showing splash screen...
[1.23] splash screen shown
[1.23] Initializing db...
[1.44] db initialized
[1.44] Constructing main UI...
[9.03] GUI main window shown
[9.77] main UI initialized...
[9.77] Hiding splash screen
[9.77] splash screen hidden
[9.77] Started up in 9.77 seconds with 0 books
DeDRM v10.0.3: Trying to decrypt 2940045395991.epub
DeDRM v10.0.3: Verifying zip archive integrity
DeDRM v10.0.3: “2940045395991.epub” is a secure PassHash-protected (B&N) ePub
DeDRM v10.0.3: Trying Encryption key JBlue-1_nookStore_1
1bed8pqe.epub is a secure Adobe PassHash (B&N) ePub.
DeDRM v10.0.3: Post-processing took 1.0 seconds
DeDRM v10.0.3: Finished after 5.4 seconds
Failed to render C:\Users\Jason\AppData\Local\Temp\calibrePortableTemp\calibre_4tf2v6d8\qnxcm48v_epub_meta\OPS/cover.xml with errors:
Traceback (most recent call last):
  File "calibre\utils\ipc\simple_worker.py", line 303, in main
  File "calibre\ebooks\render_html.py", line 180, in main
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\\Users\\Jason\\AppData\\Local\\Temp\\calibrePortableTemp\\calibre_4tf2v6d8\\xrp2aons-render-html'
ElleKayEm commented 1 month ago

Been a long time since I had to mess with these so I don't know if things have changed. I found that they decrypted, but calibre's viewer couldn't handle them. I unzipped the epub. Took the full page images and made a cbz. At least that worked for the comics I had.

tzachyb commented 1 month ago

Been a long time since I had to mess with these so I don't know if things have changed. I found that they decrypted, but calibre's viewer couldn't handle them. I unzipped the epub. Took the full page images and made a cbz. At least that worked for the comics I had.

@ElleKayEm, how did you decrypt the full page images?

ElleKayEm commented 1 month ago

I decrypted the epub with DeDRM. While calibre's viewer couldn't handle the non-standard epub format, I found that the contents were decrypted.

tzachyb commented 1 month ago

FYSA, There seems to be two kinds of comics books. The older set I have, which nook itself does not appear to be able to open; and the ones B&N sells now, which can be opened only in Nook apps (including for Windows).

I bought a newer one and tried to DrDRM it (also needed to add config.xml). Decrypts but displays only cover and empty TOC

@ElleKayEm, thanks for tip -- I do see them in the newer version. I'll check if they were in the prior version and do same.

tzachyb commented 1 month ago

@ElleKayEm ALAS, the original comics' jpegs were not decrypted. Reached out to B&N support with expectation of zero help, but maybe maybe they will gift me the renamed/newer versions (e.g., "Doctor Who: The Eleventh Doctor Archives #29"/9781785850783 in leu of "Doctor Who: Series III #1"/2940045395991.

Given Nook cannot open the older comic format and you having provided a solution for the newer format, this issue can be closed. If left open, I'll update y'all on if B&N came through or not.