basic architecture change: consul + hangfire

This commit is contained in:
Volodymyr Smirnov
2020-11-01 22:25:48 +02:00
parent 3f49c30b67
commit b918a82255
66 changed files with 571 additions and 728 deletions

View File

@@ -0,0 +1,34 @@
using System.Text.RegularExpressions;
using MalwareMultiScan.Backends.Backends.Abstracts;
using MalwareMultiScan.Backends.Services.Interfaces;
namespace MalwareMultiScan.Backends.Backends
{
/// <inheritdoc />
public class SophosScanBackend : AbstractLocalProcessScanBackend
{
/// <inheritdoc />
public SophosScanBackend(IProcessRunner processRunner) : base(processRunner)
{
}
/// <inheritdoc />
public override string Id { get; } = "sophos";
/// <inheritdoc />
protected override string BackendPath { get; } = "/opt/sophos-av/bin/savscan";
/// <inheritdoc />
protected override bool ThrowOnNonZeroExitCode { get; } = false;
/// <inheritdoc />
protected override Regex MatchRegex { get; } =
new Regex(@">>> Virus '(?<threat>.*)' found in file .*", RegexOptions.Compiled | RegexOptions.Multiline);
/// <inheritdoc />
protected override string GetBackendArguments(string path)
{
return $"-f -archive -ss {path}";
}
}
}