From bce9b7501ce96635e4c1c27093abe1aaae9a34b4 Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Fri, 5 Feb 2021 23:03:54 +0200 Subject: Updated command-line switches. Deprecated archive extraction options were removed and some switches were renamed according to changes in ClamAV 0.101.0. ClamAV seems to handle archive extraction fully on its own and thus those options are not provided by clamscan anymore. This relates to issue #15. Signed-off-by: Mavridis Philippe --- src/scanviewer.cpp | 86 +++++------------------------------------------------- 1 file changed, 7 insertions(+), 79 deletions(-) (limited to 'src/scanviewer.cpp') diff --git a/src/scanviewer.cpp b/src/scanviewer.cpp index 0e5e702..c6efd93 100644 --- a/src/scanviewer.cpp +++ b/src/scanviewer.cpp @@ -384,7 +384,7 @@ void ScanViewer::slotScan(const TQStringList & filepattern, int mode, bool recur for (TQStringList::Iterator ita = lastQuarLocations.begin(); ita == lastQuarLocations.begin() ; ita++){ quarloc = *ita; } - excludes += TQString(" --exclude=%1 ").arg(quarloc); + excludes += TQString(" --exclude-dir=%1 ").arg(quarloc); } @@ -419,96 +419,24 @@ void ScanViewer::slotScan(const TQStringList & filepattern, int mode, bool recur // options += "--block-max "; if (KlamavConfig::virusEncrypted()) - options += "--block-encrypted "; + options += "--alert-encrypted "; if (!(KlamavConfig::scanMail())) - options += "--no-mail "; + options += "--scan-mail=no "; if (!(KlamavConfig::scanHTML())) - options += "--no-html "; + options += "--scan-html=no "; if (!(KlamavConfig::scanPE())) - options += "--no-pe "; + options += "--scan-pe=no "; if (!(KlamavConfig::scanMacros())) - options += "--no-ole2 "; + options += "--scan-ole2=no "; if (KlamavConfig::virusBroken()) - options += "--detect-broken "; + options += "--alert-broken "; - if (KlamavConfig::scanZip()){ - options += "--unzip"; - if ((KlamavConfig::zipUsing()) != "") - options += "="+(KlamavConfig::zipUsing())+" "; - else - options+=" "; - } - - if (KlamavConfig::scanRar()){ - options += "--unrar"; - if ((KlamavConfig::rarUsing()) != "") - options += "="+(KlamavConfig::rarUsing())+" "; - else - options+=" "; - } - - if (KlamavConfig::scanArj()){ - options += "--arj"; - if ((KlamavConfig::arjUsing()) != "") - options += "="+(KlamavConfig::arjUsing())+" "; - else - options+=" "; - } - - if (KlamavConfig::scanZoo()){ - options += "--unzoo"; - if ((KlamavConfig::zooUsing()) != "") - options += "="+(KlamavConfig::zooUsing())+" "; - else - options+=" "; - } - - if (KlamavConfig::scanLzh()){ - options += "--lha"; - if ((KlamavConfig::lzhUsing()) != "") - options += "="+(KlamavConfig::lzhUsing())+" "; - else - options+=" "; - } - - if (KlamavConfig::scanJar()){ - options += "--jar"; - if ((KlamavConfig::jarUsing()) != "") - options += "="+(KlamavConfig::jarUsing())+" "; - else - options+=" "; - } - - if (KlamavConfig::scanDeb()){ - options += "--deb"; - if ((KlamavConfig::debUsing()) != "") - options += "="+(KlamavConfig::debUsing())+" "; - else - options+=" "; - } - - if (KlamavConfig::scanTar()){ - options += "--tar"; - if ((KlamavConfig::tarUsing()) != "") - options += "="+(KlamavConfig::tarUsing())+" "; - else - options+=" "; - } - - if (KlamavConfig::scanTgz()){ - options += "--tgz"; - if ((KlamavConfig::tgzUsing()) != "") - options += "="+(KlamavConfig::tgzUsing())+" "; - else - options+=" "; - } - if(clamdscan) { // make sure that clamd is running FILE* clamdpid; -- cgit v1.2.1