diff --git a/calibre-plugin/__init__.py b/calibre-plugin/__init__.py index 80dc95b..46913ea 100644 --- a/calibre-plugin/__init__.py +++ b/calibre-plugin/__init__.py @@ -90,7 +90,7 @@ class DeACSM(FileTypePlugin): names = ["cryptography.zip", "rsa.zip", "oscrypto.zip", "asn1crypto.zip", "pyasn1.zip"] lib_dict = self.load_resources(names) - print("{0} v{1}: Copying needed library files from plugin zip".format(PLUGIN_NAME, PLUGIN_VERSION)) + # print("{0} v{1}: Copying needed library files from plugin zip".format(PLUGIN_NAME, PLUGIN_VERSION)) for entry, data in lib_dict.items(): file_path = os.path.join(self.moddir, entry) diff --git a/calibre-plugin/config.py b/calibre-plugin/config.py index 772d6ee..4455717 100644 --- a/calibre-plugin/config.py +++ b/calibre-plugin/config.py @@ -128,13 +128,13 @@ class ConfigWidget(QWidget): self.chkNotifyFulfillment.setChecked(self.tempdeacsmprefs["notify_fulfillment"]) layout.addWidget(self.chkNotifyFulfillment) - self.chkDetailedLogging = QtGui.QCheckBox("Enable detailed debug logging") + self.chkDetailedLogging = QtGui.QCheckBox("Enable verbose debug logging") self.chkDetailedLogging.setToolTip("Default: False\n\nIf this is enabled, the plugin debug logs will be more verbose which might be helpful in case of errors.\nHowever, it will also mean that private data like encryption keys or account credentials might end up in the logfiles.") self.chkDetailedLogging.setChecked(self.tempdeacsmprefs["detailed_logging"]) self.chkDetailedLogging.toggled.connect(self.toggle_logging) layout.addWidget(self.chkDetailedLogging) - # Key shortcut Ctrl+Shift+D to remove authorization, just like in ADE. + # Key shortcut Ctrl+Shift+D / Cmd+Shift+D to remove authorization, just like in ADE. self.deauthShortcut = QShortcut(QKeySequence("Ctrl+Shift+D"), self) self.deauthShortcut.activated.connect(self.delete_ade_auth) diff --git a/calibre-plugin/getEncryptionKeyLinux.py b/calibre-plugin/getEncryptionKeyLinux.py index e078a24..684f531 100644 --- a/calibre-plugin/getEncryptionKeyLinux.py +++ b/calibre-plugin/getEncryptionKeyLinux.py @@ -49,7 +49,9 @@ def unfuck(user): if char not in hex_char_list: user_new.append(ord('x')) # This seems to be fallback code. - # Probably a bug in wine: We should also add "char" - but Wine doesn't either ... + # Subtract 1 so the next char (the one that's not a hex char) + # is handled normally. + i -= 1 else: ival = "" + chr(char) @@ -346,6 +348,8 @@ def CryptUnprotectDataExecuteWine(wineprefix, data, entropy): key_string = prog_output.decode("utf-8").split(':')[2] if verbose_logging: print("Successfully got encryption key from WINE: " + key_string) + #print("Debug log:") + #print(prog_stderr.decode("utf-8")) else: print("Successfully got encryption key from WINE.") master_key = bytes.fromhex(key_string)