From b135b2ef649ccbedf4cabe62db98dc30b1b1c852 Mon Sep 17 00:00:00 2001 From: Nong Hoang Tu Date: Fri, 19 Jan 2024 03:08:07 +0700 Subject: [PATCH] Disable scan cache again --- src/engine/engine_cores.nim | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/engine/engine_cores.nim b/src/engine/engine_cores.nim index d8cefea..f69bc6d 100644 --- a/src/engine/engine_cores.nim +++ b/src/engine/engine_cores.nim @@ -79,20 +79,8 @@ proc init_clamav*(clam_engine: var ClEngine, loaded_sig_count: var uint, path_cl clam_engine.options.parse = bitor(clam_engine.options.parse, CL_SCAN_PARSE_HTML) clam_engine.options.general = bitor(clam_engine.options.general, CL_SCAN_GENERAL_HEURISTICS) - - if use_clam: - # Enable cache - clam_engine.options.parse = bitor(clam_engine.options.parse, CL_SCAN_PARSE_ELF) - clam_engine.options.parse = bitor(clam_engine.options.parse, CL_SCAN_PARSE_PE) - # Maybe enable macho? - # clam_engine.options.heuristic = bitor(clam_engine.options.heuristic, CL_SCAN_HEURISTIC_BROKEN) - # clam_engine.options.heuristic = bitor(clam_engine.options.heuristic, CL_SCAN_HEURISTIC_ENCRYPTED_ARCHIVE) - # clam_engine.options.heuristic = bitor(clam_engine.options.heuristic, CL_SCAN_HEURISTIC_ENCRYPTED_DOC) - # clam_engine.options.heuristic = bitor(clam_engine.options.heuristic, CL_SCAN_HEURISTIC_MACROS) - else: - # Disable cache - clam_engine.options.parse = bitand(clam_engine.options.parse, CL_SCAN_PARSE_ELF) - clam_engine.options.parse = bitand(clam_engine.options.parse, CL_SCAN_PARSE_PE) + # When enable, this option will save tmp file at /tmp/ + clam_engine.options.parse = bitor(clam_engine.options.parse, ENGINE_OPTIONS_DISABLE_CACHE) discard clam_engine.engine.cl_engine_set_num(CL_ENGINE_MAX_FILESIZE, 75 * 1024 * 1024) # Max scan size 75mb