mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
* LICENSE.LGPL: Added LICENSE files for LGPL and MIT licenses. * DiscImageChef.Devices/Enums.cs: * DiscImageChef.Partitions/MBR.cs: * DiscImageChef.Partitions/RDB.cs: * DiscImageChef.DiscImages/GDI.cs: * DiscImageChef.Partitions/Sun.cs: * DiscImageChef.DiscImages/VHD.cs: * DiscImageChef.Partitions/GPT.cs: * DiscImageChef.Filesystems/FFS.cs: * DiscImageChef.Filesystems/FAT.cs: * DiscImageChef.Partitions/NeXT.cs: * DiscImageChef.Devices/Command.cs: * DiscImageChef.DiscImages/Nero.cs: * DiscImageChef.Decoders/CD/PMA.cs: * DiscImageChef.Decoders/CD/TOC.cs: * DiscImageChef.Filesystems/BFS.cs: * DiscImageChef.Filesystems/ODS.cs: * DiscImageChef.Helpers/PrintHex.cs: * DiscImageChef.Helpers/Swapping.cs: * DiscImageChef.Decoders/DVD/PRI.cs: * DiscImageChef.Decoders/DVD/DMI.cs: * DiscImageChef.Decoders/DVD/DDS.cs: * DiscImageChef.Decoders/DVD/RMD.cs: * DiscImageChef.Decoders/DVD/UDI.cs: * DiscImageChef.Partitions/Atari.cs: * DiscImageChef.Decoders/DVD/BCA.cs: * DiscImageChef.Filesystems/SysV.cs: * DiscImageChef.Filesystems/HPFS.cs: * DiscImageChef.Filesystems/NTFS.cs: * DiscImageChef.Filesystems/APFS.cs: * DiscImageChef.Decoders/DVD/PFI.cs: * DiscImageChef.Decoders/CD/ATIP.cs: * DiscImageChef.Filesystems/Acorn.cs: * DiscImageChef.DiscImages/CDRWin.cs: * DiscImageChef.DiscImages/CDRDAO.cs: * DiscImageChef.Filesystems/BTRFS.cs: * DiscImageChef.Decoders/Xbox/DMI.cs: * DiscImageChef.Helpers/ArrayFill.cs: * DiscImageChef.Settings/Settings.cs: * DiscImageChef.Filesystems/Opera.cs: * DiscImageChef.Filesystems/extFS.cs: * DiscImageChef.Decoders/DVD/CPRM.cs: * DiscImageChef.Decoders/DVD/ADIP.cs: * DiscImageChef.Decoders/CD/Enums.cs: * DiscImageChef.Decoders/DVD/AACS.cs: * DiscImageChef.Decoders/SCSI/EVPD.cs: * DiscImageChef.Filesystems/ProDOS.cs: * DiscImageChef.Metadata/MediaType.cs: * DiscImageChef.Console/DicConsole.cs: * DiscImageChef.Decoders/DVD/Spare.cs: * DiscImageChef.Filesystems/ext2FS.cs: * DiscImageChef.Decoders/DVD/Enums.cs: * DiscImageChef.Filesystems/Symbian.cs: * DiscImageChef.Decoders/SCSI/Types.cs: * DiscImageChef.Filesystems/UNIXBFS.cs: * DiscImageChef.DiscImages/TeleDisk.cs: * DiscImageChef.Decoders/SCSI/Sense.cs: * DiscImageChef.Decoders/CD/FullTOC.cs: * DiscImageChef.Decoders/Blu-ray/DI.cs: * DiscImageChef.Decoders/ATA/Errors.cs: * DiscImageChef.Filesystems/ISO9660.cs: * DiscImageChef.Filesystems/MinixFS.cs: * DiscImageChef.Devices/Linux/Enums.cs: * DiscImageChef.Filesystems/SolarFS.cs: * DiscImageChef.Filesystems/Structs.cs: * DiscImageChef.DiscImages/Apple2MG.cs: * DiscImageChef.Decoders/SCSI/Modes.cs: * DiscImageChef.Metadata/Dimensions.cs: * DiscImageChef.Partitions/AppleMap.cs: * DiscImageChef.Decoders/Floppy/ISO.cs: * DiscImageChef.Decoders/DVD/Layers.cs: * DiscImageChef.Decoders/CD/Session.cs: * DiscImageChef.Decoders/SCSI/Enums.cs: * DiscImageChef.Filesystems/Nintendo.cs: * DiscImageChef.Helpers/DateHandlers.cs: * DiscImageChef.Filesystems/AmigaDOS.cs: * DiscImageChef.DiscImages/ImageInfo.cs: * DiscImageChef.Checksums/MD5Context.cs: * DiscImageChef.Devices/Linux/Extern.cs: * DiscImageChef.Filesystems/AppleHFS.cs: * DiscImageChef.Filesystems/AppleMFS.cs: * DiscImageChef.Helpers/ArrayIsEmpty.cs: * DiscImageChef.Decoders/Blu-ray/BCA.cs: * DiscImageChef.Decoders/Blu-ray/DDS.cs: * DiscImageChef.Filesystems/PCEngine.cs: * DiscImageChef.Decoders/ATA/Identify.cs: * DiscImageChef.Devices/Linux/Command.cs: * DiscImageChef.Devices/FreeBSD/Enums.cs: * DiscImageChef.Decoders/SCSI/Inquiry.cs: * DiscImageChef.Metadata/DeviceReport.cs: * DiscImageChef.Decoders/Floppy/Amiga.cs: * DiscImageChef.Devices/Linux/Structs.cs: * DiscImageChef.Devices/Windows/Enums.cs: * DiscImageChef.Decoders/DVD/CSS&CPRM.cs: * DiscImageChef.Checksums/SHA1Context.cs: * DiscImageChef.DiscImages/DiskCopy42.cs: * DiscImageChef.Partitions/PartPlugin.cs: * DiscImageChef.CommonTypes/Partition.cs: * DiscImageChef.Decoders/Floppy/Enums.cs: * DiscImageChef.CommonTypes/MediaType.cs: * DiscImageChef.Decoders/Floppy/Apple2.cs: * DiscImageChef.Devices/Windows/Extern.cs: * DiscImageChef.Decoders/SCSI/MMC/CPRM.cs: * DiscImageChef.Helpers/StringHandlers.cs: * DiscImageChef.DiscImages/ImagePlugin.cs: * DiscImageChef.Checksums/CRC64Context.cs: * DiscImageChef.Checksums/CRC32Context.cs: * DiscImageChef.DiscImages/ZZZRawImage.cs: * DiscImageChef.Checksums/CRC16Context.cs: * DiscImageChef.Filesystems/LisaFS/Dir.cs: * DiscImageChef.Decoders/DVD/Cartridge.cs: * DiscImageChef.Decoders/Blu-ray/Spare.cs: * DiscImageChef.Filesystems/Filesystem.cs: * DiscImageChef.Decoders/SCSI/MMC/AACS.cs: * DiscImageChef.Devices/FreeBSD/Extern.cs: * DiscImageChef.Devices/Device/Commands.cs: * DiscImageChef.Checksums/SHA384Context.cs: * DiscImageChef.Devices/FreeBSD/Command.cs: * DiscImageChef.Checksums/SHA512Context.cs: * DiscImageChef.Decoders/SCSI/MMC/Enums.cs: * DiscImageChef.Devices/Windows/Command.cs: * DiscImageChef.Devices/FreeBSD/Structs.cs: * DiscImageChef.Devices/Windows/Structs.cs: * DiscImageChef.Filesystems/LisaFS/Info.cs: * DiscImageChef.Checksums/SHA256Context.cs: * DiscImageChef.Filesystems/LisaFS/File.cs: * DiscImageChef.Filesystems/AppleHFSPlus.cs: * DiscImageChef.Filesystems/LisaFS/Super.cs: * DiscImageChef.Filesystems/LisaFS/Xattr.cs: * DiscImageChef.Checksums/Adler32Context.cs: * DiscImageChef.Decoders/Floppy/System34.cs: * DiscImageChef.Checksums/SpamSumContext.cs: * DiscImageChef.Decoders/SCSI/MMC/Hybrid.cs: * DiscImageChef.Devices/Device/Variables.cs: * DiscImageChef.Filesystems/LisaFS/Consts.cs: * DiscImageChef.Filesystems/LisaFS/LisaFS.cs: * DiscImageChef.Decoders/Floppy/Commodore.cs: * DiscImageChef.Checksums/FletcherContext.cs: * DiscImageChef.Filesystems/LisaFS/Extent.cs: * DiscImageChef.Devices/Device/Destructor.cs: * DiscImageChef.Decoders/Floppy/AppleSony.cs: * DiscImageChef.Filesystems/LisaFS/Structs.cs: * DiscImageChef.Decoders/SCSI/VendorString.cs: * DiscImageChef.Decoders/SCSI/MMC/Features.cs: * DiscImageChef.Devices/Device/Constructor.cs: * DiscImageChef.Checksums/RIPEMD160Context.cs: * DiscImageChef.Decoders/CD/CDTextOnLeadIn.cs: * DiscImageChef.Decoders/Blu-ray/Cartridge.cs: * DiscImageChef.Decoders/Floppy/System3740.cs: * DiscImageChef.Filesystems/LisaFS/Encoding.cs: * DiscImageChef.Decoders/SCSI/ModesEncoders.cs: * DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs: * DiscImageChef.Helpers/BigEndianBitConverter.cs: * DiscImageChef.Decoders/Floppy/Perpendicular.cs: * DiscImageChef.Decoders/SCSI/SSC/BlockLimits.cs: * DiscImageChef.Decoders/SCSI/MMC/WriteProtect.cs: * DiscImageChef.Devices/Device/ScsiCommands/HP.cs: * DiscImageChef.Devices/Device/AtaCommands/Cfa.cs: * DiscImageChef.Devices/Device/ScsiCommands/NEC.cs: * DiscImageChef.Helpers/EndianAwareBinaryReader.cs: * DiscImageChef.Devices/Device/ScsiCommands/MMC.cs: * DiscImageChef.Devices/Device/AtaCommands/MCPT.cs: * DiscImageChef.Devices/Device/ScsiCommands/SSC.cs: * DiscImageChef.Devices/Device/ScsiCommands/SPC.cs: * DiscImageChef.Devices/Device/ScsiCommands/SMC.cs: * DiscImageChef.Devices/Device/ScsiCommands/SBC.cs: * DiscImageChef.Metadata/Properties/AssemblyInfo.cs: * DiscImageChef.Devices/Device/AtaCommands/Atapi.cs: * DiscImageChef.Devices/Device/AtaCommands/Ata28.cs: * DiscImageChef.Devices/Device/AtaCommands/Smart.cs: * DiscImageChef.Decoders/SCSI/SSC/DensitySupport.cs: * DiscImageChef.Devices/Device/AtaCommands/Ata48.cs: * DiscImageChef.Decoders/SCSI/MMC/DiscInformation.cs: * DiscImageChef.Devices/Device/AtaCommands/AtaCHS.cs: * DiscImageChef.Devices/Device/ScsiCommands/SyQuest.cs: * DiscImageChef.Devices/Device/ScsiCommands/Plextor.cs: * DiscImageChef.Devices/Device/ScsiCommands/Plasmon.cs: * DiscImageChef.Devices/Device/ScsiCommands/Pioneer.cs: * DiscImageChef.Devices/Device/ScsiCommands/Adaptec.cs: * DiscImageChef.Devices/Device/ScsiCommands/Fujitsu.cs: * DiscImageChef.Devices/Device/ScsiCommands/HL-DT-ST.cs: * DiscImageChef.Devices/Device/ScsiCommands/Certance.cs: * DiscImageChef.Decoders/SCSI/DiscStructureCapabilities.cs: * DiscImageChef.Devices/Device/ScsiCommands/ArchiveCorp.cs: Relicensed as LGPL. Updated standard header. * DiscImageChef/Main.cs: * DiscImageChef/Plugins.cs: * DiscImageChef/Options.cs: * DiscImageChef/Commands/Ls.cs: * DiscImageChef/Core/IBGLog.cs: * DiscImageChef/Core/MHDDLog.cs: * DiscImageChef/AssemblyInfo.cs: * DiscImageChef/Core/Checksum.cs: * DiscImageChef/Commands/Decode.cs: * DiscImageChef/Core/Statistics.cs: * DiscImageChef/Commands/Verify.cs: * DiscImageChef/Commands/Formats.cs: * DiscImageChef/Commands/Entropy.cs: * DiscImageChef/Commands/Compare.cs: * DiscImageChef.Interop/DetectOS.cs: * DiscImageChef/Commands/Analyze.cs: * DiscImageChef/Commands/Commands.cs: * DiscImageChef/Commands/PrintHex.cs: * DiscImageChef/Commands/Checksum.cs: * DiscImageChef/DetectImageFormat.cs: * DiscImageChef/Commands/DumpMedia.cs: * DiscImageChef/Commands/Benchmark.cs: * DiscImageChef/Commands/Configure.cs: * DiscImageChef/Commands/MediaInfo.cs: * DiscImageChef.Interop/PlatformID.cs: * DiscImageChef/Commands/MediaScan.cs: * DiscImageChef/Commands/Statistics.cs: * DiscImageChef/Commands/DeviceInfo.cs: * DiscImageChef.Checksums/ReedSolomon.cs: * DiscImageChef/Commands/DeviceReport.cs: * DiscImageChef/Commands/ExtractFiles.cs: * DiscImageChef.Checksums/CDChecksums.cs: * DiscImageChef/Commands/CreateSidecar.cs: Updated standard header. * DiscImageChef.Checksums/DiscImageChef.Checksums.csproj: Relicensed project as LGPL. Updated standard header. Embed license as resource. * DiscImageChef.Console/DiscImageChef.Console.csproj: * DiscImageChef.Devices/DiscImageChef.Devices.csproj: * DiscImageChef.Helpers/DiscImageChef.Helpers.csproj: * DiscImageChef.Settings/DiscImageChef.Settings.csproj: * DiscImageChef.Decoders/DiscImageChef.Decoders.csproj: * DiscImageChef.Metadata/DiscImageChef.Metadata.csproj: * DiscImageChef.Partitions/DiscImageChef.Partitions.csproj: * DiscImageChef.DiscImages/DiscImageChef.DiscImages.csproj: * DiscImageChef.Filesystems/DiscImageChef.Filesystems.csproj: * DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj: Relicensed as LGPL. Updated standard header. Embed license as resource. * DiscImageChef/DiscImageChef.csproj: * DiscImageChef.Interop/DiscImageChef.Interop.csproj: Updated standard header. Embed license as resource.
346 lines
13 KiB
C#
346 lines
13 KiB
C#
// /***************************************************************************
|
|
// The Disc Image Chef
|
|
// ----------------------------------------------------------------------------
|
|
//
|
|
// Filename : Options.cs
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
//
|
|
// Component : Main program loop.
|
|
//
|
|
// --[ Description ] ----------------------------------------------------------
|
|
//
|
|
// Defines verbs and options.
|
|
//
|
|
// --[ License ] --------------------------------------------------------------
|
|
//
|
|
// This program is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as
|
|
// published by the Free Software Foundation, either version 3 of the
|
|
// License, or (at your option) any later version.
|
|
//
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
//
|
|
// ----------------------------------------------------------------------------
|
|
// Copyright © 2011-2016 Natalia Portillo
|
|
// ****************************************************************************/
|
|
|
|
using CommandLine;
|
|
|
|
namespace DiscImageChef
|
|
{
|
|
public abstract class CommonOptions
|
|
{
|
|
[Option('v', "verbose", Default = false, HelpText = "Shows verbose output")]
|
|
public bool Verbose { get; set; }
|
|
|
|
[Option('d', "debug", Default = false, HelpText = "Shows debug output from plugins")]
|
|
public bool Debug { get; set; }
|
|
}
|
|
|
|
[Verb("analyze", HelpText = "Analyzes a disc image and searches for partitions and/or filesystems.")]
|
|
public class AnalyzeOptions : CommonOptions
|
|
{
|
|
[Option('p', "partitions", Default = true,
|
|
HelpText = "Searches and interprets partitions.")]
|
|
public bool SearchForPartitions { get; set; }
|
|
|
|
[Option('f', "filesystems", Default = true,
|
|
HelpText = "Searches and interprets partitions.")]
|
|
public bool SearchForFilesystems { get; set; }
|
|
|
|
[Option('i', "input", Required = true, HelpText = "Disc image.")]
|
|
public string InputFile { get; set; }
|
|
}
|
|
|
|
[Verb("compare", HelpText = "Compares two disc images.")]
|
|
public class CompareOptions : CommonOptions
|
|
{
|
|
[Option("input1", Required = true, HelpText = "First disc image.")]
|
|
public string InputFile1 { get; set; }
|
|
|
|
[Option("input2", Required = true, HelpText = "Second disc image.")]
|
|
public string InputFile2 { get; set; }
|
|
}
|
|
|
|
[Verb("checksum", HelpText = "Checksums an image.")]
|
|
public class ChecksumOptions : CommonOptions
|
|
{
|
|
[Option('t', "separated-tracks", Default = true,
|
|
HelpText = "Checksums each track separately.")]
|
|
public bool SeparatedTracks { get; set; }
|
|
|
|
[Option('w', "whole-disc", Default = true,
|
|
HelpText = "Checksums the whole disc.")]
|
|
public bool WholeDisc { get; set; }
|
|
|
|
[Option('a', "adler32", Default = true,
|
|
HelpText = "Calculates Adler-32.")]
|
|
public bool DoAdler32 { get; set; }
|
|
|
|
[Option("crc16", Default = true,
|
|
HelpText = "Calculates CRC16.")]
|
|
public bool DoCRC16 { get; set; }
|
|
|
|
[Option('c', "crc32", Default = true,
|
|
HelpText = "Calculates CRC32.")]
|
|
public bool DoCRC32 { get; set; }
|
|
|
|
[Option("crc64", Default = false,
|
|
HelpText = "Calculates CRC64 (ECMA).")]
|
|
public bool DoCRC64 { get; set; }
|
|
|
|
/*[Option("fletcher16", Default = false,
|
|
HelpText = "Calculates Fletcher-16.")]
|
|
public bool DoFletcher16 { get; set; }
|
|
|
|
[Option("fletcher32", Default = false,
|
|
HelpText = "Calculates Fletcher-32.")]
|
|
public bool DoFletcher32 { get; set; }*/
|
|
|
|
[Option('m', "md5", Default = true,
|
|
HelpText = "Calculates MD5.")]
|
|
public bool DoMD5 { get; set; }
|
|
|
|
[Option("ripemd160", Default = false,
|
|
HelpText = "Calculates RIPEMD160.")]
|
|
public bool DoRIPEMD160 { get; set; }
|
|
|
|
[Option('s', "sha1", Default = true,
|
|
HelpText = "Calculates SHA1.")]
|
|
public bool DoSHA1 { get; set; }
|
|
|
|
[Option("sha256", Default = false,
|
|
HelpText = "Calculates SHA256.")]
|
|
public bool DoSHA256 { get; set; }
|
|
|
|
[Option("sha384", Default = false,
|
|
HelpText = "Calculates SHA384.")]
|
|
public bool DoSHA384 { get; set; }
|
|
|
|
[Option("sha512", Default = false,
|
|
HelpText = "Calculates SHA512.")]
|
|
public bool DoSHA512 { get; set; }
|
|
|
|
[Option('f', "spamsum", Default = true,
|
|
HelpText = "Calculates SpamSum fuzzy hash.")]
|
|
public bool DoSpamSum { get; set; }
|
|
|
|
[Option('i', "input", Required = true, HelpText = "Disc image.")]
|
|
public string InputFile { get; set; }
|
|
}
|
|
|
|
[Verb("entropy", HelpText = "Calculates entropy and/or duplicated sectors of an image.")]
|
|
public class EntropyOptions : CommonOptions
|
|
{
|
|
[Option('p', "duplicated-sectors", Default = true,
|
|
HelpText = "Calculates how many sectors are duplicated (have same exact data in user area).")]
|
|
public bool DuplicatedSectors { get; set; }
|
|
|
|
[Option('t', "separated-tracks", Default = true,
|
|
HelpText = "Calculates entropy for each track separately.")]
|
|
public bool SeparatedTracks { get; set; }
|
|
|
|
[Option('w', "whole-disc", Default = true,
|
|
HelpText = "Calculates entropy for the whole disc.")]
|
|
public bool WholeDisc { get; set; }
|
|
|
|
[Option('i', "input", Required = true, HelpText = "Disc image.")]
|
|
public string InputFile { get; set; }
|
|
}
|
|
|
|
[Verb("verify", HelpText = "Verifies a disc image integrity, and if supported, sector integrity.")]
|
|
public class VerifyOptions : CommonOptions
|
|
{
|
|
[Option('w', "verify-disc", Default = true,
|
|
HelpText = "Verify disc image if supported.")]
|
|
public bool VerifyDisc { get; set; }
|
|
|
|
[Option('s', "verify-sectors", Default = true,
|
|
HelpText = "Verify all sectors if supported.")]
|
|
public bool VerifySectors { get; set; }
|
|
|
|
[Option('i', "input", Required = true, HelpText = "Disc image.")]
|
|
public string InputFile { get; set; }
|
|
}
|
|
|
|
[Verb("printhex", HelpText = "Prints a sector, in hexadecimal values, to the console.")]
|
|
public class PrintHexOptions : CommonOptions
|
|
{
|
|
[Option('s', "start", Required = true,
|
|
HelpText = "Start sector.")]
|
|
public ulong StartSector { get; set; }
|
|
|
|
[Option('l', "length", Default = (ulong)1,
|
|
HelpText = "How many sectors to print.")]
|
|
public ulong Length { get; set; }
|
|
|
|
[Option('r', "long-sectors", Default = false,
|
|
HelpText = "Print sectors with tags included.")]
|
|
public bool LongSectors { get; set; }
|
|
|
|
[Option('w', "width", Default = (ushort)32,
|
|
HelpText = "How many bytes to print per line.")]
|
|
public ushort WidthBytes { get; set; }
|
|
|
|
[Option('i', "input", Required = true, HelpText = "Disc image.")]
|
|
public string InputFile { get; set; }
|
|
}
|
|
|
|
[Verb("decode", HelpText = "Decodes and pretty prints disk and/or sector tags.")]
|
|
public class DecodeOptions : CommonOptions
|
|
{
|
|
[Option('s', "start", Default = (ulong)0,
|
|
HelpText = "Start sector.")]
|
|
public ulong StartSector { get; set; }
|
|
|
|
[Option('l', "length", Default = "all",
|
|
HelpText = "How many sectors to decode, or \"all\".")]
|
|
public string Length { get; set; }
|
|
|
|
[Option('k', "disk-tags", Default = true,
|
|
HelpText = "Decode disk tags.")]
|
|
public bool DiskTags { get; set; }
|
|
|
|
[Option('t', "sector-tags", Default = true,
|
|
HelpText = "Decode sector tags.")]
|
|
public bool SectorTags { get; set; }
|
|
|
|
[Option('i', "input", Required = true, HelpText = "Disc image.")]
|
|
public string InputFile { get; set; }
|
|
}
|
|
|
|
[Verb("device-info", HelpText = "Gets information about a device.")]
|
|
public class DeviceInfoOptions : CommonOptions
|
|
{
|
|
[Option('i', "device", Required = true, HelpText = "Device path.")]
|
|
public string DevicePath { get; set; }
|
|
|
|
[Option('w', "output-prefix", Required = false, Default = "", HelpText = "Write binary responses from device with that prefix.")]
|
|
public string OutputPrefix { get; set; }
|
|
}
|
|
|
|
[Verb("media-info", HelpText = "Gets information about the media inserted on a device.")]
|
|
public class MediaInfoOptions : CommonOptions
|
|
{
|
|
[Option('i', "device", Required = true, HelpText = "Device path.")]
|
|
public string DevicePath { get; set; }
|
|
|
|
[Option('w', "output-prefix", Required = false, Default = "", HelpText = "Write binary responses from device with that prefix.")]
|
|
public string OutputPrefix { get; set; }
|
|
}
|
|
|
|
[Verb("media-scan", HelpText = "Scans the media inserted on a device.")]
|
|
public class MediaScanOptions : CommonOptions
|
|
{
|
|
[Option('i', "device", Required = true, HelpText = "Device path.")]
|
|
public string DevicePath { get; set; }
|
|
|
|
[Option('m', "mhdd-log", Required = false, Default = "", HelpText = "Write a log of the scan in the format used by MHDD.")]
|
|
public string MHDDLogPath { get; set; }
|
|
|
|
[Option('b', "ibg-log", Required = false, Default = "", HelpText = "Write a log of the scan in the format used by ImgBurn.")]
|
|
public string IBGLogPath { get; set; }
|
|
}
|
|
|
|
[Verb("formats", HelpText = "Lists all supported disc images, partition schemes and file systems.")]
|
|
public class FormatsOptions : CommonOptions
|
|
{
|
|
}
|
|
|
|
[Verb("benchmark", HelpText = "Benchmarks hashing and entropy calculation.")]
|
|
public class BenchmarkOptions : CommonOptions
|
|
{
|
|
[Option('b', "block-size", Required = false, Default = (int)512, HelpText = "Block size.")]
|
|
public int BlockSize { get; set; }
|
|
|
|
[Option('s', "buffer-size", Required = false, Default = (int)128, HelpText = "Buffer size in mebibytes.")]
|
|
public int BufferSize { get; set; }
|
|
}
|
|
|
|
[Verb("create-sidecar", HelpText = "Creates CICM Metadata XML sidecar.")]
|
|
public class CreateSidecarOptions : CommonOptions
|
|
{
|
|
[Option('i', "input", Required = true, HelpText = "Disc image.")]
|
|
public string InputFile { get; set; }
|
|
}
|
|
|
|
[Verb("dump-media", HelpText = "Dumps the media inserted on a device to a media image.")]
|
|
public class DumpMediaOptions : CommonOptions
|
|
{
|
|
[Option('i', "device", Required = true, HelpText = "Device path.")]
|
|
public string DevicePath { get; set; }
|
|
|
|
[Option('w', "output-prefix", Required = true, HelpText = "Prefix for media dump.")]
|
|
public string OutputPrefix { get; set; }
|
|
|
|
[Option('r', "raw", Default = false,
|
|
HelpText = "Print sectors with tags included.")]
|
|
public bool Raw { get; set; }
|
|
|
|
[Option('s', "stop-on-error", Default = false,
|
|
HelpText = "Stop media dump on first error.")]
|
|
public bool StopOnError { get; set; }
|
|
|
|
[Option('f', "force", Default = false,
|
|
HelpText = "Continue dump whatever happens.")]
|
|
public bool Force { get; set; }
|
|
|
|
[Option('p', "retry-passes", Default = (ushort)5,
|
|
HelpText = "How many retry passes to do.")]
|
|
public ushort RetryPasses { get; set; }
|
|
|
|
[Option("persistent", Default = false,
|
|
HelpText = "Try to recover partial or incorrect data.")]
|
|
public bool Persistent { get; set; }
|
|
|
|
}
|
|
|
|
[Verb("device-report", HelpText = "Tests the device capabilities and creates an XML report of them.")]
|
|
public class DeviceReportOptions : CommonOptions
|
|
{
|
|
[Option('i', "device", Required = true, HelpText = "Device path.")]
|
|
public string DevicePath { get; set; }
|
|
}
|
|
|
|
[Verb("configure", HelpText = "Configures user settings and statistics.")]
|
|
public class ConfigureOptions
|
|
{
|
|
}
|
|
|
|
[Verb("stats", HelpText = "Shows statistics.")]
|
|
public class StatsOptions
|
|
{
|
|
}
|
|
|
|
[Verb("ls", HelpText = "Lists files in disc image.")]
|
|
public class LsOptions : CommonOptions
|
|
{
|
|
[Option('i', "input", Required = true, HelpText = "Disc image.")]
|
|
public string InputFile { get; set; }
|
|
|
|
[Option('l', "long", Default = false, HelpText = "Uses long format.")]
|
|
public bool Long { get; set; }
|
|
}
|
|
|
|
[Verb("extract-files", HelpText = "Extracts all files in disc image.")]
|
|
public class ExtractFilesOptions : CommonOptions
|
|
{
|
|
[Option('i', "input", Required = true, HelpText = "Disc image.")]
|
|
public string InputFile { get; set; }
|
|
|
|
[Option('o', "output", Required = true, HelpText = "Directory where extracted files will be created. Will abort if it exists.")]
|
|
public string OutputDir { get; set; }
|
|
|
|
[Option('x', "xattrs", Default = false, HelpText = "Extract extended attributes if present.")]
|
|
public bool Xattrs { get; set; }
|
|
}
|
|
|
|
}
|
|
|