mirror of
https://github.com/volodymyrsmirnov/MalwareMultiScan.git
synced 2025-08-24 05:22:22 +00:00
add comodo scan backend
This commit is contained in:
parent
5e7bd98a10
commit
ad54620995
24
.idea/.idea.MalwareMultiScan/.idea/runConfigurations/Dockerfiles_Comodo_Dockerfile.xml
generated
Normal file
24
.idea/.idea.MalwareMultiScan/.idea/runConfigurations/Dockerfiles_Comodo_Dockerfile.xml
generated
Normal file
@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Dockerfiles/Comodo.Dockerfile" type="docker-deploy" factoryName="dockerfile" server-name="Docker">
|
||||
<deployment type="dockerfile">
|
||||
<settings>
|
||||
<option name="imageTag" value="mindcollapse/malware-multi-scan-worker-comodo" />
|
||||
<option name="buildCliOptions" value="" />
|
||||
<option name="command" value="" />
|
||||
<option name="containerName" value="malware-multi-scan-worker-comodo" />
|
||||
<option name="entrypoint" value="" />
|
||||
<option name="portBindings">
|
||||
<list>
|
||||
<DockerPortBindingImpl>
|
||||
<option name="containerPort" value="9901" />
|
||||
<option name="hostPort" value="9901" />
|
||||
</DockerPortBindingImpl>
|
||||
</list>
|
||||
</option>
|
||||
<option name="commandLineOptions" value="" />
|
||||
<option name="sourceFilePath" value="MalwareMultiScan.Backends/Dockerfiles/Comodo.Dockerfile" />
|
||||
</settings>
|
||||
</deployment>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
@ -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}";
|
||||
}
|
||||
}
|
||||
}
|
10
MalwareMultiScan.Backends/Dockerfiles/Comodo.Dockerfile
Normal file
10
MalwareMultiScan.Backends/Dockerfiles/Comodo.Dockerfile
Normal 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
|
@ -5,6 +5,7 @@ namespace MalwareMultiScan.Shared.Data.Enums
|
||||
Defender,
|
||||
Clamav,
|
||||
DrWeb,
|
||||
Kes
|
||||
Kes,
|
||||
Comodo
|
||||
}
|
||||
}
|
@ -35,6 +35,7 @@ namespace MalwareMultiScan.Worker.Jobs
|
||||
BackendType.Clamav => new ClamavScanBackend(logger),
|
||||
BackendType.DrWeb => new DrWebScanBackend(logger),
|
||||
BackendType.Kes => new KesScanBackend(logger),
|
||||
BackendType.Comodo => new ComodoScanBackend(logger),
|
||||
_ => throw new NotImplementedException()
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user