# This file is automatically generated by getconst.py # on system with clamav-1.0.7. # source: /usr/include/clamav.h CL_COUNT_PRECISION = 4096 # enum block start: typedef enum cl_error_t { CL_CLEAN = 0 CL_SUCCESS = 0 CL_VIRUS = 1 CL_ENULLARG = 2 CL_EARG = 3 CL_EMALFDB = 4 CL_ECVD = 5 CL_EVERIFY = 6 CL_EUNPACK = 7 CL_EOPEN = 8 CL_ECREAT = 9 CL_EUNLINK = 10 CL_ESTAT = 11 CL_EREAD = 12 CL_ESEEK = 13 CL_EWRITE = 14 CL_EDUP = 15 CL_EACCES = 16 CL_ETMPFILE = 17 CL_ETMPDIR = 18 CL_EMAP = 19 CL_EMEM = 20 CL_ETIMEOUT = 21 CL_BREAK = 22 CL_EMAXREC = 23 CL_EMAXSIZE = 24 CL_EMAXFILES = 25 CL_EFORMAT = 26 CL_EPARSE = 27 CL_EBYTECODE = 28 # /* may be reported in testmode */ CL_EBYTECODE_TESTFAIL = 29 # /* may be reported in testmode */ CL_ELOCK = 30 CL_EBUSY = 31 CL_ESTATE = 32 CL_VERIFIED = 33 # /* The binary has been deemed trusted */ CL_ERROR = 34 # /* Unspecified / generic error */ CL_ELAST_ERROR = 35 # enum block end: } cl_error_t; CL_DB_PHISHING = 0x2 CL_DB_PHISHING_URLS = 0x8 CL_DB_PUA = 0x10 CL_DB_CVDNOTMP = 0x20 CL_DB_OFFICIAL = 0x40 CL_DB_PUA_MODE = 0x80 CL_DB_PUA_INCLUDE = 0x100 CL_DB_PUA_EXCLUDE = 0x200 CL_DB_COMPILED = 0x400 CL_DB_DIRECTORY = 0x800 CL_DB_OFFICIAL_ONLY = 0x1000 CL_DB_BYTECODE = 0x2000 CL_DB_SIGNED = 0x4000 CL_DB_BYTECODE_UNSIGNED = 0x8000 CL_DB_UNSIGNED = 0x10000 CL_DB_BYTECODE_STATS = 0x20000 CL_DB_ENHANCED = 0x40000 CL_DB_PCRE_STATS = 0x80000 CL_DB_YARA_EXCLUDE = 0x100000 CL_DB_YARA_ONLY = 0x200000 CL_DB_STDOPT = (CL_DB_PHISHING | CL_DB_PHISHING_URLS | CL_DB_BYTECODE) CL_SCAN_GENERAL_ALLMATCHES = 0x1 CL_SCAN_GENERAL_COLLECT_METADATA = 0x2 CL_SCAN_GENERAL_HEURISTICS = 0x4 CL_SCAN_GENERAL_HEURISTIC_PRECEDENCE = 0x8 CL_SCAN_GENERAL_UNPRIVILEGED = 0x10 CL_SCAN_PARSE_ARCHIVE = 0x1 CL_SCAN_PARSE_ELF = 0x2 CL_SCAN_PARSE_PDF = 0x4 CL_SCAN_PARSE_SWF = 0x8 CL_SCAN_PARSE_HWP3 = 0x10 CL_SCAN_PARSE_XMLDOCS = 0x20 CL_SCAN_PARSE_MAIL = 0x40 CL_SCAN_PARSE_OLE2 = 0x80 CL_SCAN_PARSE_HTML = 0x100 CL_SCAN_PARSE_PE = 0x200 CL_SCAN_HEURISTIC_BROKEN = 0x2 CL_SCAN_HEURISTIC_EXCEEDS_MAX = 0x4 CL_SCAN_HEURISTIC_PHISHING_SSL_MISMATCH = 0x8 CL_SCAN_HEURISTIC_PHISHING_CLOAK = 0x10 CL_SCAN_HEURISTIC_MACROS = 0x20 CL_SCAN_HEURISTIC_ENCRYPTED_ARCHIVE = 0x40 CL_SCAN_HEURISTIC_ENCRYPTED_DOC = 0x80 CL_SCAN_HEURISTIC_PARTITION_INTXN = 0x100 CL_SCAN_HEURISTIC_STRUCTURED = 0x200 CL_SCAN_HEURISTIC_STRUCTURED_SSN_NORMAL = 0x400 CL_SCAN_HEURISTIC_STRUCTURED_SSN_STRIPPED = 0x800 CL_SCAN_HEURISTIC_STRUCTURED_CC = 0x1000 CL_SCAN_HEURISTIC_BROKEN_MEDIA = 0x2000 CL_SCAN_MAIL_PARTIAL_MESSAGE = 0x1 CL_SCAN_DEV_COLLECT_SHA = 0x1 CL_SCAN_DEV_COLLECT_PERFORMANCE_INFO = 0x2 CL_COUNTSIGS_OFFICIAL = 0x1 CL_COUNTSIGS_UNOFFICIAL = 0x2 CL_COUNTSIGS_ALL = (CL_COUNTSIGS_OFFICIAL | CL_COUNTSIGS_UNOFFICIAL) CL_INIT_DEFAULT = 0x0 # enum block start: enum cl_engine_field { CL_ENGINE_MAX_SCANSIZE = 0 # /* uint64_t */ CL_ENGINE_MAX_FILESIZE = 1 # /* uint64_t */ CL_ENGINE_MAX_RECURSION = 2 # /* uint32_t */ CL_ENGINE_MAX_FILES = 3 # /* uint32_t */ CL_ENGINE_MIN_CC_COUNT = 4 # /* uint32_t */ CL_ENGINE_MIN_SSN_COUNT = 5 # /* uint32_t */ CL_ENGINE_PUA_CATEGORIES = 6 # /* (char *) */ CL_ENGINE_DB_OPTIONS = 7 # /* uint32_t */ CL_ENGINE_DB_VERSION = 8 # /* uint32_t */ CL_ENGINE_DB_TIME = 9 # /* time_t */ CL_ENGINE_AC_ONLY = 10 # /* uint32_t */ CL_ENGINE_AC_MINDEPTH = 11 # /* uint32_t */ CL_ENGINE_AC_MAXDEPTH = 12 # /* uint32_t */ CL_ENGINE_TMPDIR = 13 # /* (char *) */ CL_ENGINE_KEEPTMP = 14 # /* uint32_t */ CL_ENGINE_BYTECODE_SECURITY = 15 # /* uint32_t */ CL_ENGINE_BYTECODE_TIMEOUT = 16 # /* uint32_t */ CL_ENGINE_BYTECODE_MODE = 17 # /* uint32_t */ CL_ENGINE_MAX_EMBEDDEDPE = 18 # /* uint64_t */ CL_ENGINE_MAX_HTMLNORMALIZE = 19 # /* uint64_t */ CL_ENGINE_MAX_HTMLNOTAGS = 20 # /* uint64_t */ CL_ENGINE_MAX_SCRIPTNORMALIZE = 21 # /* uint64_t */ CL_ENGINE_MAX_ZIPTYPERCG = 22 # /* uint64_t */ CL_ENGINE_FORCETODISK = 23 # /* uint32_t */ CL_ENGINE_DISABLE_CACHE = 24 # /* uint32_t */ CL_ENGINE_DISABLE_PE_STATS = 25 # /* uint32_t */ CL_ENGINE_STATS_TIMEOUT = 26 # /* uint32_t */ CL_ENGINE_MAX_PARTITIONS = 27 # /* uint32_t */ CL_ENGINE_MAX_ICONSPE = 28 # /* uint32_t */ CL_ENGINE_MAX_RECHWP3 = 29 # /* uint32_t */ CL_ENGINE_MAX_SCANTIME = 30 # /* uint32_t */ CL_ENGINE_PCRE_MATCH_LIMIT = 31 # /* uint64_t */ CL_ENGINE_PCRE_RECMATCH_LIMIT = 32 # /* uint64_t */ CL_ENGINE_PCRE_MAX_FILESIZE = 33 # /* uint64_t */ CL_ENGINE_DISABLE_PE_CERTS = 34 # /* uint32_t */ CL_ENGINE_PE_DUMPCERTS = 35 # /* uint32_t */ # enum block end: }; # enum block start: enum bytecode_security { CL_BYTECODE_TRUST_ALL = 0 # /* obsolete */ CL_BYTECODE_TRUST_SIGNED = 1 # /* default */ CL_BYTECODE_TRUST_NOTHING = 2 # /* paranoid setting */ # enum block end: }; # enum block start: enum bytecode_mode { CL_BYTECODE_MODE_AUTO = 0 # /* JIT if possible, fallback to interpreter */ CL_BYTECODE_MODE_JIT = 1 # /* force JIT */ CL_BYTECODE_MODE_INTERPRETER = 2 # /* force interpreter */ CL_BYTECODE_MODE_TEST = 3 # /* both JIT and interpreter, compare results, all failures are fatal */ CL_BYTECODE_MODE_OFF = 4 # /* for query only, not settable */ # enum block end: }; # enum block start: enum cl_msg { CL_MSG_INFO_VERBOSE = 32 # /* verbose */ CL_MSG_WARN = 64 # /* LibClamAV WARNING: */ CL_MSG_ERROR = 128 # /* LibClamAV ERROR: */ # enum block end: }; for key, value in list(globals().items()): if key.startswith("CL_") and (key[3:] not in globals()): exec("%s = %s" % (key[3:], key)) from ctypes import Structure, c_uint32 class OPTIONS(Structure): _fields_ = [ ("general", c_uint32), ("parse", c_uint32), ("heuristic", c_uint32), ("mail", c_uint32), ("dev", c_uint32) ]