Skip to content

Commit

Permalink
Disable scan cache again
Browse files Browse the repository at this point in the history
  • Loading branch information
dmknght committed Jan 18, 2024
1 parent 440a9c3 commit b135b2e
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/engine/engine_cores.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b135b2e

Please sign in to comment.