diff --git a/Aaru/Commands/Archive/Extract.cs b/Aaru/Commands/Archive/Extract.cs index 5084b8d55..ea03d008b 100644 --- a/Aaru/Commands/Archive/Extract.cs +++ b/Aaru/Commands/Archive/Extract.cs @@ -122,9 +122,9 @@ public static int Invoke(bool debug, bool verbose, string encoding, bool xattr Statistics.AddCommand("archive-extract"); AaruConsole.DebugWriteLine(MODULE_NAME, "--debug={0}", debug); - AaruConsole.DebugWriteLine(MODULE_NAME, "--encoding={0}", encoding); - AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", archivePath); - AaruConsole.DebugWriteLine(MODULE_NAME, "--output={0}", outputDir); + AaruConsole.DebugWriteLine(MODULE_NAME, "--encoding={0}", Markup.Escape(encoding ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", Markup.Escape(archivePath ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--output={0}", Markup.Escape(outputDir ?? "")); AaruConsole.DebugWriteLine(MODULE_NAME, "--verbose={0}", verbose); AaruConsole.DebugWriteLine(MODULE_NAME, "--xattrs={0}", xattrs); diff --git a/Aaru/Commands/Archive/Info.cs b/Aaru/Commands/Archive/Info.cs index 8d2e77ca1..e0e328c66 100644 --- a/Aaru/Commands/Archive/Info.cs +++ b/Aaru/Commands/Archive/Info.cs @@ -102,10 +102,10 @@ public static int Invoke(bool debug, bool verbose, string archivePath, string en Statistics.AddCommand("archive-info"); - AaruConsole.DebugWriteLine(MODULE_NAME, "--debug={0}", debug); - AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", archivePath); - AaruConsole.DebugWriteLine(MODULE_NAME, "--verbose={0}", verbose); - AaruConsole.DebugWriteLine(MODULE_NAME, "--encoding={0}", encoding); + AaruConsole.DebugWriteLine(MODULE_NAME, "debug={0}", debug); + AaruConsole.DebugWriteLine(MODULE_NAME, "input={0}", Markup.Escape(archivePath ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "verbose={0}", verbose); + AaruConsole.DebugWriteLine(MODULE_NAME, "encoding={0}", Markup.Escape(encoding ?? "")); IFilter inputFilter = null; diff --git a/Aaru/Commands/Archive/List.cs b/Aaru/Commands/Archive/List.cs index 082b3c1c2..ef02248b7 100644 --- a/Aaru/Commands/Archive/List.cs +++ b/Aaru/Commands/Archive/List.cs @@ -107,9 +107,9 @@ public static int Invoke(bool debug, bool verbose, string encoding, string archi } AaruConsole.DebugWriteLine(MODULE_NAME, "--debug={0}", debug); - AaruConsole.DebugWriteLine(MODULE_NAME, "--encoding={0}", encoding); + AaruConsole.DebugWriteLine(MODULE_NAME, "--encoding={0}", Markup.Escape(encoding ?? "")); AaruConsole.DebugWriteLine(MODULE_NAME, "--long-format={0}", longFormat); - AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", archivePath); + AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", Markup.Escape(archivePath ?? "")); AaruConsole.DebugWriteLine(MODULE_NAME, "--verbose={0}", verbose); Statistics.AddCommand("archive-list"); diff --git a/Aaru/Commands/Device/DeviceReport.cs b/Aaru/Commands/Device/DeviceReport.cs index 090f51a83..43ac6e5bf 100644 --- a/Aaru/Commands/Device/DeviceReport.cs +++ b/Aaru/Commands/Device/DeviceReport.cs @@ -114,7 +114,7 @@ public static int Invoke(bool debug, bool verbose, string devicePath, bool trapD Statistics.AddCommand("device-report"); AaruConsole.DebugWriteLine(MODULE_NAME, "--debug={0}", debug); - AaruConsole.DebugWriteLine(MODULE_NAME, "--device={0}", devicePath); + AaruConsole.DebugWriteLine(MODULE_NAME, "--device={0}", Markup.Escape(devicePath ?? "")); AaruConsole.DebugWriteLine(MODULE_NAME, "--verbose={0}", verbose); if(devicePath.Length == 2 && devicePath[1] == ':' && devicePath[0] != '/' && char.IsLetter(devicePath[0])) diff --git a/Aaru/Commands/Device/Info.cs b/Aaru/Commands/Device/Info.cs index c6f67ba93..2487ba6d0 100644 --- a/Aaru/Commands/Device/Info.cs +++ b/Aaru/Commands/Device/Info.cs @@ -119,8 +119,8 @@ public static int Invoke(bool debug, bool verbose, string devicePath, string out Statistics.AddCommand("device-info"); AaruConsole.DebugWriteLine(MODULE_NAME, "--debug={0}", debug); - AaruConsole.DebugWriteLine(MODULE_NAME, "--device={0}", devicePath); - AaruConsole.DebugWriteLine(MODULE_NAME, "--output-prefix={0}", outputPrefix); + AaruConsole.DebugWriteLine(MODULE_NAME, "--device={0}", Markup.Escape(devicePath ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--output-prefix={0}", Markup.Escape(outputPrefix ?? "")); AaruConsole.DebugWriteLine(MODULE_NAME, "--verbose={0}", verbose); if(devicePath.Length == 2 && devicePath[1] == ':' && devicePath[0] != '/' && char.IsLetter(devicePath[0])) diff --git a/Aaru/Commands/Filesystem/ExtractFiles.cs b/Aaru/Commands/Filesystem/ExtractFiles.cs index 2e6b42c79..60ebff528 100644 --- a/Aaru/Commands/Filesystem/ExtractFiles.cs +++ b/Aaru/Commands/Filesystem/ExtractFiles.cs @@ -131,10 +131,10 @@ public static int Invoke(bool debug, bool verbose, string encoding, b Statistics.AddCommand("extract-files"); AaruConsole.DebugWriteLine(MODULE_NAME, "--debug={0}", debug); - AaruConsole.DebugWriteLine(MODULE_NAME, "--encoding={0}", encoding); - AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", imagePath); - AaruConsole.DebugWriteLine(MODULE_NAME, "--options={0}", options); - AaruConsole.DebugWriteLine(MODULE_NAME, "--output={0}", outputDir); + AaruConsole.DebugWriteLine(MODULE_NAME, "--encoding={0}", Markup.Escape(encoding ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", Markup.Escape(imagePath ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--options={0}", Markup.Escape(options ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--output={0}", Markup.Escape(outputDir ?? "")); AaruConsole.DebugWriteLine(MODULE_NAME, "--verbose={0}", verbose); AaruConsole.DebugWriteLine(MODULE_NAME, "--xattrs={0}", xattrs); diff --git a/Aaru/Commands/Filesystem/Info.cs b/Aaru/Commands/Filesystem/Info.cs index 686445918..f54e635cc 100644 --- a/Aaru/Commands/Filesystem/Info.cs +++ b/Aaru/Commands/Filesystem/Info.cs @@ -115,9 +115,9 @@ public static int Invoke(bool verbose, bool debug, string encoding, bool files Statistics.AddCommand("fs-info"); AaruConsole.DebugWriteLine(MODULE_NAME, "--debug={0}", debug); - AaruConsole.DebugWriteLine(MODULE_NAME, "--encoding={0}", encoding); + AaruConsole.DebugWriteLine(MODULE_NAME, "--encoding={0}", Markup.Escape(encoding ?? "")); AaruConsole.DebugWriteLine(MODULE_NAME, "--filesystems={0}", filesystems); - AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", imagePath); + AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", Markup.Escape(imagePath ?? "")); AaruConsole.DebugWriteLine(MODULE_NAME, "--partitions={0}", partitions); AaruConsole.DebugWriteLine(MODULE_NAME, "--verbose={0}", verbose); diff --git a/Aaru/Commands/Filesystem/Ls.cs b/Aaru/Commands/Filesystem/Ls.cs index 8a8d4e5c7..60fc073e9 100644 --- a/Aaru/Commands/Filesystem/Ls.cs +++ b/Aaru/Commands/Filesystem/Ls.cs @@ -121,9 +121,9 @@ public static int Invoke(bool debug, bool verbose, string encoding, str } AaruConsole.DebugWriteLine(MODULE_NAME, "--debug={0}", debug); - AaruConsole.DebugWriteLine(MODULE_NAME, "--encoding={0}", encoding); - AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", imagePath); - AaruConsole.DebugWriteLine(MODULE_NAME, "--options={0}", options); + AaruConsole.DebugWriteLine(MODULE_NAME, "--encoding={0}", Markup.Escape(encoding ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", Markup.Escape(imagePath ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--options={0}", Markup.Escape(options ?? "")); AaruConsole.DebugWriteLine(MODULE_NAME, "--verbose={0}", verbose); Statistics.AddCommand("ls"); diff --git a/Aaru/Commands/Image/Checksum.cs b/Aaru/Commands/Image/Checksum.cs index 23759e343..0fc5dca79 100644 --- a/Aaru/Commands/Image/Checksum.cs +++ b/Aaru/Commands/Image/Checksum.cs @@ -157,7 +157,7 @@ public static int Invoke(bool debug, bool verbose, bool adler32, boo AaruConsole.DebugWriteLine(MODULE_NAME, "--debug={0}", debug); AaruConsole.DebugWriteLine(MODULE_NAME, "--fletcher16={0}", fletcher16); AaruConsole.DebugWriteLine(MODULE_NAME, "--fletcher32={0}", fletcher32); - AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", imagePath); + AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", Markup.Escape(imagePath ?? "")); AaruConsole.DebugWriteLine(MODULE_NAME, "--md5={0}", md5); AaruConsole.DebugWriteLine(MODULE_NAME, "--separated-tracks={0}", separatedTracks); AaruConsole.DebugWriteLine(MODULE_NAME, "--sha1={0}", sha1); diff --git a/Aaru/Commands/Image/Compare.cs b/Aaru/Commands/Image/Compare.cs index b073b7f06..3ec58cee3 100644 --- a/Aaru/Commands/Image/Compare.cs +++ b/Aaru/Commands/Image/Compare.cs @@ -110,8 +110,8 @@ public static int Invoke(bool debug, bool verbose, string imagePath1, string ima Statistics.AddCommand("compare"); AaruConsole.DebugWriteLine(MODULE_NAME, "--debug={0}", debug); - AaruConsole.DebugWriteLine(MODULE_NAME, "--input1={0}", imagePath1); - AaruConsole.DebugWriteLine(MODULE_NAME, "--input2={0}", imagePath2); + AaruConsole.DebugWriteLine(MODULE_NAME, "--input1={0}", Markup.Escape(imagePath1 ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--input2={0}", Markup.Escape(imagePath2 ?? "")); AaruConsole.DebugWriteLine(MODULE_NAME, "--verbose={0}", verbose); IFilter inputFilter1 = null; diff --git a/Aaru/Commands/Image/Convert.cs b/Aaru/Commands/Image/Convert.cs index f424a01de..3831dfa70 100644 --- a/Aaru/Commands/Image/Convert.cs +++ b/Aaru/Commands/Image/Convert.cs @@ -223,37 +223,37 @@ public static int Invoke(bool verbose, bool debug, string cicmXml, string comm Statistics.AddCommand("convert-image"); - AaruConsole.DebugWriteLine(MODULE_NAME, "--cicm-xml={0}", cicmXml); - AaruConsole.DebugWriteLine(MODULE_NAME, "--comments={0}", comments); - AaruConsole.DebugWriteLine(MODULE_NAME, "--count={0}", count); - AaruConsole.DebugWriteLine(MODULE_NAME, "--creator={0}", creator); - AaruConsole.DebugWriteLine(MODULE_NAME, "--debug={0}", debug); - AaruConsole.DebugWriteLine(MODULE_NAME, "--drive-manufacturer={0}", driveManufacturer); - AaruConsole.DebugWriteLine(MODULE_NAME, "--drive-model={0}", driveModel); - AaruConsole.DebugWriteLine(MODULE_NAME, "--drive-revision={0}", driveFirmwareRevision); - AaruConsole.DebugWriteLine(MODULE_NAME, "--drive-serial={0}", driveSerialNumber); - AaruConsole.DebugWriteLine(MODULE_NAME, "--force={0}", force); - AaruConsole.DebugWriteLine(MODULE_NAME, "--format={0}", format); - AaruConsole.DebugWriteLine(MODULE_NAME, "--geometry={0}", geometry); - AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", inputPath); - AaruConsole.DebugWriteLine(MODULE_NAME, "--media-barcode={0}", mediaBarcode); - AaruConsole.DebugWriteLine(MODULE_NAME, "--media-lastsequence={0}", lastMediaSequence); - AaruConsole.DebugWriteLine(MODULE_NAME, "--media-manufacturer={0}", mediaManufacturer); - AaruConsole.DebugWriteLine(MODULE_NAME, "--media-model={0}", mediaModel); - AaruConsole.DebugWriteLine(MODULE_NAME, "--media-partnumber={0}", mediaPartNumber); - AaruConsole.DebugWriteLine(MODULE_NAME, "--media-sequence={0}", mediaSequence); - AaruConsole.DebugWriteLine(MODULE_NAME, "--media-serial={0}", mediaSerialNumber); - AaruConsole.DebugWriteLine(MODULE_NAME, "--media-title={0}", mediaTitle); - AaruConsole.DebugWriteLine(MODULE_NAME, "--options={0}", options); - AaruConsole.DebugWriteLine(MODULE_NAME, "--output={0}", outputPath); - AaruConsole.DebugWriteLine(MODULE_NAME, "--resume-file={0}", resumeFile); - AaruConsole.DebugWriteLine(MODULE_NAME, "--verbose={0}", verbose); + AaruConsole.DebugWriteLine(MODULE_NAME, "--cicm-xml={0}", Markup.Escape(cicmXml ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--comments={0}", Markup.Escape(comments ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--count={0}", count); + AaruConsole.DebugWriteLine(MODULE_NAME, "--creator={0}", Markup.Escape(creator ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--debug={0}", debug); + AaruConsole.DebugWriteLine(MODULE_NAME, "--drive-manufacturer={0}", Markup.Escape(driveManufacturer ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--drive-model={0}", Markup.Escape(driveModel ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--drive-revision={0}", Markup.Escape(driveFirmwareRevision ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--drive-serial={0}", Markup.Escape(driveSerialNumber ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--force={0}", force); + AaruConsole.DebugWriteLine(MODULE_NAME, "--format={0}", Markup.Escape(format ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--geometry={0}", Markup.Escape(geometry ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", Markup.Escape(inputPath ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--media-barcode={0}", Markup.Escape(mediaBarcode ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--media-lastsequence={0}", lastMediaSequence); + AaruConsole.DebugWriteLine(MODULE_NAME, "--media-manufacturer={0}", Markup.Escape(mediaManufacturer ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--media-model={0}", Markup.Escape(mediaModel ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--media-partnumber={0}", Markup.Escape(mediaPartNumber ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--media-sequence={0}", mediaSequence); + AaruConsole.DebugWriteLine(MODULE_NAME, "--media-serial={0}", Markup.Escape(mediaSerialNumber ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--media-title={0}", Markup.Escape(mediaTitle ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--options={0}", Markup.Escape(options ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--output={0}", Markup.Escape(outputPath ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--resume-file={0}", Markup.Escape(resumeFile ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--verbose={0}", verbose); AaruConsole.DebugWriteLine(MODULE_NAME, "--fix-subchannel-position={0}", fixSubchannelPosition); - AaruConsole.DebugWriteLine(MODULE_NAME, "--fix-subchannel={0}", fixSubchannel); - AaruConsole.DebugWriteLine(MODULE_NAME, "--fix-subchannel-crc={0}", fixSubchannelCrc); - AaruConsole.DebugWriteLine(MODULE_NAME, "--generate-subchannels={0}", generateSubchannels); - AaruConsole.DebugWriteLine(MODULE_NAME, "--decrypt={0}", decrypt); - AaruConsole.DebugWriteLine(MODULE_NAME, "--aaru-metadata={0}", aaruMetadata); + AaruConsole.DebugWriteLine(MODULE_NAME, "--fix-subchannel={0}", fixSubchannel); + AaruConsole.DebugWriteLine(MODULE_NAME, "--fix-subchannel-crc={0}", fixSubchannelCrc); + AaruConsole.DebugWriteLine(MODULE_NAME, "--generate-subchannels={0}", generateSubchannels); + AaruConsole.DebugWriteLine(MODULE_NAME, "--decrypt={0}", decrypt); + AaruConsole.DebugWriteLine(MODULE_NAME, "--aaru-metadata={0}", Markup.Escape(aaruMetadata ?? "")); Dictionary parsedOptions = Core.Options.Parse(options); AaruConsole.DebugWriteLine(MODULE_NAME, UI.Parsed_options); diff --git a/Aaru/Commands/Image/CreateSidecar.cs b/Aaru/Commands/Image/CreateSidecar.cs index 80b8000b4..a650460ad 100644 --- a/Aaru/Commands/Image/CreateSidecar.cs +++ b/Aaru/Commands/Image/CreateSidecar.cs @@ -122,8 +122,8 @@ public static int Invoke(bool debug, bool verbose, uint blockSize, [CanBeN AaruConsole.DebugWriteLine(MODULE_NAME, "--block-size={0}", blockSize); AaruConsole.DebugWriteLine(MODULE_NAME, "--debug={0}", debug); - AaruConsole.DebugWriteLine(MODULE_NAME, "--encoding={0}", encodingName); - AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", imagePath); + AaruConsole.DebugWriteLine(MODULE_NAME, "--encoding={0}", Markup.Escape(encodingName ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", Markup.Escape(imagePath ?? "")); AaruConsole.DebugWriteLine(MODULE_NAME, "--tape={0}", tape); AaruConsole.DebugWriteLine(MODULE_NAME, "--verbose={0}", verbose); diff --git a/Aaru/Commands/Image/Decode.cs b/Aaru/Commands/Image/Decode.cs index a047172a6..8c0c765af 100644 --- a/Aaru/Commands/Image/Decode.cs +++ b/Aaru/Commands/Image/Decode.cs @@ -121,8 +121,8 @@ public static int Invoke(bool verbose, bool debug, bool diskTags, string imageP AaruConsole.DebugWriteLine(MODULE_NAME, "--debug={0}", debug); AaruConsole.DebugWriteLine(MODULE_NAME, "--disk-tags={0}", diskTags); - AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", imagePath); - AaruConsole.DebugWriteLine(MODULE_NAME, "--length={0}", length); + AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", Markup.Escape(imagePath ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--length={0}", Markup.Escape(length ?? "")); AaruConsole.DebugWriteLine(MODULE_NAME, "--sector-tags={0}", sectorTags); AaruConsole.DebugWriteLine(MODULE_NAME, "--start={0}", startSector); AaruConsole.DebugWriteLine(MODULE_NAME, "--verbose={0}", verbose); diff --git a/Aaru/Commands/Image/Entropy.cs b/Aaru/Commands/Image/Entropy.cs index 015dbe7da..a538cba57 100644 --- a/Aaru/Commands/Image/Entropy.cs +++ b/Aaru/Commands/Image/Entropy.cs @@ -114,7 +114,7 @@ public static int Invoke(bool debug, bool verbose, bool duplicatedSectors, strin AaruConsole.DebugWriteLine(MODULE_NAME, "--debug={0}", debug); AaruConsole.DebugWriteLine(MODULE_NAME, "--duplicated-sectors={0}", duplicatedSectors); - AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", imagePath); + AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", Markup.Escape(imagePath ?? "")); AaruConsole.DebugWriteLine(MODULE_NAME, "--separated-tracks={0}", separatedTracks); AaruConsole.DebugWriteLine(MODULE_NAME, "--verbose={0}", verbose); AaruConsole.DebugWriteLine(MODULE_NAME, "--whole-disc={0}", wholeDisc); diff --git a/Aaru/Commands/Image/Info.cs b/Aaru/Commands/Image/Info.cs index 601c3d048..3042bf5d0 100644 --- a/Aaru/Commands/Image/Info.cs +++ b/Aaru/Commands/Image/Info.cs @@ -95,7 +95,7 @@ public static int Invoke(bool debug, bool verbose, string imagePath) Statistics.AddCommand("image-info"); AaruConsole.DebugWriteLine(MODULE_NAME, "--debug={0}", debug); - AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", imagePath); + AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", Markup.Escape(imagePath ?? "")); AaruConsole.DebugWriteLine(MODULE_NAME, "--verbose={0}", verbose); IFilter inputFilter = null; diff --git a/Aaru/Commands/Image/Print.cs b/Aaru/Commands/Image/Print.cs index d7411a509..9a71deaaa 100644 --- a/Aaru/Commands/Image/Print.cs +++ b/Aaru/Commands/Image/Print.cs @@ -117,7 +117,7 @@ public static int Invoke(bool debug, bool verbose, string imagePath, ulong len Statistics.AddCommand("print-hex"); AaruConsole.DebugWriteLine(MODULE_NAME, "--debug={0}", debug); - AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", imagePath); + AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", Markup.Escape(imagePath ?? "")); AaruConsole.DebugWriteLine(MODULE_NAME, "--length={0}", length); AaruConsole.DebugWriteLine(MODULE_NAME, "--long-sectors={0}", longSectors); AaruConsole.DebugWriteLine(MODULE_NAME, "--start={0}", start); diff --git a/Aaru/Commands/Image/Verify.cs b/Aaru/Commands/Image/Verify.cs index 16e4d4128..b1371292a 100644 --- a/Aaru/Commands/Image/Verify.cs +++ b/Aaru/Commands/Image/Verify.cs @@ -123,7 +123,7 @@ public static int Invoke(bool debug, bool verbose, string imagePath, bool Statistics.AddCommand("verify"); AaruConsole.DebugWriteLine(MODULE_NAME, "--debug={0}", debug); - AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", imagePath); + AaruConsole.DebugWriteLine(MODULE_NAME, "--input={0}", Markup.Escape(imagePath ?? "")); AaruConsole.DebugWriteLine(MODULE_NAME, "--verbose={0}", verbose); AaruConsole.DebugWriteLine(MODULE_NAME, "--verify-disc={0}", verifyDisc); AaruConsole.DebugWriteLine(MODULE_NAME, "--verify-sectors={0}", verifySectors); diff --git a/Aaru/Commands/Media/Dump.cs b/Aaru/Commands/Media/Dump.cs index 88c871624..c22a6302a 100644 --- a/Aaru/Commands/Media/Dump.cs +++ b/Aaru/Commands/Media/Dump.cs @@ -274,17 +274,17 @@ public static int Invoke(bool debug, bool verbose, string cicmXml, string device Statistics.AddCommand("dump-media"); - AaruConsole.DebugWriteLine(MODULE_NAME, "--cicm-xml={0}", cicmXml); + AaruConsole.DebugWriteLine(MODULE_NAME, "--cicm-xml={0}", Markup.Escape(cicmXml ?? "")); AaruConsole.DebugWriteLine(MODULE_NAME, "--debug={0}", debug); - AaruConsole.DebugWriteLine(MODULE_NAME, "--device={0}", devicePath); - AaruConsole.DebugWriteLine(MODULE_NAME, "--encoding={0}", encoding); + AaruConsole.DebugWriteLine(MODULE_NAME, "--device={0}", Markup.Escape(devicePath ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--encoding={0}", Markup.Escape(encoding ?? "")); AaruConsole.DebugWriteLine(MODULE_NAME, "--first-pregap={0}", firstPregap); AaruConsole.DebugWriteLine(MODULE_NAME, "--fix-offset={0}", fixOffset); AaruConsole.DebugWriteLine(MODULE_NAME, "--force={0}", force); - AaruConsole.DebugWriteLine(MODULE_NAME, "--format={0}", format); + AaruConsole.DebugWriteLine(MODULE_NAME, "--format={0}", Markup.Escape(format ?? "")); AaruConsole.DebugWriteLine(MODULE_NAME, "--metadata={0}", metadata); - AaruConsole.DebugWriteLine(MODULE_NAME, "--options={0}", options); - AaruConsole.DebugWriteLine(MODULE_NAME, "--output={0}", outputPath); + AaruConsole.DebugWriteLine(MODULE_NAME, "--options={0}", Markup.Escape(options ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--output={0}", Markup.Escape(outputPath ?? "")); AaruConsole.DebugWriteLine(MODULE_NAME, "--persistent={0}", persistent); AaruConsole.DebugWriteLine(MODULE_NAME, "--resume={0}", resume); AaruConsole.DebugWriteLine(MODULE_NAME, "--retry-passes={0}", retryPasses); @@ -292,8 +292,8 @@ public static int Invoke(bool debug, bool verbose, string cicmXml, string device AaruConsole.DebugWriteLine(MODULE_NAME, "--stop-on-error={0}", stopOnError); AaruConsole.DebugWriteLine(MODULE_NAME, "--trim={0}", trim); AaruConsole.DebugWriteLine(MODULE_NAME, "--verbose={0}", verbose); - AaruConsole.DebugWriteLine(MODULE_NAME, "--subchannel={0}", subchannel); - AaruConsole.DebugWriteLine(MODULE_NAME, "--private={0}", @private); + AaruConsole.DebugWriteLine(MODULE_NAME, "--subchannel={0}", Markup.Escape(subchannel ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "----private={0}", @private); AaruConsole.DebugWriteLine(MODULE_NAME, "--fix-subchannel-position={0}", fixSubchannelPosition); AaruConsole.DebugWriteLine(MODULE_NAME, "--retry-subchannel={0}", retrySubchannel); AaruConsole.DebugWriteLine(MODULE_NAME, "--fix-subchannel={0}", fixSubchannel); @@ -308,10 +308,10 @@ public static int Invoke(bool debug, bool verbose, string cicmXml, string device AaruConsole.DebugWriteLine(MODULE_NAME, "--ignore-cdr-runouts={0}", ignoreCdrRunOuts); AaruConsole.DebugWriteLine(MODULE_NAME, "--create-graph={0}", createGraph); AaruConsole.DebugWriteLine(MODULE_NAME, "--dimensions={0}", dimensions); - AaruConsole.DebugWriteLine(MODULE_NAME, "--aaru-metadata={0}", aaruMetadata); + AaruConsole.DebugWriteLine(MODULE_NAME, "--aaru-metadata={0}", Markup.Escape(aaruMetadata ?? "")); // TODO: Disabled temporarily - //AaruConsole.DebugWriteLine(MODULE_NAME, "--raw={0}", raw); + //AaruConsole.DebugWriteLine(MODULE_NAME, "--raw={0}", Markup.Escape(raw ?? "")); Dictionary parsedOptions = Core.Options.Parse(options); AaruConsole.DebugWriteLine(MODULE_NAME, UI.Parsed_options); diff --git a/Aaru/Commands/Media/Info.cs b/Aaru/Commands/Media/Info.cs index ab03fdfc7..1002fea3d 100644 --- a/Aaru/Commands/Media/Info.cs +++ b/Aaru/Commands/Media/Info.cs @@ -119,10 +119,10 @@ public static int Invoke(bool debug, bool verbose, string devicePath, string out Statistics.AddCommand("media-info"); - AaruConsole.DebugWriteLine(MODULE_NAME, "--debug={0}", debug); - AaruConsole.DebugWriteLine(MODULE_NAME, "--device={0}", devicePath); - AaruConsole.DebugWriteLine(MODULE_NAME, "--output-prefix={0}", outputPrefix); - AaruConsole.DebugWriteLine(MODULE_NAME, "--verbose={0}", verbose); + AaruConsole.DebugWriteLine(MODULE_NAME, "debug={0}", debug); + AaruConsole.DebugWriteLine(MODULE_NAME, "device={0}", Markup.Escape(devicePath ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "output-prefix={0}", Markup.Escape(outputPrefix ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "verbose={0}", verbose); if(devicePath.Length == 2 && devicePath[1] == ':' && devicePath[0] != '/' && char.IsLetter(devicePath[0])) devicePath = "\\\\.\\" + char.ToUpper(devicePath[0]) + ':'; diff --git a/Aaru/Commands/Media/Scan.cs b/Aaru/Commands/Media/Scan.cs index 5bb753161..0ce0d20c8 100644 --- a/Aaru/Commands/Media/Scan.cs +++ b/Aaru/Commands/Media/Scan.cs @@ -114,9 +114,9 @@ public static int Invoke(bool debug, bool verbose, string devicePath, string ibg Statistics.AddCommand("media-scan"); AaruConsole.DebugWriteLine(MODULE_NAME, "--debug={0}", debug); - AaruConsole.DebugWriteLine(MODULE_NAME, "--device={0}", devicePath); - AaruConsole.DebugWriteLine(MODULE_NAME, "--ibg-log={0}", ibgLog); - AaruConsole.DebugWriteLine(MODULE_NAME, "--mhdd-log={0}", mhddLog); + AaruConsole.DebugWriteLine(MODULE_NAME, "--device={0}", Markup.Escape(devicePath ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--ibg-log={0}", Markup.Escape(ibgLog ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "--mhdd-log={0}", Markup.Escape(mhddLog ?? "")); AaruConsole.DebugWriteLine(MODULE_NAME, "--verbose={0}", verbose); AaruConsole.DebugWriteLine(MODULE_NAME, "--use-buffered-reads={0}", useBufferedReads); diff --git a/Aaru/Commands/Remote.cs b/Aaru/Commands/Remote.cs index 7375bd8f2..f6f501eff 100644 --- a/Aaru/Commands/Remote.cs +++ b/Aaru/Commands/Remote.cs @@ -95,9 +95,9 @@ public static int Invoke(bool debug, bool verbose, string host) Statistics.AddCommand("remote"); - AaruConsole.DebugWriteLine(MODULE_NAME, "--debug={0}", debug); - AaruConsole.DebugWriteLine(MODULE_NAME, "--host={0}", host); - AaruConsole.DebugWriteLine(MODULE_NAME, "--verbose={0}", verbose); + AaruConsole.DebugWriteLine(MODULE_NAME, "debug={0}", debug); + AaruConsole.DebugWriteLine(MODULE_NAME, "host={0}", Markup.Escape(host ?? "")); + AaruConsole.DebugWriteLine(MODULE_NAME, "verbose={0}", verbose); try {