Antivirus wrapper¶
ClamAV wrapper to scan files for malware.
- antivirus.antivirus.scan_file(path)[source]¶
Scan path for viruses using clamd or clamscan (depends on settings.USE_CLAMD.
Parameters: path (str) – Relative or absolute path of file/directory you need to scan.
Returns: {filename: ("FOUND", "virus type")} or blank dict.
Return type: dict
Raises: - ValueError – When the server is not running.
- AssertionError – When the internal file doesn’t exists.