diff --git a/Aaru.Core/Devices/Dumping/Dump.cs b/Aaru.Core/Devices/Dumping/Dump.cs
index df1fe385b..4954cf320 100644
--- a/Aaru.Core/Devices/Dumping/Dump.cs
+++ b/Aaru.Core/Devices/Dumping/Dump.cs
@@ -96,6 +96,8 @@ namespace Aaru.Core.Devices.Dumping
int _speedMultiplier;
bool _supportsPlextorD8;
bool _decryption;
+ bool _storeEncrypted;
+ bool _titleKeys;
/// Initializes dumpers
/// Should resume?
@@ -133,6 +135,8 @@ namespace Aaru.Core.Devices.Dumping
/// Number of maximum blocks to be read at once (can be overriden by database)
///
/// If decryption should be used.
+ /// Store encrypted data as is
+ /// Dump DVD CSS title keys
/// If MMC/SD does not support CMD23, use OS buffered reads instead of multiple single block
/// commands
///
@@ -143,7 +147,7 @@ namespace Aaru.Core.Devices.Dumping
bool fixOffset, bool debug, DumpSubchannel subchannel, int speed, bool @private,
bool fixSubchannelPosition, bool retrySubchannel, bool fixSubchannel, bool fixSubchannelCrc,
bool skipCdireadyHole, ErrorLog errorLog, bool generateSubchannels, uint maximumReadable,
- bool useBufferedReads, bool decryption)
+ bool useBufferedReads, bool decryption, bool storeEncrypted, bool titleKeys)
{
_doResume = doResume;
_dev = dev;
@@ -182,6 +186,8 @@ namespace Aaru.Core.Devices.Dumping
_generateSubchannels = generateSubchannels;
_useBufferedReads = useBufferedReads;
_decryption = decryption;
+ _storeEncrypted = storeEncrypted;
+ _titleKeys = titleKeys;
}
/// Starts dumping with the established fields and autodetecting the device type
diff --git a/Aaru/Commands/Media/Dump.cs b/Aaru/Commands/Media/Dump.cs
index 72ed736d6..32e55d210 100644
--- a/Aaru/Commands/Media/Dump.cs
+++ b/Aaru/Commands/Media/Dump.cs
@@ -289,6 +289,24 @@ namespace Aaru.Commands.Media
Required = false
});
+ Add(new Option(new[]
+ {
+ "--store-encrypted"
+ }, "Store encrypted data as is.")
+ {
+ Argument = new Argument(() => true),
+ Required = false
+ });
+
+ Add(new Option(new[]
+ {
+ "--title-keys"
+ }, "Try to read the title keys from CSS encrypted DVDs (very slow).")
+ {
+ Argument = new Argument(() => true),
+ Required = false
+ });
+
Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke)));
}
@@ -298,7 +316,8 @@ namespace Aaru.Commands.Media
uint skip, byte speed, bool stopOnError, string format, string subchannel,
bool @private, bool fixSubchannelPosition, bool retrySubchannel, bool fixSubchannel,
bool fixSubchannelCrc, bool generateSubchannels, bool skipCdiReadyHole, bool eject,
- uint maxBlocks, bool useBufferedReads, bool decryption)
+ uint maxBlocks, bool useBufferedReads, bool decryption, bool storeEncrypted,
+ bool titleKeys)
{
MainClass.PrintCopyright();
@@ -348,6 +367,8 @@ namespace Aaru.Commands.Media
AaruConsole.DebugWriteLine("Dump-Media command", "--eject={0}", eject);
AaruConsole.DebugWriteLine("Dump-Media command", "--max-blocks={0}", maxBlocks);
AaruConsole.DebugWriteLine("Dump-Media command", "--use-buffered-reads={0}", useBufferedReads);
+ AaruConsole.DebugWriteLine("Dump-Media command", "--store-encrypted={0}", storeEncrypted);
+ AaruConsole.DebugWriteLine("Dump-Media command", "--title-keys={0}", titleKeys);
// TODO: Disabled temporarily
//AaruConsole.DebugWriteLine("Dump-Media command", "--raw={0}", raw);
@@ -546,11 +567,12 @@ namespace Aaru.Commands.Media
return (int)ErrorNumber.InvalidResume;
}
- if(resumeClass != null &&
- resumeClass.NextBlock > resumeClass.LastBlock &&
- resumeClass.BadBlocks.Count == 0 &&
- !resumeClass.Tape &&
- (resumeClass.BadSubchannels is null || resumeClass.BadSubchannels.Count == 0))
+ if(resumeClass != null &&
+ resumeClass.NextBlock > resumeClass.LastBlock &&
+ resumeClass.BadBlocks.Count == 0 &&
+ !resumeClass.Tape &&
+ (resumeClass.BadSubchannels is null || resumeClass.BadSubchannels.Count == 0) &&
+ (resumeClass.MissingTitleKeys is null || resumeClass.MissingTitleKeys.Count == 0))
{
AaruConsole.WriteLine("Media already dumped correctly, not continuing...");
@@ -635,7 +657,7 @@ namespace Aaru.Commands.Media
firstPregap, fixOffset, debug, wantedSubchannel, speed, @private,
fixSubchannelPosition, retrySubchannel, fixSubchannel, fixSubchannelCrc,
skipCdiReadyHole, errorLog, generateSubchannels, maxBlocks, useBufferedReads,
- decryption);
+ decryption, storeEncrypted, titleKeys);
dumper.UpdateStatus += Progress.UpdateStatus;
dumper.ErrorMessage += Progress.ErrorMessage;