mirror of
https://github.com/volodymyrsmirnov/MalwareMultiScan.git
synced 2025-08-24 05:22:22 +00:00
31 lines
970 B
C#
31 lines
970 B
C#
using System.Text.RegularExpressions;
|
|
using MalwareMultiScan.Backends.Backends.Abstracts;
|
|
using MalwareMultiScan.Backends.Services.Interfaces;
|
|
|
|
namespace MalwareMultiScan.Backends.Backends.Implementations
|
|
{
|
|
/// <inheritdoc />
|
|
public class KesScanBackend : AbstractLocalProcessScanBackend
|
|
{
|
|
/// <inheritdoc />
|
|
public KesScanBackend(IProcessRunner processRunner) : base(processRunner)
|
|
{
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override string Id { get; } = "kes";
|
|
|
|
/// <inheritdoc />
|
|
protected override string BackendPath { get; } = "/bin/bash";
|
|
|
|
/// <inheritdoc />
|
|
protected override Regex MatchRegex { get; } =
|
|
new Regex(@"[ +]DetectName.*: (?<threat>.*)", RegexOptions.Compiled | RegexOptions.Multiline);
|
|
|
|
/// <inheritdoc />
|
|
protected override string GetBackendArguments(string path)
|
|
{
|
|
return $"/usr/bin/kesl-scan {path}";
|
|
}
|
|
}
|
|
} |