Hello all. I found a minor bug. If you actually found a virus, the filename would have scrolled off. I had that so you would where it was in the scan, when it would finish. If you want infected files displayed only, just add the option to the line.
scanvirusu -w [-i]
scanvirusu -l [-i]
Code:
#!/bin/bash
#: Title : /home/username/bin/scanvirusu
#: Date Created: Thu Sep 2 19:27:00 PST 2010
#: Last Edit : Thu Sep 1 13:13:00 PST 2011
#: Author : Lord Valarian:
#: Version : 1.0.1
#: Description : Run virus scanning application
#: Options : p1: -w -l p2: -i
# Enter at terminal superuser root: chkconfig freshclam on
#
# shortcut code for clamscan
#
echo "Scanning...";
if [ "$1" == "-w" ]; then
clamscan -r /windows --bell $2
elif [ "$1" == "-l" ]; then
clamscan -r / --exclude-dir=windows --exclude-dir=/sys --exclude-dir=/proc --exclude-dir=/dev --bell $2
else
echo "";
echo "help commands";
echo "-------------";
echo "-l: virus scan linux files";
echo "-w: virus scan windows files";
echo "";
fi
exit 0
# End Of Script
Bookmarks