问题
I want to scan the files that are uploaded to my Azure blob. It looks like ClamAV (www.clamav.net) is probably the way to go. I see instructions on how to install on a Windows server, but what would my procedure be for a site hosted on Azure? I am using ASP.NET MVC.
回答1:
Disclaimer: I haven't used ClamAV. Having said that...
You should be able to install it during a startup task (with elevated privileges). I looked at the ClamAV wiki, and it appears that the msi has a silent-install:
msiexec /i clamAV.msi /qr
You'll need to change that last parameter to /qn to force "no user interface."
The challenge will be scanning blobs. You'll need to copy files from their blobs to a local directory in your VM instance, and then run clamdscan on that file (basing off the wiki).
I haven't tried this, but the basic premise should hold up: Install anything requiring an MSI as a startup task (probably needs elevated mode).
来源:https://stackoverflow.com/questions/5121337/setup-and-use-clamav-anti-virus-with-azure