A command-line utility for scanning directories with ClamAV, updating virus definitions, and sending notifications upon completion.
- Directory Scanning: Specify the directory you want to scan with ClamAV.
- Automatic Updates: Optionally update the ClamAV virus database before scanning.
- Notifications: Send scan summaries to a specified notification method, such as Google Chat.
- Install Homebrew for (MacOS).
- Download the latest release binary for your system
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/sandeshgrangdan/antivirus/releases/download/v0.1.3/antivirus-installer.sh | sh
To add $HOME/.cargo/bin to your PATH, either restart your shell or run:
source $HOME/.cargo/env (sh, bash, zsh)
source $HOME/.cargo/env.fish (fish)
To update, run this command to update.
antivirus-update
This will install the ClamAV Antivirus
$ antivirus
You need to first setup freshclam
- (Linux): Create /usr/local/etc/clamav/freshclam.conf from /usr/local/etc/clamav/freshclam.conf.sample.
- Remove or comment-out the Example line from freshclam.conf
- Run freshclam to download the latest malware definitions.
$ antivirus -h
A command-line utility for scanning directories with ClamAV, updating virus definitions, and sending notifications.
Usage: antivirus [OPTIONS]
Options:
-d, --dir <DIR> The path to the directory that you want to scan. Defaults to "HOME" [default: HOME]
-u, --update <UPDATE> Option to update the ClamAV virus database before scanning. Defaults to "Yes" [default: Yes]
-h, --help Print help
-V, --version Print version
antivirus --dir /path/to/scan --update Yes --notify "Google Chat"
- ANTIVIRUS_GOOGLE_CHAT_URL: The environment variable that stores the webhook URLs used for sending notifications. Ensure that this variable is set to the correct URL(s) before running the utility.
Contributions are welcome! Please submit a pull request or open an issue to discuss any changes or improvements.