add comodo scan backend

This commit is contained in:
Volodymyr Smirnov
2020-10-22 19:53:13 +03:00
parent 5e7bd98a10
commit ad54620995
5 changed files with 68 additions and 1 deletions

View File

@@ -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}";
}
}
}

View File

@@ -0,0 +1,10 @@
FROM mindcollapse/malware-multi-scan-worker:latest
RUN apt-get update && apt-get install wget -y
RUN wget -q https://cdn.download.comodo.com/cis/download/installs/linux/cav-linux_x64.deb -O /tmp/cav-linux_x64.deb && \
dpkg -i /tmp/cav-linux_x64.deb || exit 0
RUN wget -q http://download.comodo.com/av/updates58/sigs/bases/bases.cav -O /opt/COMODO/scanners/bases.cav
ENV BackendType=Comodo