mirror of
https://github.com/volodymyrsmirnov/MalwareMultiScan.git
synced 2025-08-25 05:52:23 +00:00
add comodo scan backend
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
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 ComodoScanBackend : AbstractLocalProcessScanBackend
|
||||
{
|
||||
public ComodoScanBackend(ILogger logger) : base(logger)
|
||||
{
|
||||
}
|
||||
|
||||
public override string Id { get; } = "comodo";
|
||||
|
||||
public override DateTime DatabaseLastUpdate =>
|
||||
File.GetLastWriteTime("/opt/COMODO/scanners/bases.cav");
|
||||
|
||||
protected override string BackendPath { get; } = "/opt/COMODO/cmdscan";
|
||||
|
||||
protected override Regex MatchRegex { get; } =
|
||||
new Regex(@".* ---> Found Virus, Malware Name is (?<threat>.*)",
|
||||
RegexOptions.Compiled | RegexOptions.Multiline);
|
||||
|
||||
protected override string GetBackendArguments(string path)
|
||||
{
|
||||
return $"-v -s {path}";
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user