mirror of
https://github.com/volodymyrsmirnov/MalwareMultiScan.git
synced 2025-08-24 13:32:22 +00:00
32 lines
1.0 KiB
C#
32 lines
1.0 KiB
C#
using System;
|
|
using System.IO;
|
|
using System.Text.RegularExpressions;
|
|
using MalwareMultiScan.Backends.Backends.Abstracts;
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
namespace MalwareMultiScan.Backends.Backends.Implementations
|
|
{
|
|
public class McAfeeScanBackend : AbstractLocalProcessScanBackend
|
|
{
|
|
public McAfeeScanBackend(ILogger logger) : base(logger)
|
|
{
|
|
}
|
|
|
|
public override string Id { get; } = "mcafeee";
|
|
|
|
public override DateTime DatabaseLastUpdate =>
|
|
File.GetLastWriteTime("/usr/local/uvscan/avvscan.dat");
|
|
|
|
protected override string BackendPath { get; } = "/usr/local/uvscan/uvscan";
|
|
|
|
protected override bool ThrowOnNonZeroExitCode { get; } = false;
|
|
|
|
protected override Regex MatchRegex { get; } =
|
|
new Regex(@".* ... Found: (?<threat>.*).", RegexOptions.Compiled | RegexOptions.Multiline);
|
|
|
|
protected override string GetBackendArguments(string path)
|
|
{
|
|
return $"--SECURE {path}";
|
|
}
|
|
}
|
|
} |