Pierluigi Di Lorenzo wrote:

Following command:

$ cat clam-error.rar | clamscan --unrar -

try:

$cat clam-error.rar | xargs clamscan --unrar

And have You tried it yourself? Probably You mean: echo clam-error.rar | xargs clamscan --unrar

But the problem is that clamscan cannot check rar archives from stdin,
without first saving them to file (with .rar extension)

For checking a rar file that has no .rar extension I have
some very simple workaround that works for me (shell script):

#!/bin/bash

case `file $1` in
  *RAR*)
       $tmp=tmp$$.rar
       ln -s $1 $1
       file=$tmp;;
  *)
       file=$1;;
esac
clamscan --unrar $file
if [[ -n $tmp ]]; then
  rm $tmp
fi



_______________________________________________
http://lurker.clamav.net/list/clamav-users.html

Reply via email to