Skip to content

Instantly share code, notes, and snippets.

@nyrahul
Last active April 15, 2024 07:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nyrahul/fe777852be754e6b35f2c971803d4cca to your computer and use it in GitHub Desktop.
Save nyrahul/fe777852be754e6b35f2c971803d4cca to your computer and use it in GitHub Desktop.
clamav scan
#!/bin/bash
# Update scan database
sudo freshclam --datadir=$PWD/clamdb --foreground
# Run the scan on the given folder path
docker run \
-it --rm \
--mount type=bind,source=$PWD/env,target=/scandir \
-v $PWD/clamdb:/clamdb \
-v $PWD:/report \
clamav/clamav:stable \
clamscan -r /scandir --infected -z --gen-json=yes --detect-pua=yes --detect-structured=yes -d /clamdb --log /report/clamreport.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment