From 6db3a8fbf3aff5ef74f010363aef05fbe3ef1a0f Mon Sep 17 00:00:00 2001 From: MBucari Date: Mon, 17 Apr 2023 16:01:20 -0600 Subject: [PATCH 1/2] Use old activation bytes if present. --- Source/AaxDecrypter/AaxcDownloadConvertBase.cs | 6 +++++- Source/AaxDecrypter/AudiobookDownloadBase.cs | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/AaxDecrypter/AaxcDownloadConvertBase.cs b/Source/AaxDecrypter/AaxcDownloadConvertBase.cs index 1b309e59..3975e8af 100644 --- a/Source/AaxDecrypter/AaxcDownloadConvertBase.cs +++ b/Source/AaxDecrypter/AaxcDownloadConvertBase.cs @@ -32,7 +32,11 @@ namespace AaxDecrypter protected bool Step_GetMetadata() { AaxFile = new AaxFile(InputFileStream); - AaxFile.SetDecryptionKey(DownloadOptions.AudibleKey, DownloadOptions.AudibleIV); + + if (DownloadOptions.AudibleKey?.Length == 8 && DownloadOptions.AudibleIV is null) + AaxFile.SetDecryptionKey(DownloadOptions.AudibleKey); + else + AaxFile.SetDecryptionKey(DownloadOptions.AudibleKey, DownloadOptions.AudibleIV); if (DownloadOptions.StripUnabridged) { diff --git a/Source/AaxDecrypter/AudiobookDownloadBase.cs b/Source/AaxDecrypter/AudiobookDownloadBase.cs index 9f8bb535..91883c09 100644 --- a/Source/AaxDecrypter/AudiobookDownloadBase.cs +++ b/Source/AaxDecrypter/AudiobookDownloadBase.cs @@ -182,7 +182,6 @@ namespace AaxDecrypter FileUtility.SaferDelete(jsonDownloadState); if (!string.IsNullOrEmpty(DownloadOptions.AudibleKey) && - !string.IsNullOrEmpty(DownloadOptions.AudibleIV) && DownloadOptions.RetainEncryptedFile) { string aaxPath = Path.ChangeExtension(tempFilePath, ".aax"); From fe534b335bf064bce2b224b627835912abee068b Mon Sep 17 00:00:00 2001 From: MBucari Date: Mon, 17 Apr 2023 19:32:52 -0600 Subject: [PATCH 2/2] Update dependencies --- Source/AudibleUtilities/AudibleUtilities.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/AudibleUtilities/AudibleUtilities.csproj b/Source/AudibleUtilities/AudibleUtilities.csproj index bcce3a37..71c92eda 100644 --- a/Source/AudibleUtilities/AudibleUtilities.csproj +++ b/Source/AudibleUtilities/AudibleUtilities.csproj @@ -5,7 +5,7 @@ - +