WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: For scanning files with clamav  (Read 4044 times)

Offline Onyarian

  • Sr. Member
  • ****
  • Posts: 337
For scanning files with clamav
« on: June 12, 2010, 07:42:30 AM »
For easy directory scanning and the help of zenity dialog boxes I made this basic script to avoid the command line utilization. (It's like a mini clamtk or klamav gui)
If there is interest, perhaps it can be improved and finally be an tcz extension with an icon to execute it.
I have another versiĆ³n with the freshclam incorporated, but not very depurated.
Contributions and commentaries are appreciated (Am a very basic programmer)

tc-clamav:
Quote
#!/bin/bash
# tc-clamav
# For scanning folders with clamav.tcz extension and dialog boxes
# from zenity.tcz extension
# Onyarian 12-06-2010

FOLDER=$(zenity --file-selection --title="ClamAv - Select a directory" --directory)
case $? in
0)
 clamscan -v -r $FOLDER -l /tmp/clamvir.log |
 zenity --progress \
 --title="ClamAV" \
 --text="Scanning files..." \
 --pulsate
  case $? in
  0)
    zenity --text-info \
    --title=clamvir.log \
    --width=550 \
    --height=350 \
    --filename=/tmp/clamvir.log;;
  1)
    zenity --error \
    --text="Canceled";;
  -1)
    zenity --error \
    --text="Canceled";;
  esac;;
1)
zenity --error \
  --text="No directory selected";;
-1)
zenity --error \
  --text="No directory selected";;
esac