diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2021-02-05 23:03:54 +0200 |
---|---|---|
committer | Mavridis Philippe <mavridisf@gmail.com> | 2021-02-05 23:08:45 +0200 |
commit | bce9b7501ce96635e4c1c27093abe1aaae9a34b4 (patch) | |
tree | 79462f7f053bbfa94975688792934c33bfd4b5e8 /src/scanviewer.cpp | |
parent | 18923e403764c902e11aa2c8cd49c6f7335a9923 (diff) | |
download | klamav-bce9b7501ce96635e4c1c27093abe1aaae9a34b4.tar.gz klamav-bce9b7501ce96635e4c1c27093abe1aaae9a34b4.zip |
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 <mavridisf@gmail.com>
Diffstat (limited to 'src/scanviewer.cpp')
-rw-r--r-- | src/scanviewer.cpp | 86 |
1 files changed, 7 insertions, 79 deletions
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; |