mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-08 05:37:43 +00:00
29 lines
740 B
C#
29 lines
740 B
C#
using System;
|
|
using System.Linq;
|
|
using BurnOutSharp;
|
|
|
|
namespace Test
|
|
{
|
|
class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
var p = new Progress<FileProtection>();
|
|
p.ProgressChanged += Changed;
|
|
foreach (string arg in args)
|
|
{
|
|
Console.WriteLine(String.Join("\r\n", ProtectionFind.Scan(arg, p).Select(kvp => kvp.Key + ": " + kvp.Value)));
|
|
}
|
|
|
|
Console.ReadLine();
|
|
|
|
//ProtectionFind.ScanSectors('D', 2048);
|
|
}
|
|
|
|
private static void Changed(object source, FileProtection value)
|
|
{
|
|
Console.WriteLine($"{value.Percentage * 100:N2}%: {value.Filename} - {value.Protection}");
|
|
}
|
|
}
|
|
}
|