mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
REFACTOR: Reformat code.
This commit is contained in:
@@ -46,12 +46,10 @@ namespace DiscImageChef
|
||||
[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.")]
|
||||
[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.")]
|
||||
[Option('f', "filesystems", Default = true, HelpText = "Searches and interprets partitions.")]
|
||||
public bool SearchForFilesystems { get; set; }
|
||||
|
||||
[Option('i', "input", Required = true, HelpText = "Disc image.")]
|
||||
@@ -74,28 +72,22 @@ namespace DiscImageChef
|
||||
[Verb("checksum", HelpText = "Checksums an image.")]
|
||||
public class ChecksumOptions : CommonOptions
|
||||
{
|
||||
[Option('t', "separated-tracks", Default = true,
|
||||
HelpText = "Checksums each track separately.")]
|
||||
[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.")]
|
||||
[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.")]
|
||||
[Option('a', "adler32", Default = true, HelpText = "Calculates Adler-32.")]
|
||||
public bool DoAdler32 { get; set; }
|
||||
|
||||
[Option("crc16", Default = true,
|
||||
HelpText = "Calculates CRC16.")]
|
||||
[Option("crc16", Default = true, HelpText = "Calculates CRC16.")]
|
||||
public bool DoCRC16 { get; set; }
|
||||
|
||||
[Option('c', "crc32", Default = true,
|
||||
HelpText = "Calculates CRC32.")]
|
||||
[Option('c', "crc32", Default = true, HelpText = "Calculates CRC32.")]
|
||||
public bool DoCRC32 { get; set; }
|
||||
|
||||
[Option("crc64", Default = false,
|
||||
HelpText = "Calculates CRC64 (ECMA).")]
|
||||
[Option("crc64", Default = false, HelpText = "Calculates CRC64 (ECMA).")]
|
||||
public bool DoCRC64 { get; set; }
|
||||
|
||||
/*[Option("fletcher16", Default = false,
|
||||
@@ -106,32 +98,25 @@ namespace DiscImageChef
|
||||
HelpText = "Calculates Fletcher-32.")]
|
||||
public bool DoFletcher32 { get; set; }*/
|
||||
|
||||
[Option('m', "md5", Default = true,
|
||||
HelpText = "Calculates MD5.")]
|
||||
[Option('m', "md5", Default = true, HelpText = "Calculates MD5.")]
|
||||
public bool DoMD5 { get; set; }
|
||||
|
||||
[Option("ripemd160", Default = false,
|
||||
HelpText = "Calculates RIPEMD160.")]
|
||||
[Option("ripemd160", Default = false, HelpText = "Calculates RIPEMD160.")]
|
||||
public bool DoRIPEMD160 { get; set; }
|
||||
|
||||
[Option('s', "sha1", Default = true,
|
||||
HelpText = "Calculates SHA1.")]
|
||||
[Option('s', "sha1", Default = true, HelpText = "Calculates SHA1.")]
|
||||
public bool DoSHA1 { get; set; }
|
||||
|
||||
[Option("sha256", Default = false,
|
||||
HelpText = "Calculates SHA256.")]
|
||||
[Option("sha256", Default = false, HelpText = "Calculates SHA256.")]
|
||||
public bool DoSHA256 { get; set; }
|
||||
|
||||
[Option("sha384", Default = false,
|
||||
HelpText = "Calculates SHA384.")]
|
||||
[Option("sha384", Default = false, HelpText = "Calculates SHA384.")]
|
||||
public bool DoSHA384 { get; set; }
|
||||
|
||||
[Option("sha512", Default = false,
|
||||
HelpText = "Calculates SHA512.")]
|
||||
[Option("sha512", Default = false, HelpText = "Calculates SHA512.")]
|
||||
public bool DoSHA512 { get; set; }
|
||||
|
||||
[Option('f', "spamsum", Default = true,
|
||||
HelpText = "Calculates SpamSum fuzzy hash.")]
|
||||
[Option('f', "spamsum", Default = true, HelpText = "Calculates SpamSum fuzzy hash.")]
|
||||
public bool DoSpamSum { get; set; }
|
||||
|
||||
[Option('i', "input", Required = true, HelpText = "Disc image.")]
|
||||
@@ -145,12 +130,10 @@ namespace DiscImageChef
|
||||
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.")]
|
||||
[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.")]
|
||||
[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.")]
|
||||
@@ -160,12 +143,10 @@ namespace DiscImageChef
|
||||
[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.")]
|
||||
[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.")]
|
||||
[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.")]
|
||||
@@ -175,20 +156,16 @@ namespace DiscImageChef
|
||||
[Verb("printhex", HelpText = "Prints a sector, in hexadecimal values, to the console.")]
|
||||
public class PrintHexOptions : CommonOptions
|
||||
{
|
||||
[Option('s', "start", Required = true,
|
||||
HelpText = "Start sector.")]
|
||||
[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.")]
|
||||
[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.")]
|
||||
[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.")]
|
||||
[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.")]
|
||||
@@ -198,20 +175,16 @@ namespace DiscImageChef
|
||||
[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.")]
|
||||
[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\".")]
|
||||
[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.")]
|
||||
[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.")]
|
||||
[Option('t', "sector-tags", Default = true, HelpText = "Decode sector tags.")]
|
||||
public bool SectorTags { get; set; }
|
||||
|
||||
[Option('i', "input", Required = true, HelpText = "Disc image.")]
|
||||
@@ -224,7 +197,8 @@ namespace DiscImageChef
|
||||
[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.")]
|
||||
[Option('w', "output-prefix", Required = false, Default = "",
|
||||
HelpText = "Write binary responses from device with that prefix.")]
|
||||
public string OutputPrefix { get; set; }
|
||||
}
|
||||
|
||||
@@ -234,7 +208,8 @@ namespace DiscImageChef
|
||||
[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.")]
|
||||
[Option('w', "output-prefix", Required = false, Default = "",
|
||||
HelpText = "Write binary responses from device with that prefix.")]
|
||||
public string OutputPrefix { get; set; }
|
||||
}
|
||||
|
||||
@@ -244,17 +219,17 @@ namespace DiscImageChef
|
||||
[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.")]
|
||||
[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.")]
|
||||
[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
|
||||
{
|
||||
}
|
||||
public class FormatsOptions : CommonOptions { }
|
||||
|
||||
[Verb("benchmark", HelpText = "Benchmarks hashing and entropy calculation.")]
|
||||
public class BenchmarkOptions : CommonOptions
|
||||
@@ -271,9 +246,13 @@ namespace DiscImageChef
|
||||
{
|
||||
[Option('i', "input", Required = true, HelpText = "Disc image.")]
|
||||
public string InputFile { get; set; }
|
||||
[Option('t', "tape", Required = false, Default = false, HelpText = "When used indicates that input is a folder containing alphabetically sorted files extracted from a linear block-based tape with fixed block size (e.g. a SCSI tape device).")]
|
||||
[Option('t', "tape", Required = false, Default = false,
|
||||
HelpText =
|
||||
"When used indicates that input is a folder containing alphabetically sorted files extracted from a linear block-based tape with fixed block size (e.g. a SCSI tape device).")]
|
||||
public bool Tape { get; set; }
|
||||
[Option('b', "block-size", Required = false, Default = 512, HelpText = "Only used for tapes, indicates block size. Files in the folder whose size is not a multiple of this value will simply be ignored.")]
|
||||
[Option('b', "block-size", Required = false, Default = 512,
|
||||
HelpText =
|
||||
"Only used for tapes, indicates block size. Files in the folder whose size is not a multiple of this value will simply be ignored.")]
|
||||
public int BlockSize { get; set; }
|
||||
|
||||
[Option('e', "encoding", Default = null, HelpText = "Name of character encoding to use.")]
|
||||
@@ -293,28 +272,23 @@ namespace DiscImageChef
|
||||
HelpText = "Dump sectors with tags included. For optical media, dump scrambled sectors")]
|
||||
public bool Raw { get; set; }
|
||||
|
||||
[Option('s', "stop-on-error", Default = false,
|
||||
HelpText = "Stop media dump on first error.")]
|
||||
[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.")]
|
||||
[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.")]
|
||||
[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.")]
|
||||
[Option("persistent", Default = false, HelpText = "Try to recover partial or incorrect data.")]
|
||||
public bool Persistent { get; set; }
|
||||
|
||||
[Option("separate-subchannel", Default = false,
|
||||
HelpText = "Save subchannel in a separate file. Only applicable to CD/DDCD/GD.")]
|
||||
HelpText = "Save subchannel in a separate file. Only applicable to CD/DDCD/GD.")]
|
||||
public bool SeparateSubchannel { get; set; }
|
||||
|
||||
[Option('m', "resume", Default = true,
|
||||
HelpText = "Create/use resume mapfile.")]
|
||||
[Option('m', "resume", Default = true, HelpText = "Create/use resume mapfile.")]
|
||||
public bool Resume { get; set; }
|
||||
|
||||
[Option("lead-in", Default = false, HelpText = "Try to read lead-in. Only applicable to CD/DDCD/GD.")]
|
||||
@@ -332,14 +306,10 @@ namespace DiscImageChef
|
||||
}
|
||||
|
||||
[Verb("configure", HelpText = "Configures user settings and statistics.")]
|
||||
public class ConfigureOptions
|
||||
{
|
||||
}
|
||||
public class ConfigureOptions { }
|
||||
|
||||
[Verb("stats", HelpText = "Shows statistics.")]
|
||||
public class StatsOptions
|
||||
{
|
||||
}
|
||||
public class StatsOptions { }
|
||||
|
||||
[Verb("ls", HelpText = "Lists files in disc image.")]
|
||||
public class LsOptions : CommonOptions
|
||||
@@ -360,7 +330,8 @@ namespace DiscImageChef
|
||||
[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.")]
|
||||
[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.")]
|
||||
@@ -371,13 +342,8 @@ namespace DiscImageChef
|
||||
}
|
||||
|
||||
[Verb("list-devices", HelpText = "Lists all connected devices.")]
|
||||
public class ListDevicesOptions : CommonOptions
|
||||
{
|
||||
}
|
||||
public class ListDevicesOptions : CommonOptions { }
|
||||
|
||||
[Verb("list-encodings", HelpText = "Lists all supported text encodings and code pages.")]
|
||||
public class ListEncodingsOptions : CommonOptions
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class ListEncodingsOptions : CommonOptions { }
|
||||
}
|
||||
Reference in New Issue
Block a user