mirror of
https://github.com/volodymyrsmirnov/MalwareMultiScan.git
synced 2025-08-24 05:22:22 +00:00
30 lines
980 B
C#
30 lines
980 B
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 KesScanBackend : AbstractLocalProcessScanBackend
|
|
{
|
|
public KesScanBackend(ILogger logger) : base(logger)
|
|
{
|
|
}
|
|
|
|
public override string Id { get; } = "kes";
|
|
|
|
public override DateTime DatabaseLastUpdate =>
|
|
File.GetLastWriteTime("/var/opt/kaspersky/kesl/common/updates/avbases/klsrl.dat");
|
|
|
|
protected override string BackendPath { get; } = "/bin/bash";
|
|
|
|
protected override Regex MatchRegex { get; } =
|
|
new Regex(@"[ +]DetectName.*: (?<threat>.*)", RegexOptions.Compiled | RegexOptions.Multiline);
|
|
|
|
protected override string GetBackendArguments(string path)
|
|
{
|
|
return $"/usr/bin/kesl-scan {path}";
|
|
}
|
|
}
|
|
} |