2003-07-29 15:48:06 +00:00
|
|
|
/*
|
2020-01-03 15:44:07 -05:00
|
|
|
* Copyright (C) 2013-2020 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
|
2019-01-25 10:15:50 -05:00
|
|
|
* Copyright (C) 2007-2013 Sourcefire, Inc.
|
2009-02-13 10:55:45 +00:00
|
|
|
*
|
|
|
|
* Authors: Tomasz Kojm
|
2003-07-29 15:48:06 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
2007-03-31 20:31:04 +00:00
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
2003-07-29 15:48:06 +00:00
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2006-04-09 19:59:28 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
|
|
* MA 02110-1301, USA.
|
2003-07-29 15:48:06 +00:00
|
|
|
*/
|
|
|
|
|
2004-02-06 13:46:08 +00:00
|
|
|
#if HAVE_CONFIG_H
|
|
|
|
#include "clamav-config.h"
|
|
|
|
#endif
|
|
|
|
|
2003-07-29 15:48:06 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2008-07-30 15:20:30 +00:00
|
|
|
#include <signal.h>
|
|
|
|
|
2018-12-03 12:40:13 -05:00
|
|
|
#ifdef HAVE_UNISTD_H
|
2003-07-29 15:48:06 +00:00
|
|
|
#include <unistd.h>
|
2007-02-25 02:54:38 +00:00
|
|
|
#endif
|
2009-09-24 19:23:21 +02:00
|
|
|
#ifndef _WIN32
|
2003-07-29 15:48:06 +00:00
|
|
|
#include <sys/time.h>
|
2007-02-25 02:54:38 +00:00
|
|
|
#endif
|
2003-07-29 15:48:06 +00:00
|
|
|
#include <time.h>
|
2007-01-30 21:11:32 +00:00
|
|
|
#ifdef C_LINUX
|
|
|
|
#include <sys/resource.h>
|
|
|
|
#endif
|
2003-07-29 15:48:06 +00:00
|
|
|
|
|
|
|
#include "others.h"
|
2007-01-30 21:11:32 +00:00
|
|
|
#include "global.h"
|
2003-07-29 15:48:06 +00:00
|
|
|
#include "manager.h"
|
2004-03-29 00:00:58 +00:00
|
|
|
|
2007-01-30 21:11:32 +00:00
|
|
|
#include "shared/misc.h"
|
|
|
|
#include "shared/output.h"
|
2009-02-12 15:14:12 +00:00
|
|
|
#include "shared/actions.h"
|
2008-12-30 10:33:43 +00:00
|
|
|
#include "shared/optparser.h"
|
2003-11-09 19:26:44 +00:00
|
|
|
|
2008-02-08 17:50:44 +00:00
|
|
|
#include "libclamav/str.h"
|
2008-06-10 16:59:19 +00:00
|
|
|
#include "libclamav/clamav.h"
|
2008-02-08 17:50:44 +00:00
|
|
|
|
2003-07-29 15:48:06 +00:00
|
|
|
void help(void);
|
|
|
|
|
2007-01-30 21:11:32 +00:00
|
|
|
struct s_info info;
|
2012-08-10 11:39:48 -04:00
|
|
|
short recursion = 0, bell = 0;
|
|
|
|
short printinfected = 0, printclean = 1;
|
2004-03-30 21:11:25 +00:00
|
|
|
|
2006-05-15 18:30:18 +00:00
|
|
|
int main(int argc, char **argv)
|
2003-07-29 15:48:06 +00:00
|
|
|
{
|
2018-12-03 12:40:13 -05:00
|
|
|
int ds, dms, ret;
|
|
|
|
double mb, rmb;
|
|
|
|
struct timeval t1, t2;
|
2019-11-03 17:05:25 -05:00
|
|
|
time_t date_start, date_end;
|
|
|
|
|
2019-09-16 13:43:02 -07:00
|
|
|
char buffer[26];
|
2009-09-24 19:23:21 +02:00
|
|
|
#ifndef _WIN32
|
2018-12-03 12:40:13 -05:00
|
|
|
sigset_t sigset;
|
2007-02-25 02:54:38 +00:00
|
|
|
#endif
|
2018-12-03 12:40:13 -05:00
|
|
|
struct optstruct *opts;
|
|
|
|
const struct optstruct *opt;
|
2003-07-29 15:48:06 +00:00
|
|
|
|
2018-07-30 20:19:28 -04:00
|
|
|
if (check_flevel())
|
2018-12-03 12:40:13 -05:00
|
|
|
exit(2);
|
2010-05-10 17:05:16 +02:00
|
|
|
|
2009-09-24 19:23:21 +02:00
|
|
|
#if !defined(_WIN32) && !defined(C_BEOS)
|
2008-07-30 15:20:30 +00:00
|
|
|
sigemptyset(&sigset);
|
|
|
|
sigaddset(&sigset, SIGXFSZ);
|
|
|
|
sigprocmask(SIG_SETMASK, &sigset, NULL);
|
|
|
|
#endif
|
|
|
|
|
2014-03-07 14:09:46 -05:00
|
|
|
cl_initialize_crypto();
|
|
|
|
|
2018-12-03 12:40:13 -05:00
|
|
|
if ((opts = optparse(NULL, argc, argv, 1, OPT_CLAMSCAN, 0, NULL)) == NULL) {
|
|
|
|
mprintf("!Can't parse command line options\n");
|
|
|
|
return 2;
|
2006-05-15 18:30:18 +00:00
|
|
|
}
|
|
|
|
|
2018-12-03 12:40:13 -05:00
|
|
|
if (optget(opts, "verbose")->enabled) {
|
|
|
|
mprintf_verbose = 1;
|
|
|
|
logg_verbose = 1;
|
2004-03-29 00:00:58 +00:00
|
|
|
}
|
2003-07-29 15:48:06 +00:00
|
|
|
|
2018-12-03 12:40:13 -05:00
|
|
|
if (optget(opts, "quiet")->enabled)
|
|
|
|
mprintf_quiet = 1;
|
2003-07-29 15:48:06 +00:00
|
|
|
|
2018-12-03 12:40:13 -05:00
|
|
|
if (optget(opts, "stdout")->enabled)
|
|
|
|
mprintf_stdout = 1;
|
2006-05-15 18:30:18 +00:00
|
|
|
|
2018-12-03 12:40:13 -05:00
|
|
|
if (optget(opts, "debug")->enabled) {
|
2003-11-09 19:26:44 +00:00
|
|
|
#if defined(C_LINUX)
|
2018-12-03 12:40:13 -05:00
|
|
|
/* njh@bandsman.co.uk: create a dump if needed */
|
|
|
|
struct rlimit rlim;
|
2003-11-09 19:26:44 +00:00
|
|
|
|
2018-12-03 12:40:13 -05:00
|
|
|
rlim.rlim_cur = rlim.rlim_max = RLIM_INFINITY;
|
|
|
|
if (setrlimit(RLIMIT_CORE, &rlim) < 0)
|
|
|
|
perror("setrlimit");
|
2003-11-09 19:26:44 +00:00
|
|
|
#endif
|
2018-12-03 12:40:13 -05:00
|
|
|
cl_debug(); /* enable debug messages */
|
2003-11-09 19:26:44 +00:00
|
|
|
}
|
2003-08-02 22:37:52 +00:00
|
|
|
|
2013-10-09 15:57:56 -04:00
|
|
|
if (optget(opts, "gen-mdb")->enabled) {
|
|
|
|
cl_always_gen_section_hash();
|
|
|
|
}
|
|
|
|
|
2018-12-03 12:40:13 -05:00
|
|
|
if (optget(opts, "version")->enabled) {
|
|
|
|
print_version(optget(opts, "database")->strarg);
|
|
|
|
optfree(opts);
|
|
|
|
return 0;
|
2003-07-29 15:48:06 +00:00
|
|
|
}
|
|
|
|
|
2018-12-03 12:40:13 -05:00
|
|
|
if (optget(opts, "help")->enabled) {
|
|
|
|
optfree(opts);
|
|
|
|
help();
|
|
|
|
return 0;
|
2003-07-29 15:48:06 +00:00
|
|
|
}
|
|
|
|
|
2018-12-03 12:40:13 -05:00
|
|
|
if (optget(opts, "recursive")->enabled)
|
|
|
|
recursion = 1;
|
2003-07-29 15:48:06 +00:00
|
|
|
|
2018-12-03 12:40:13 -05:00
|
|
|
if (optget(opts, "infected")->enabled)
|
|
|
|
printinfected = 1;
|
2003-07-29 15:48:06 +00:00
|
|
|
|
2018-12-03 12:40:13 -05:00
|
|
|
if (optget(opts, "suppress-ok-results")->enabled)
|
|
|
|
printclean = 0;
|
2012-08-10 11:39:48 -04:00
|
|
|
|
2018-12-03 12:40:13 -05:00
|
|
|
if (optget(opts, "bell")->enabled)
|
|
|
|
bell = 1;
|
2004-01-09 01:10:52 +00:00
|
|
|
|
2003-07-29 15:48:06 +00:00
|
|
|
/* initialize logger */
|
2018-12-03 12:40:13 -05:00
|
|
|
if ((opt = optget(opts, "log"))->enabled) {
|
|
|
|
logg_file = opt->strarg;
|
|
|
|
if (logg("#\n-------------------------------------------------------------------------------\n\n")) {
|
|
|
|
mprintf("!Problem with internal logger.\n");
|
|
|
|
optfree(opts);
|
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
} else
|
|
|
|
logg_file = NULL;
|
|
|
|
|
|
|
|
if (actsetup(opts)) {
|
|
|
|
optfree(opts);
|
|
|
|
logg_close();
|
|
|
|
exit(2);
|
2009-02-12 15:14:12 +00:00
|
|
|
}
|
2006-05-15 18:30:18 +00:00
|
|
|
|
2007-01-30 21:11:32 +00:00
|
|
|
memset(&info, 0, sizeof(struct s_info));
|
2003-07-29 15:48:06 +00:00
|
|
|
|
2019-11-03 17:05:25 -05:00
|
|
|
date_start = time(NULL);
|
2009-10-12 23:38:38 +02:00
|
|
|
gettimeofday(&t1, NULL);
|
2007-02-25 02:54:38 +00:00
|
|
|
|
2008-12-30 10:33:43 +00:00
|
|
|
ret = scanmanager(opts);
|
2003-07-29 15:48:06 +00:00
|
|
|
|
2018-12-03 12:40:13 -05:00
|
|
|
if (!optget(opts, "no-summary")->enabled) {
|
2019-11-03 17:05:25 -05:00
|
|
|
struct tm tmp;
|
2018-12-03 12:40:13 -05:00
|
|
|
|
2019-11-03 17:05:25 -05:00
|
|
|
date_end = time(NULL);
|
|
|
|
gettimeofday(&t2, NULL);
|
2018-12-03 12:40:13 -05:00
|
|
|
ds = t2.tv_sec - t1.tv_sec;
|
|
|
|
dms = t2.tv_usec - t1.tv_usec;
|
|
|
|
ds -= (dms < 0) ? (1) : (0);
|
|
|
|
dms += (dms < 0) ? (1000000) : (0);
|
|
|
|
logg("\n----------- SCAN SUMMARY -----------\n");
|
|
|
|
logg("Known viruses: %u\n", info.sigs);
|
|
|
|
logg("Engine version: %s\n", get_version());
|
|
|
|
logg("Scanned directories: %u\n", info.dirs);
|
|
|
|
logg("Scanned files: %u\n", info.files);
|
|
|
|
logg("Infected files: %u\n", info.ifiles);
|
|
|
|
if (info.errors)
|
|
|
|
logg("Total errors: %u\n", info.errors);
|
|
|
|
if (notremoved) {
|
|
|
|
logg("Not removed: %u\n", notremoved);
|
|
|
|
}
|
|
|
|
if (notmoved) {
|
|
|
|
logg("Not %s: %u\n", optget(opts, "copy")->enabled ? "moved" : "copied", notmoved);
|
|
|
|
}
|
|
|
|
mb = info.blocks * (CL_COUNT_PRECISION / 1024) / 1024.0;
|
|
|
|
logg("Data scanned: %2.2lf MB\n", mb);
|
|
|
|
rmb = info.rblocks * (CL_COUNT_PRECISION / 1024) / 1024.0;
|
|
|
|
logg("Data read: %2.2lf MB (ratio %.2f:1)\n", rmb, info.rblocks ? (double)info.blocks / (double)info.rblocks : 0);
|
|
|
|
logg("Time: %u.%3.3u sec (%u m %u s)\n", ds, dms / 1000, ds / 60, ds % 60);
|
2019-11-03 17:05:25 -05:00
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
if (0 != localtime_s(&tmp, &date_start)) {
|
|
|
|
#else
|
|
|
|
if (!localtime_r(&date_start, &tmp)) {
|
|
|
|
#endif
|
|
|
|
logg("!Failed to get local time for Start Date.\n");
|
|
|
|
}
|
|
|
|
strftime(buffer, sizeof(buffer), "%Y:%m:%d %H:%M:%S", &tmp);
|
|
|
|
logg("Start Date: %s\n", buffer);
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
if (0 != localtime_s(&tmp, &date_end)) {
|
|
|
|
#else
|
|
|
|
if (!localtime_r(&date_end, &tmp)) {
|
|
|
|
#endif
|
|
|
|
logg("!Failed to get local time for End Date.\n");
|
|
|
|
}
|
|
|
|
strftime(buffer, sizeof(buffer), "%Y:%m:%d %H:%M:%S", &tmp);
|
|
|
|
logg("End Date: %s\n", buffer);
|
2003-07-29 15:48:06 +00:00
|
|
|
}
|
|
|
|
|
2008-12-30 10:33:43 +00:00
|
|
|
optfree(opts);
|
2014-05-09 17:09:29 -04:00
|
|
|
|
2004-03-13 20:08:10 +00:00
|
|
|
return ret;
|
2003-07-29 15:48:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void help(void)
|
|
|
|
{
|
|
|
|
mprintf_stdout = 1;
|
|
|
|
|
|
|
|
mprintf("\n");
|
2018-02-06 16:23:07 -05:00
|
|
|
mprintf(" Clam AntiVirus: Scanner %s\n", get_version());
|
2018-03-27 13:06:46 -04:00
|
|
|
printf(" By The ClamAV Team: https://www.clamav.net/about.html#credits\n");
|
2020-01-03 15:44:07 -05:00
|
|
|
printf(" (C) 2020 Cisco Systems, Inc.\n");
|
2018-02-06 16:23:07 -05:00
|
|
|
mprintf("\n");
|
|
|
|
mprintf(" clamscan [options] [file/directory/-]\n");
|
|
|
|
mprintf("\n");
|
|
|
|
mprintf(" --help -h Show this help\n");
|
2004-08-18 15:22:48 +00:00
|
|
|
mprintf(" --version -V Print version number\n");
|
2003-11-11 22:10:27 +00:00
|
|
|
mprintf(" --verbose -v Be verbose\n");
|
2011-08-22 16:58:48 +03:00
|
|
|
mprintf(" --archive-verbose -a Show filenames inside scanned archives\n");
|
2004-08-18 15:22:48 +00:00
|
|
|
mprintf(" --debug Enable libclamav's debug messages\n");
|
|
|
|
mprintf(" --quiet Only output error messages\n");
|
2019-05-21 14:49:42 -04:00
|
|
|
mprintf(" --stdout Write to stdout instead of stderr. Does not affect 'debug' messages.\n");
|
2004-08-18 15:22:48 +00:00
|
|
|
mprintf(" --no-summary Disable summary at end of scanning\n");
|
|
|
|
mprintf(" --infected -i Only print infected files\n");
|
2012-08-10 11:39:48 -04:00
|
|
|
mprintf(" --suppress-ok-results -o Skip printing OK files\n");
|
2004-08-18 15:22:48 +00:00
|
|
|
mprintf(" --bell Sound bell on virus detection\n");
|
2003-07-29 15:48:06 +00:00
|
|
|
mprintf("\n");
|
2004-07-05 23:50:55 +00:00
|
|
|
mprintf(" --tempdir=DIRECTORY Create temporary files in DIRECTORY\n");
|
2008-12-30 10:33:43 +00:00
|
|
|
mprintf(" --leave-temps[=yes/no(*)] Do not remove temporary files\n");
|
2018-02-06 16:23:07 -05:00
|
|
|
mprintf(" --gen-json[=yes/no(*)] Generate JSON description of scanned file(s). JSON will be printed and also-\n");
|
|
|
|
mprintf(" dropped to the temp directory if --leave-temps is enabled.\n");
|
|
|
|
mprintf(" --database=FILE/DIR -d FILE/DIR Load virus database from FILE or load all supported db files from DIR\n");
|
2009-11-10 19:30:33 +01:00
|
|
|
mprintf(" --official-db-only[=yes/no(*)] Only load official signatures\n");
|
2004-02-20 15:49:29 +00:00
|
|
|
mprintf(" --log=FILE -l FILE Save scan report to FILE\n");
|
2008-12-30 10:33:43 +00:00
|
|
|
mprintf(" --recursive[=yes/no(*)] -r Scan subdirectories recursively\n");
|
2012-11-27 14:48:50 -08:00
|
|
|
mprintf(" --allmatch[=yes/no(*)] -z Continue scanning within file after finding a match\n");
|
2009-08-05 16:27:48 +02:00
|
|
|
mprintf(" --cross-fs[=yes(*)/no] Scan files and directories on other filesystems\n");
|
2010-12-28 18:24:51 +01:00
|
|
|
mprintf(" --follow-dir-symlinks[=0/1(*)/2] Follow directory symlinks (0 = never, 1 = direct, 2 = always)\n");
|
|
|
|
mprintf(" --follow-file-symlinks[=0/1(*)/2] Follow file symlinks (0 = never, 1 = direct, 2 = always)\n");
|
2009-05-21 13:43:05 +00:00
|
|
|
mprintf(" --file-list=FILE -f FILE Scan files from FILE\n");
|
2008-12-30 10:33:43 +00:00
|
|
|
mprintf(" --remove[=yes/no(*)] Remove infected files. Be careful!\n");
|
2003-11-11 22:10:27 +00:00
|
|
|
mprintf(" --move=DIRECTORY Move infected files into DIRECTORY\n");
|
2006-10-29 14:37:20 +00:00
|
|
|
mprintf(" --copy=DIRECTORY Copy infected files into DIRECTORY\n");
|
2004-05-09 22:11:30 +00:00
|
|
|
mprintf(" --exclude=REGEX Don't scan file names matching REGEX\n");
|
2005-03-01 01:32:53 +00:00
|
|
|
mprintf(" --exclude-dir=REGEX Don't scan directories matching REGEX\n");
|
2004-05-09 22:11:30 +00:00
|
|
|
mprintf(" --include=REGEX Only scan file names matching REGEX\n");
|
2005-03-01 01:32:53 +00:00
|
|
|
mprintf(" --include-dir=REGEX Only scan directories matching REGEX\n");
|
2003-07-29 15:48:06 +00:00
|
|
|
mprintf("\n");
|
2010-03-19 17:42:25 +01:00
|
|
|
mprintf(" --bytecode[=yes(*)/no] Load bytecode from the database\n");
|
2011-02-17 19:17:35 +01:00
|
|
|
mprintf(" --bytecode-unsigned[=yes/no(*)] Load unsigned bytecode\n");
|
2010-12-28 18:24:51 +01:00
|
|
|
mprintf(" --bytecode-timeout=N Set bytecode timeout (in milliseconds)\n");
|
2015-02-19 12:47:20 -05:00
|
|
|
mprintf(" --statistics[=none(*)/bytecode/pcre] Collect and print execution statistics\n");
|
2008-12-30 10:33:43 +00:00
|
|
|
mprintf(" --detect-pua[=yes/no(*)] Detect Possibly Unwanted Applications\n");
|
2008-07-31 16:26:50 +00:00
|
|
|
mprintf(" --exclude-pua=CAT Skip PUA sigs of category CAT\n");
|
|
|
|
mprintf(" --include-pua=CAT Load PUA sigs of category CAT\n");
|
2008-12-30 10:33:43 +00:00
|
|
|
mprintf(" --detect-structured[=yes/no(*)] Detect structured data (SSN, Credit Card)\n");
|
2008-05-07 10:51:23 +00:00
|
|
|
mprintf(" --structured-ssn-format=X SSN format (0=normal,1=stripped,2=both)\n");
|
|
|
|
mprintf(" --structured-ssn-count=N Min SSN count to generate a detect\n");
|
|
|
|
mprintf(" --structured-cc-count=N Min CC count to generate a detect\n");
|
2008-12-30 10:33:43 +00:00
|
|
|
mprintf(" --scan-mail[=yes(*)/no] Scan mail files\n");
|
2018-10-10 06:02:28 -07:00
|
|
|
mprintf(" --phishing-sigs[=yes(*)/no] Enable email signature-based phishing detection\n");
|
|
|
|
mprintf(" --phishing-scan-urls[=yes(*)/no] Enable URL signature-based phishing detection\n");
|
|
|
|
mprintf(" --heuristic-alerts[=yes(*)/no] Heuristic alerts\n");
|
2008-12-30 10:33:43 +00:00
|
|
|
mprintf(" --heuristic-scan-precedence[=yes/no(*)] Stop scanning as soon as a heuristic match is found\n");
|
2018-02-06 16:23:07 -05:00
|
|
|
mprintf(" --normalize[=yes(*)/no] Normalize html, script, and text files. Use normalize=no for yara compatibility\n");
|
2008-12-30 10:33:43 +00:00
|
|
|
mprintf(" --scan-pe[=yes(*)/no] Scan PE files\n");
|
|
|
|
mprintf(" --scan-elf[=yes(*)/no] Scan ELF files\n");
|
|
|
|
mprintf(" --scan-ole2[=yes(*)/no] Scan OLE2 containers\n");
|
|
|
|
mprintf(" --scan-pdf[=yes(*)/no] Scan PDF files\n");
|
2013-02-05 19:46:56 -05:00
|
|
|
mprintf(" --scan-swf[=yes(*)/no] Scan SWF files\n");
|
2008-12-30 10:33:43 +00:00
|
|
|
mprintf(" --scan-html[=yes(*)/no] Scan HTML files\n");
|
2016-02-02 14:23:13 -05:00
|
|
|
mprintf(" --scan-xmldocs[=yes(*)/no] Scan xml-based document files\n");
|
|
|
|
mprintf(" --scan-hwp3[=yes(*)/no] Scan HWP3 files\n");
|
2008-12-30 10:33:43 +00:00
|
|
|
mprintf(" --scan-archive[=yes(*)/no] Scan archive files (supported by libclamav)\n");
|
2018-10-10 06:02:28 -07:00
|
|
|
mprintf(" --alert-broken[=yes/no(*)] Alert on broken executable files (PE & ELF)\n");
|
|
|
|
mprintf(" --alert-encrypted[=yes/no(*)] Alert on encrypted archives and documents\n");
|
|
|
|
mprintf(" --alert-encrypted-archive[=yes/no(*)] Alert on encrypted archives\n");
|
|
|
|
mprintf(" --alert-encrypted-doc[=yes/no(*)] Alert on encrypted documents\n");
|
|
|
|
mprintf(" --alert-macros[=yes/no(*)] Alert on OLE2 files containing VBA macros\n");
|
|
|
|
mprintf(" --alert-exceeds-max[=yes/no(*)] Alert on files that exceed max file size, max scan size, or max recursion limit\n");
|
|
|
|
mprintf(" --alert-phishing-ssl[=yes/no(*)] Alert on emails containing SSL mismatches in URLs\n");
|
|
|
|
mprintf(" --alert-phishing-cloak[=yes/no(*)] Alert on emails containing cloaked URLs\n");
|
|
|
|
mprintf(" --alert-partition-intersection[=yes/no(*)] Alert on raw DMG image files containing partition intersections\n");
|
2012-11-30 09:57:25 -05:00
|
|
|
mprintf(" --nocerts Disable authenticode certificate chain verification in PE files\n");
|
2013-01-08 15:10:03 -05:00
|
|
|
mprintf(" --dumpcerts Dump authenticode certificate chain in PE files\n");
|
2004-08-18 15:22:48 +00:00
|
|
|
mprintf("\n");
|
2019-08-16 17:18:59 -07:00
|
|
|
mprintf(" --max-scantime=#n Scan time longer than this will be skipped and assumed clean\n");
|
2008-02-13 02:06:19 +00:00
|
|
|
mprintf(" --max-filesize=#n Files larger than this will be skipped and assumed clean\n");
|
2008-12-30 10:33:43 +00:00
|
|
|
mprintf(" --max-scansize=#n The maximum amount of data to scan for each container file (**)\n");
|
|
|
|
mprintf(" --max-files=#n The maximum number of files to scan for each container file (**)\n");
|
|
|
|
mprintf(" --max-recursion=#n Maximum archive recursion level for container file (**)\n");
|
2005-03-25 22:23:57 +00:00
|
|
|
mprintf(" --max-dir-recursion=#n Maximum directory recursion level\n");
|
2012-11-27 17:15:02 -05:00
|
|
|
mprintf(" --max-embeddedpe=#n Maximum size file to check for embedded PE\n");
|
|
|
|
mprintf(" --max-htmlnormalize=#n Maximum size of HTML file to normalize\n");
|
|
|
|
mprintf(" --max-htmlnotags=#n Maximum size of normalized HTML file to scan\n");
|
|
|
|
mprintf(" --max-scriptnormalize=#n Maximum size of script file to normalize\n");
|
|
|
|
mprintf(" --max-ziptypercg=#n Maximum size zip to type reanalyze\n");
|
2014-03-05 17:20:41 -05:00
|
|
|
mprintf(" --max-partitions=#n Maximum number of partitions in disk image to be scanned\n");
|
2014-03-06 18:19:11 -05:00
|
|
|
mprintf(" --max-iconspe=#n Maximum number of icons in PE file to be scanned\n");
|
2016-01-19 14:25:55 -05:00
|
|
|
mprintf(" --max-rechwp3=#n Maximum recursive calls to HWP3 parsing function\n");
|
2014-09-19 11:41:47 -04:00
|
|
|
#if HAVE_PCRE
|
|
|
|
mprintf(" --pcre-match-limit=#n Maximum calls to the PCRE match function.\n");
|
|
|
|
mprintf(" --pcre-recmatch-limit=#n Maximum recursive calls to the PCRE match function.\n");
|
2015-02-05 08:30:26 -08:00
|
|
|
mprintf(" --pcre-max-filesize=#n Maximum size file to perform PCRE subsig matching.\n");
|
2014-09-19 11:41:47 -04:00
|
|
|
#endif /* HAVE_PCRE */
|
2015-12-21 16:50:33 -05:00
|
|
|
mprintf(" --disable-cache Disable caching and cache checks for hash sums of scanned files.\n");
|
2008-06-10 16:59:19 +00:00
|
|
|
mprintf("\n");
|
2018-02-06 16:23:07 -05:00
|
|
|
mprintf("Pass in - as the filename for stdin.\n");
|
|
|
|
mprintf("\n");
|
2008-12-30 10:33:43 +00:00
|
|
|
mprintf("(*) Default scan settings\n");
|
|
|
|
mprintf("(**) Certain files (e.g. documents, archives, etc.) may in turn contain other\n");
|
|
|
|
mprintf(" files inside. The above options ensure safe processing of this kind of data.\n\n");
|
2003-07-29 15:48:06 +00:00
|
|
|
}
|