mirror of
https://github.com/volodymyrsmirnov/MalwareMultiScan.git
synced 2025-08-25 05:52:23 +00:00
finished unit tests and docstrings
This commit is contained in:
@@ -1,24 +1,31 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using MalwareMultiScan.Backends.Backends.Abstracts;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using MalwareMultiScan.Backends.Services.Interfaces;
|
||||
|
||||
namespace MalwareMultiScan.Backends.Backends.Implementations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public class ClamavScanBackend : AbstractLocalProcessScanBackend
|
||||
{
|
||||
public ClamavScanBackend(ILogger logger) : base(logger)
|
||||
/// <inheritdoc />
|
||||
public ClamavScanBackend(IProcessRunner processRunner) : base(processRunner)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Id { get; } = "clamav";
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override string BackendPath { get; } = "/usr/bin/clamdscan";
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override Regex MatchRegex { get; } =
|
||||
new Regex(@"(\S+): (?<threat>[\S]+) FOUND", RegexOptions.Compiled | RegexOptions.Multiline);
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override bool ThrowOnNonZeroExitCode { get; } = false;
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override string GetBackendArguments(string path)
|
||||
{
|
||||
return $"-m --fdpass --no-summary {path}";
|
||||
|
Reference in New Issue
Block a user