Commit Graph

146 Commits

Author SHA1 Message Date
mkb79
fd51422a36 Enhance parsing DrmIon files
Adding support for parsing plaintext in DrmIon files.

This is needed by my kindle project. When downloading an ebook with my package it gives me a metadata file wich is DrmIon encoded. This file containes plaintext instead of encrypted pages.
2021-02-22 14:16:15 +01:00
Apprentice Harper
76a47e0dd0 Version number update
Update to 7.1.0 for a full release
2021-02-21 14:35:49 +00:00
josdion
ffd79d5fe4 Preserve filename encoding flag when fixing epub archive 2021-02-18 12:38:19 +02:00
Aldo Bleeker
21a7b13524 Fix for Python 3 2021-02-14 12:50:55 +01:00
Apprentice Harper
495dda3809
Merge pull request #1502 from ableeker/python3
Fix for broken book keys
2021-02-14 08:55:56 +00:00
Aldo Bleeker
33b9630ca5 Fix for broken book keys 2021-01-28 13:06:59 +01:00
xxyzz
9346f86f73
encode serialnum before returning it, close #1479 2021-01-27 14:31:05 +08:00
llrosy798
0b2b81fd23
fix previous bug 2021-01-21 23:48:04 +09:00
llrosy798
63aecc598f
update secret table 2021-01-21 23:46:03 +09:00
llrosy798
51c8be6baf
fill unknown symbols in known catalog 2021-01-21 23:41:22 +09:00
2Weak2Live
2789cee331 Fix python3 encoding problem in voucher decryption 2021-01-13 22:44:11 -05:00
Apprentice Harper
a7974f0f14 Update ineptpdf.py
integer division, and version
2021-01-03 16:11:02 +00:00
Apprentice Harper
ed412bee35 Updated to inept.pdf for PC
Contributed changes for PC compatibility. Thanks, Aldo.

Update main version to 7.0.2
2021-01-03 16:01:14 +00:00
Apprentice Harper
6cee615f26 Update ineptpdf.py
Fix handling of metadata
2021-01-03 15:35:17 +00:00
Apprentice Harper
c4581b4d72 Version to 7.0.1, ineptpdf fixes
ineptpdf should now decrypt at least some Adobe PDFs
2020-12-30 12:14:04 +00:00
Apprentice Harper
f6a568bcc1 Update ineptepub.py
Handle uncompressed elements (if any) in the zip file.
2020-12-27 12:16:11 +00:00
Apprentice Harper
bf6170e613
Merge pull request #1445 from ableeker/python3
Some more fixes for ePub
2020-12-26 16:02:12 +00:00
Apprentice Harper
fdf0389936 MobiDeDRM fixes
Change handling of PIDs to cope with byte arrays or strings passed in. Also fixed handling of a very old default key format.
2020-12-26 15:58:42 +00:00
Aldo Bleeker
5599c1694b Some more fixes for ePub 2020-12-26 15:36:10 +01:00
Apprentice Harper
13e9a14907
Merge pull request #1398 from xxyzz/config
return str from load_resource()
2020-12-04 12:52:42 +00:00
xxyzz
a1059650f6
return str from load_resource() 2020-12-03 19:02:09 +08:00
penenkel
a3cc221932
Revert changes to k4mobidedrm.py 2020-12-02 22:36:29 +01:00
penenkel
6732be1434
getPidList() now returns pids as bytes instead of bytearrays 2020-12-02 22:34:29 +01:00
penenkel
ad5cb056f0
Add conversion from bytearray to bytes so that pids are hashable 2020-11-30 23:25:01 +01:00
Aldo Bleeker
8e436ad920 Python 3 fixes fort correct version of __init__.py 2020-11-29 16:54:45 +01:00
Aldo Bleeker
ae806f734e Python 3 fixes for __init__.py 2020-11-29 13:39:04 +01:00
Apprentice Harper
ccfa454226 Merge branch 'Python2' - the DeDRM plugn version change 2020-11-29 10:47:09 +00:00
Apprentice Harper
6716db1f62 Derive calibre version tuple from __version__ string 2020-11-29 10:40:14 +00:00
Apprentice Harper
0e0d7d8b14 Don't rule out running from the command line 2020-11-28 16:25:54 +00:00
Apprentice Harper
981aadc497
Merge pull request #1380 from xxyzz/byte-string
Fix byte string error for KFX
2020-11-28 16:19:17 +00:00
Apprentice Harper
26eb5d676c Merge branch 'Python2' Bring across version number updates from 6.8.1 release 2020-11-28 16:18:09 +00:00
Apprentice Harper
464788a3f1 Update DeDRM version number to 6.8.1, and kindlekey to 2.8 2020-11-28 16:11:17 +00:00
Apprentice Harper
036f9007fd Merge branch 'Python2': Get the changes to fix Kindle key retrieval for Mac OS X Big Sur 2020-11-28 16:07:31 +00:00
Aldo Bleeker
f9d9b6016f Python 3 fixes for Barnes&Noble 2020-11-28 14:49:27 +01:00
Dan Norris
cdab22e59c
Fix loading libcrypto on OSX Big Sur
It looks like Big Sur removed `libcrypto.dylib` as a file on the
filesystem, so loading it using `ctypes.find_library` fails which breaks
Kindle decryption. Now to load a dylib you need to attempt to load it
directly and the operating system will load the dylib from the OS' cache
or fail.

This fixes the problem by explicitly setting the path to libcrypto to
`/usr/lib/libcrypto.dylib` if `ctypes.find_library` does not find the
file, loading the dylib and raising an exception if it fails at that
point.

See saltstack/salt#5778 for more detailed info.

Closes #1369.
2020-11-27 22:28:34 -05:00
xxyzz
b8b324956c
replace bord with ord and some other byte string fix
PyCryptodome's bord() in Python3 does nothing.
2020-11-28 11:22:27 +08:00
xxyzz
1955b34883
import ion correctly 2020-11-28 11:20:53 +08:00
Apprentice Harper
dbc5c2b4de
Merge pull request #1269 from keshavgbpecdelhi/patch-4
using the Kindle & prompt
2020-11-27 19:34:20 +00:00
Apprentice Harper
856fef55be
Merge pull request #1268 from keshavgbpecdelhi/patch-3
changing wil to will
2020-11-27 19:34:08 +00:00
Apprentice Harper
f2fa0426b7
Merge pull request #1267 from keshavgbpecdelhi/patch-2
prompt and will
2020-11-27 19:33:59 +00:00
Apprentice Harper
c3376cc492
Merge pull request #1266 from keshavgbpecdelhi/patch-1
"promt" doesn't make any sense
2020-11-27 19:33:46 +00:00
Apprentice Harper
c52e4db3df Python 3 fix for old ereader PDB DRM removal 2020-11-27 15:51:33 +00:00
Apprentice Harper
45038cc77b Python 3 fix for epubtest.py that detects version of DRM used 2020-11-27 15:49:57 +00:00
Apprentice Harper
5ec9c98a0b Python 3 fixes for Android kindle key retrieval 2020-11-27 15:46:06 +00:00
xxyzz
66bab7bd7d
using byte string in kfxdedrm.py 2020-11-27 22:01:18 +08:00
Apprentice Harper
e0c7d7d382 Revert "PyCrypto requires RSA values to be long"
This reverts commit a1703e15d4.
2020-11-25 08:36:06 +00:00
Apprentice Harper
f12a4f3856 Revert to byte arrays for maps on PC, and so fix for Mac which still used byte arrays. Remove some unused code. 2020-11-23 14:22:48 +00:00
Apprentice Harper
87881659c4
Merge pull request #1362 from ivan-m/pycrypto_rsa_long
PyCrypto requires RSA values to be long not int (which is possible for small numbers)
2020-11-23 13:31:10 +00:00
Apprentice Harper
dbc7f26097
Merge pull request #1357 from task-hazy/python_3_cli_linux
Adjust wineutils to better call wine python
2020-11-23 13:28:29 +00:00
Aldo Bleeker
74bcf33591 Python 3 fixes 2020-11-22 16:03:45 +01:00
Ivan Lazar Miljenovic
a1703e15d4 PyCrypto requires RSA values to be long
This is at least true for PyCrypto 2.6.1
2020-11-11 20:51:19 +08:00
Task Hazy
591448d1f5 Adjust wineutils to better call wine python
Separate out logic to find correct python executable, and change to not
do shell call with subprocess
2020-11-09 16:51:13 -07:00
Aldo Bleeker
a74f37c79e Minor Python 3 fix for Customize dialog 2020-11-07 13:43:58 +01:00
Aldo Bleeker
7f4e6698ef More Python 3 fixes for Customize plugin dialog 2020-11-06 23:49:18 +01:00
fireattack
4a319a3522 Convert all to bytes first before concat 2020-11-02 02:09:52 -06:00
Apprentice Harper
f1ef1b8ecd
Merge pull request #1340 from ableeker/python3
Python 3 fixes config.py alfcrypto.py
2020-10-29 14:09:28 +00:00
Aldo
6dd022e6a0 Python 3 fixes config.py alfcrypto.py 2020-10-28 18:54:33 +01:00
Ivan Lazar Miljenovic
ef59e112c1 Set PYTHONPATH="" when running through wine
Without this, it's possible for the Linux PYTHONPATH to leak through
and mixing up the PyCrypto libraries being called (or possibly
exceeding the allowed length of the PYTHONPATH in wine).
2020-10-27 13:34:16 +08:00
Jeremy Whiting
e0ec691dd6 Fix another exception thrown when unable to find kindle keys. 2020-10-21 10:56:58 -06:00
Jeremy Whiting
0add3646d9 _winreg in python3 has been changed to winreg. Update imports. 2020-10-21 10:56:50 -06:00
Apprentice Harper
c4c20eb07e
Merge pull request #1318 from task-hazy/kindle_fetch
Get working kindlekey.py on Python 3.8.6
2020-10-20 16:21:36 +01:00
Task Hazy
cc33f40ecc Get working kindlekey.py on Python 3.8.6 2020-10-16 12:07:34 -06:00
Apprentice Harper
939cdbb0c9 More fixes for Amazon books, fixing identity checks, started on Topaz. 2020-10-16 13:58:59 +01:00
Apprentice Harper
dc27c36761 test file type correctly 2020-10-16 13:22:19 +01:00
Apprentice Harper
781268e17e More general changes, and get mobidedrm and kindlekey to work on Mac. 2020-10-14 16:23:49 +01:00
Apprentice Harper
e31752e334 Mostly Mac fixes. mobidedrm.py now works, and k4mobidedrm for at least some input. kindlekey.py should be working too. But lots more changes and testing to do. 2020-10-04 20:36:12 +01:00
Jeremy Whiting
dca0cf7d00 Fix kgenpids string vs bytes usage for python3 for calibre 5.1.
In order to properly get pids etc. we need to pass bytes to MD5 and SHA1
instead of unicode strings. Also ord() is no longer needed since
data is bytes value gets int and we need chr() to get characters from
the mapping bytearrays.
2020-10-03 22:36:35 -06:00
Jeremy Whiting
62e0a69089 Fix launching help link from customization dialog.
To fix error with python3 when launching help link open files in binary
mode.
2020-10-03 22:36:35 -06:00
Jeremy Whiting
9df1563492 Use open instead of file() to export keys to file.
Fixes export of Kindle keys in calibre 5.0.1 here.
2020-10-03 22:36:27 -06:00
keshavgbpecdelhi
971db9ae71
using the Kindle & prompt
As I already said prompt is the right word so yeah...
and "you are use kindle" is making no sense so replacing it to make it meaningful i.e. "If you are using the Kindle for PC under Wine"
2020-10-01 00:16:55 +05:30
keshavgbpecdelhi
cf829db532
wil to will
typo
2020-10-01 00:05:46 +05:30
keshavgbpecdelhi
80c8bd2d24
prompt and will
Sorry but typos are typos 
"promt" should be written as "prompt"
and "wil" should be "will"
2020-10-01 00:01:32 +05:30
keshavgbpecdelhi
969599ce6b
"promt" doesn't make any sense
I think it may be a silly mistake or something because the other prompts are written well except this. Just to webpage will not look authentic by using a wrong spelling so writing the sentence like as follows :
Clicking this button will prompt you to enter a new name for the highlighted key in the list.
2020-09-30 23:12:26 +05:30
Apprentice Harper
ff8d44492e Fix problem on Mac with byte arrays. 2020-09-30 13:25:32 +01:00
Christian Clauss
558efebbff
Update genbook.py 2020-09-28 01:03:30 +02:00
Christian Clauss
1eaee6a0a8
Old style exceptions are syntax errors in Python 3
Switch to new style exceptions which work on both Python 2 and Python 3.
2020-09-28 01:00:21 +02:00
Christian Clauss
3f644ddfd6
print() is a function in Python since 1/1/2020 2020-09-28 00:49:21 +02:00
Christian Clauss
08bdacf476
Fix Python syntax error: add a comma
Discovered by flake8 running in our GitHub Action
2020-09-28 00:39:57 +02:00
Apprentice Harper
de50a02af9 More generic 3.0 changes, to be tested. 2020-09-27 11:54:49 +01:00
kubik147
2800f7cd80 Remove the u string prefixes 2020-09-27 00:57:53 +02:00
kubik147
61c5096da0 Make adobekey.py work in Python 3 2020-09-27 00:54:40 +02:00
Apprentice Harper
c3aa1b62bb
Merge pull request #1241 from erikbrinkman/patch-1
Support ebook-convert
2020-09-26 21:19:17 +01:00
Apprentice Harper
afa4ac5716 Starting on Version 7.0 using the work done by others. Completely untested. I will be testing things, but I thought I'd get this base version up for others to give pull requests.
THIS IS ON THE MASTER BRANCH. The Master branch will be Python 3.0 from now on. While Python 2.7 support will not be deliberately broken, all efforts should now focus on Python 3.0 compatibility.

I can see a lot of work has been done. There's more to do. I've bumped the version number of everything I came across to the next major number for Python 3.0 compatibility indication.

Thanks everyone. I hope to update here at least once a week until we have a stable 7.0 release for calibre 5.0
2020-09-26 21:22:47 +01:00
Erik Brinkman
c516306858
Support ebook-convert
`ebook-convert`  converts ebooks without adding them to the calibre library, and so dedrm_tools fails to run and convert books that are processed in this way. Adding on_preprocess means that it will also run on any preprocessing allowing these tools to be used by the cli tools.

As far as I'm aware, there's nothing wrong with having this run in both instances, and it still seems to allow conversion in the "standard way".
2020-09-20 16:43:23 -04:00
Apprentice Harper
4868a7460e Updates to FAQs and ReadMes 2020-06-18 08:03:20 +01:00
Apprentice Harper
0859f197fc Update init file, update versions in files, update comments in files 2020-06-18 07:42:41 +01:00
Apprentice Harper
da85d4ffac
Merge pull request #1095 from fondfire/patch-1
Create ignoblepdf.py
2020-06-17 16:04:41 +01:00
Apprentice Harper
6fd5535072
Merge pull request #1091 from vanicat/inetepub-python3
Inetepub python3
2020-06-17 15:57:27 +01:00
apprenticesakuya
22d2b37e04
Support KFX VoucherEnvelope versions 2 and 3 2020-06-16 01:19:15 +00:00
apprenticesakuya
837562db66
Support .kinf2018 on Mac 2020-06-11 17:26:36 +00:00
fondfire
3dcf3a5483
Create ignoblepdf.py
New Python 2 program to decrypt Barnes & Noble encrypted PDF files.
2020-05-15 22:08:30 -05:00
Rémi Vanicat
f7b4efc3e1 More handling of difference between python2 and python3
Place where python3 use bytes/int and python2 str/str
2020-05-08 18:09:27 +02:00
Rémi Vanicat
2fbf2c1c5f decoding from base64 in a portable way 2020-05-08 18:09:27 +02:00
Rémi Vanicat
3166273622 modernizing ineptepub.
decrypting as python2 work
failing with python3:
  File "ineptepub.py", line 424, in decryptBook
    bookkey = rsa.decrypt(bookkey.decode('base64'))
AttributeError: 'str' object has no attribute 'decode'
2020-05-08 18:09:27 +02:00
apprenticesakuya
ea916d85fc
Finish .kinf2018 support 2020-03-27 13:01:09 -07:00
Apprentice Harper
92bf51bc8f Remove stand-alone apps. Only support the two plugins. 2020-02-16 10:12:25 +00:00