Beispiel #1
0
        public IActionResult Sniffer()
        {
            var path = _env.WebRootFileProvider.GetFileInfo("img/sniffer.jpg").PhysicalPath;

            byte[] array = new byte[20];
            using (var file = System.IO.File.Open(path, FileMode.Open))
            {
                file.Read(array, 0, array.Length);
            }

            var results    = _sniffer.Match(array, true);
            var statistics = _sniffer.GetMetadataStatistics();
            var content    = $@"
statistics: total={statistics.Total}
result: {results.ToListString()}
";

            return(Content(content));
        }
Beispiel #2
0
 /// <inheritdoc />
 public SniffingReadOnlyMetadataStatistics GetMetadataStatistics() => _innerSniffer.GetMetadataStatistics();