<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2K.1beta (1.48) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>Archives and compressed files</TITLE> <META NAME="description" CONTENT="Archives and compressed files"> <META NAME="keywords" CONTENT="clamdoc"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <META NAME="Generator" CONTENT="LaTeX2HTML v2K.1beta"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="clamdoc.css"> <LINK REL="next" HREF="node22.html"> <LINK REL="previous" HREF="node20.html"> <LINK REL="up" HREF="node17.html"> <LINK REL="next" HREF="node22.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html588" HREF="node22.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html584" HREF="node17.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html578" HREF="node20.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html586" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="/usr/share/latex2html/icons/contents.png"></A> <BR> <B> Next:</B> <A NAME="tex2html589" HREF="node22.html">Mail files</A> <B> Up:</B> <A NAME="tex2html585" HREF="node17.html">Usage</A> <B> Previous:</B> <A NAME="tex2html579" HREF="node20.html">Clamuko</A>   <B> <A NAME="tex2html587" HREF="node1.html">Contents</A></B> <BR> <BR> <!--End of Navigation Panel--> <H2><A NAME="SECTION00044000000000000000"> Archives and compressed files</A> </H2> All ClamAV scanners depend on LibClamAV. It has a built-in support for the following formats: <UL> <LI>Zip </LI> <LI>Gzip </LI> <LI>Bzip2 </LI> <LI>RAR (2.0 only) </LI> </UL> Archive types are determined by magic number tests.<A NAME="tex2html73" HREF="footnode.html#foot400"><SUP>5</SUP></A> You need the zlib library for the Zip/Gzip support. Zip archives are accessed with the zziplib library by Guido Draheim and Tomi Ollila. RAR support is based on the UniquE RAR File Library by Christian Scheurer and Johannes Winkelmann. Both of them are included and slightly modified in the clamav sources. Unrarlib supports RAR 2.0 archives only and according to Christian the new format (introduced in WinRAR 3.0) will never be supported (however clamscan can scan WinRAR 3.0 archives, see below). Due to security reasons clamd only scans archives supported by libclamav and can't use external programs. Clamscan is more clever and can switch to the external unpacker when the built-in decompresor fails: <PRE> $ clamscan --unrar test-failure.rar /home/zolw/Clam/test/test-failure.rar: RAR module failure. UNRAR 3.00 freeware Copyright (c) 1993-2002 Eugene Roshal Extracting from /home/zolw/Clam/test/test-failure.rar Extracting test1 OK All OK /tmp/44694f5b2665d2f4/test1: ClamAV-Test-Signature FOUND /home/zolw/Clam/test/test-failure.rar: Infected Archive FOUND </PRE> <I><B>TIP:</B> You can force clamscan to list all infected files in archive using -disable-archive (it disables the built-in transparent decompressors) and -unzip -unrar...</I>. <BR> <B>If the scanner runs on a superuser level unpackers are executed with <I>clamav</I> privileges what makes the process far more secure.</B> It also assures the <I>clamav</I> user has read access to all files. <B>You must enable recursive scanning with the -r option (-recursive) in order to scan a whole content of an archive (including subdirectories)</B>, this option is also (usually) required to scan nested archive. External unpackers supported: <BR> <P> <B>-unzip: </B> Usually you don't need this option because Zip format is supported by libclamav. However it may be useful if libclamav fails to unzip some file. clamscan was tested with <I>UnZip 5.41 of 16 April 2000, by Info-ZIP</I>. <BR> <B>-unrar: </B> Tested with <I>UNRAR 3.00 freeware</I>. <BR> <B>-unace: </B> It uses an options supported by <I>UNACE v1.2 public version</I>, not tested, but should work. <BR> <B>-arj: </B> Tested with <I>arj 3.10b</I>. <BR> <B>-zoo: </B> Tested with <I>zoo 2.1</I>. <BR> <B>-lha: </B> Tested with <I>LHa for Unix V 1.14e</I>. <BR> <B>-jar: </B> clamscan uses <I>unzip</I> for .jar files. Tested with <I>UnZip 5.41 of 16 April 2000, by Info-ZIP</I>. <BR> <B>-tar: </B> This option enables support for non-compressed archives. Tested with <I>GNU tar 1.13.17</I>. <BR> <B>-deb: </B> This option enables support for debian binary packages. Tested with <I>GNU ar <BR> 2.12.90.0.14</I>. Implies -tgz , but doesn't conflict with -tgz=FULLPATH <BR> <B>-tgz: </B> This option supports .tar.gz and .tgz files. You need <I>GNU tar</I>, on non-Linux system you probably have it installed as <I>gtar</I> and if it can be found in <I>$PATH</I> please use -tgz=gtar to tell clamscan to use <I>gtar</I> instead of <I>tar</I>. Otherwise please supply a full path with -tgz <BR> <P> <HR> <!--Navigation Panel--> <A NAME="tex2html588" HREF="node22.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html584" HREF="node17.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html578" HREF="node20.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html586" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="/usr/share/latex2html/icons/contents.png"></A> <BR> <B> Next:</B> <A NAME="tex2html589" HREF="node22.html">Mail files</A> <B> Up:</B> <A NAME="tex2html585" HREF="node17.html">Usage</A> <B> Previous:</B> <A NAME="tex2html579" HREF="node20.html">Clamuko</A>   <B> <A NAME="tex2html587" HREF="node1.html">Contents</A></B> <!--End of Navigation Panel--> <ADDRESS> Tomasz Kojm 2004-06-03 </ADDRESS> </BODY> </HTML>