mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-09-22 06:45:03 +00:00
Add flag for SafeGetFiles
This commit is contained in:
@@ -29,11 +29,17 @@ namespace ProtectionScan
|
||||
/// Scan file contents during protection scanning
|
||||
/// </summary>
|
||||
public bool ScanContents { get; private set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Scan file paths during protection scanning
|
||||
/// </summary>
|
||||
public bool ScanPaths { get; private set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Scan subdirectories during protection scanning
|
||||
/// </summary>
|
||||
public bool ScanSubdirectories { get; set; } = true;
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
@@ -74,11 +80,16 @@ namespace ProtectionScan
|
||||
options.ScanContents = false;
|
||||
break;
|
||||
|
||||
case "-ns":
|
||||
case "-np":
|
||||
case "--no-paths":
|
||||
options.ScanPaths = false;
|
||||
break;
|
||||
|
||||
case "-ns":
|
||||
case "--no-subdirs":
|
||||
options.ScanSubdirectories = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
options.InputPaths.Add(arg);
|
||||
break;
|
||||
@@ -109,7 +120,8 @@ namespace ProtectionScan
|
||||
Console.WriteLine("-d, --debug Enable debug mode");
|
||||
Console.WriteLine("-nc, --no-contents Disable scanning for content checks");
|
||||
Console.WriteLine("-na, --no-archives Disable scanning archives");
|
||||
Console.WriteLine("-ns, --no-paths Disable scanning for path checks");
|
||||
Console.WriteLine("-np, --no-paths Disable scanning for path checks");
|
||||
Console.WriteLine("-ns, --no-subdirs Disable scanning subdirectories");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -35,6 +35,7 @@ namespace ProtectionScan
|
||||
options.ScanArchives,
|
||||
options.ScanContents,
|
||||
options.ScanPaths,
|
||||
options.ScanSubdirectories,
|
||||
options.Debug,
|
||||
fileProgress);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user