34 lines
1.1 KiB
C#
Raw Normal View History

2020-10-22 21:27:16 +03:00
using System.Text.RegularExpressions;
using MalwareMultiScan.Backends.Backends.Abstracts;
2020-10-29 16:09:56 +02:00
using MalwareMultiScan.Backends.Services.Interfaces;
2020-10-22 21:27:16 +03:00
namespace MalwareMultiScan.Backends.Backends.Implementations
{
2020-10-29 16:09:56 +02:00
/// <inheritdoc />
2020-10-22 21:27:16 +03:00
public class McAfeeScanBackend : AbstractLocalProcessScanBackend
{
2020-10-29 16:09:56 +02:00
/// <inheritdoc />
public McAfeeScanBackend(IProcessRunner processRunner) : base(processRunner)
2020-10-22 21:27:16 +03:00
{
}
2020-10-29 16:09:56 +02:00
/// <inheritdoc />
public override string Id { get; } = "mcafee";
2020-10-29 16:09:56 +02:00
/// <inheritdoc />
2020-10-22 21:27:16 +03:00
protected override string BackendPath { get; } = "/usr/local/uvscan/uvscan";
2020-10-29 16:09:56 +02:00
/// <inheritdoc />
2020-10-22 21:27:16 +03:00
protected override bool ThrowOnNonZeroExitCode { get; } = false;
2020-10-29 16:09:56 +02:00
/// <inheritdoc />
2020-10-22 21:27:16 +03:00
protected override Regex MatchRegex { get; } =
new Regex(@".* ... Found: (?<threat>.*).", RegexOptions.Compiled | RegexOptions.Multiline);
2020-10-29 16:09:56 +02:00
/// <inheritdoc />
2020-10-22 21:27:16 +03:00
protected override string GetBackendArguments(string path)
{
return $"--SECURE {path}";
}
}
}