mirror of
https://github.com/volodymyrsmirnov/MalwareMultiScan.git
synced 2025-10-10 20:26:16 +00:00
version 1.1L
* UI responsive table fix * Background scanning for backends * Callback URL parameter to notify on scan results
This commit is contained in:
@@ -22,17 +22,17 @@ namespace MalwareMultiScan.Backends.Backends.Abstracts
|
||||
/// Regex to extract names of threats.
|
||||
/// </summary>
|
||||
protected abstract Regex MatchRegex { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Path to the backend.
|
||||
/// </summary>
|
||||
protected abstract string BackendPath { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Parse StdErr instead of StdOut.
|
||||
/// </summary>
|
||||
protected virtual bool ParseStdErr { get; } = false;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Throw on non-zero exit code.
|
||||
/// </summary>
|
||||
@@ -44,7 +44,7 @@ namespace MalwareMultiScan.Backends.Backends.Abstracts
|
||||
/// <param name="path">Path to the temporary file.</param>
|
||||
/// <returns>Formatted string with parameters and path.</returns>
|
||||
protected abstract string GetBackendArguments(string path);
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
public override Task<string[]> ScanAsync(string path, CancellationToken cancellationToken)
|
||||
{
|
||||
|
@@ -11,7 +11,7 @@ namespace MalwareMultiScan.Backends.Backends.Implementations
|
||||
public WindowsDefenderScanBackend(IProcessRunner processRunner) : base(processRunner)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Id { get; } = "windows-defender";
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace MalwareMultiScan.Backends.Backends.Implementations
|
||||
protected override Regex MatchRegex { get; } =
|
||||
new Regex(@"EngineScanCallback\(\): Threat (?<threat>[\S]+) identified",
|
||||
RegexOptions.Compiled | RegexOptions.Multiline);
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override bool ParseStdErr { get; } = true;
|
||||
|
||||
|
@@ -9,37 +9,37 @@ namespace MalwareMultiScan.Backends.Enums
|
||||
/// Dummy
|
||||
/// </summary>
|
||||
Dummy,
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Windows Defender.
|
||||
/// </summary>
|
||||
Defender,
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ClamAV.
|
||||
/// </summary>
|
||||
Clamav,
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// DrWeb.
|
||||
/// </summary>
|
||||
DrWeb,
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// KES.
|
||||
/// </summary>
|
||||
Kes,
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Comodo.
|
||||
/// </summary>
|
||||
Comodo,
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Sophos.
|
||||
/// </summary>
|
||||
Sophos,
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// McAfee.
|
||||
/// </summary>
|
||||
|
@@ -14,7 +14,7 @@ namespace MalwareMultiScan.Backends.Interfaces
|
||||
/// Unique backend id.
|
||||
/// </summary>
|
||||
public string Id { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Scan file.
|
||||
/// </summary>
|
||||
@@ -22,7 +22,7 @@ namespace MalwareMultiScan.Backends.Interfaces
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <returns>List of detected threats.</returns>
|
||||
public Task<string[]> ScanAsync(string path, CancellationToken cancellationToken);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Scan URL.
|
||||
/// </summary>
|
||||
@@ -30,7 +30,7 @@ namespace MalwareMultiScan.Backends.Interfaces
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <returns>List of detected threats.</returns>
|
||||
public Task<string[]> ScanAsync(Uri uri, CancellationToken cancellationToken);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Scan stream.
|
||||
/// </summary>
|
||||
|
@@ -9,7 +9,7 @@ namespace MalwareMultiScan.Backends.Messages
|
||||
/// Result id.
|
||||
/// </summary>
|
||||
public string Id { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Backend.
|
||||
/// </summary>
|
||||
@@ -19,7 +19,7 @@ namespace MalwareMultiScan.Backends.Messages
|
||||
/// Status.
|
||||
/// </summary>
|
||||
public bool Succeeded { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// List of detected threats.
|
||||
/// </summary>
|
||||
|
@@ -9,7 +9,6 @@ using Microsoft.Extensions.Logging;
|
||||
namespace MalwareMultiScan.Backends.Services.Implementations
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class ProcessRunner : IProcessRunner
|
||||
@@ -26,7 +25,6 @@ namespace MalwareMultiScan.Backends.Services.Implementations
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="arguments"></param>
|
||||
|
Reference in New Issue
Block a user