bc93eda0 |
/* |
c442ca9c |
* Copyright (C) 2013-2019 Cisco Systems, Inc. and/or its affiliates. All rights reserved. |
1bdaf813 |
* Copyright (C) 2007-2013 Sourcefire, Inc. |
2023340a |
*
* Authors: Tomasz Kojm |
bc93eda0 |
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#ifndef __DCONF_H
#define __DCONF_H
#include <stdio.h> |
056d95dc |
#include <zlib.h> |
bc93eda0 |
#include "clamav.h" |
e8ae4fae |
#include "cvd.h" |
bc93eda0 |
|
b94e66c4 |
#include "mpool.h"
|
bc93eda0 |
struct cli_dconf {
uint32_t pe;
uint32_t elf; |
89c14869 |
uint32_t macho; |
bc93eda0 |
uint32_t archive;
uint32_t doc;
uint32_t mail;
uint32_t other; |
692bda68 |
uint32_t phishing; |
52dd3a6b |
uint32_t bytecode; |
d4f90ad4 |
uint32_t stats; |
82fa5ba0 |
uint32_t pcre; |
bc93eda0 |
};
/* PE flags */
#define PE_CONF_PARITE 0x1
#define PE_CONF_KRIZ 0x2
#define PE_CONF_MAGISTR 0x4
#define PE_CONF_POLIPOS 0x8
#define PE_CONF_MD5SECT 0x10
#define PE_CONF_UPX 0x20
#define PE_CONF_FSG 0x40 |
42d26ac9 |
#define PE_CONF_SWIZZOR 0x80 |
bc93eda0 |
#define PE_CONF_PETITE 0x100
#define PE_CONF_PESPIN 0x200
#define PE_CONF_YC 0x400
#define PE_CONF_WWPACK 0x800
#define PE_CONF_NSPACK 0x1000 |
b6aee321 |
#define PE_CONF_MEW 0x2000
#define PE_CONF_UPACK 0x4000 |
c98bc23f |
#define PE_CONF_ASPACK 0x8000 |
1e2c5907 |
#define PE_CONF_CATALOG 0x10000 |
5eaf0b32 |
#define PE_CONF_CERTS 0x20000
#define PE_CONF_MATCHICON 0x40000 |
4adb74a4 |
#define PE_CONF_IMPTBL 0x80000 |
bc93eda0 |
/* Archive flags */
#define ARCH_CONF_RAR 0x1
#define ARCH_CONF_ZIP 0x2
#define ARCH_CONF_GZ 0x4
#define ARCH_CONF_BZ 0x8
#define ARCH_CONF_SZDD 0x10
#define ARCH_CONF_CAB 0x20
#define ARCH_CONF_CHM 0x40
#define ARCH_CONF_OLE2 0x80
#define ARCH_CONF_TAR 0x100
#define ARCH_CONF_BINHEX 0x200
#define ARCH_CONF_SIS 0x400 |
8fb8d069 |
#define ARCH_CONF_NSIS 0x800 |
9d96e4b6 |
#define ARCH_CONF_ARJ 0x1000 |
7c06afc6 |
#define ARCH_CONF_AUTOIT 0x2000 |
75e46945 |
#define ARCH_CONF_CPIO 0x4000 |
9981dfc4 |
#define ARCH_CONF_ISHIELD 0x8000 |
81fded11 |
#define ARCH_CONF_7Z 0x10000 |
583cd65f |
#define ARCH_CONF_ISO9660 0x20000 |
ca019d6d |
#define ARCH_CONF_DMG 0x40000
#define ARCH_CONF_XAR 0x80000 |
1d1c4b15 |
#define ARCH_CONF_HFSPLUS 0x100000 |
43d7f6f6 |
#define ARCH_CONF_XZ 0x200000 |
f5f7b7a1 |
#define ARCH_CONF_PASSWD 0x400000 |
21f6478f |
#define ARCH_CONF_MBR 0x800000
#define ARCH_CONF_GPT 0x1000000
#define ARCH_CONF_APM 0x2000000 |
bc93eda0 |
/* Document flags */ |
08f0150f |
#define DOC_CONF_HTML 0x1
#define DOC_CONF_RTF 0x2
#define DOC_CONF_PDF 0x4
#define DOC_CONF_SCRIPT 0x8 |
777dd007 |
#define DOC_CONF_HTML_SKIPRAW 0x10 |
8be1d5a4 |
#define DOC_CONF_JSNORM 0x20 |
47762e70 |
#define DOC_CONF_SWF 0x40 |
21f6478f |
#define DOC_CONF_MSXML 0x80
#define DOC_CONF_OOXML 0x100
#define DOC_CONF_HWP 0x200 |
bc93eda0 |
/* Mail flags */
#define MAIL_CONF_MBOX 0x1
#define MAIL_CONF_TNEF 0x2
/* Other flags */
#define OTHER_CONF_UUENC 0x1
#define OTHER_CONF_SCRENC 0x2
#define OTHER_CONF_RIFF 0x4
#define OTHER_CONF_JPEG 0x8
#define OTHER_CONF_CRYPTFF 0x10 |
26fbf6bd |
#define OTHER_CONF_DLP 0x20 |
3f81d93a |
#define OTHER_CONF_MYDOOMLOG 0x40 |
5b74e89a |
#define OTHER_CONF_PREFILTERING 0x80 |
6ee2df5b |
#define OTHER_CONF_PDFNAMEOBJ 0x100 |
558c673e |
#define OTHER_CONF_PRTNINTXN 0x200 |
ce3cf4c6 |
#define OTHER_CONF_LZW 0x400 |
bc93eda0 |
|
692bda68 |
/* Phishing flags */
#define PHISHING_CONF_ENGINE 0x1
#define PHISHING_CONF_ENTCONV 0x2 |
bc93eda0 |
|
52dd3a6b |
/* Bytecode flags */
#define BYTECODE_INTERPRETER 0x1
#define BYTECODE_JIT_X86 0x2
#define BYTECODE_JIT_PPC 0x4
#define BYTECODE_JIT_ARM 0x8
|
d4f90ad4 |
/* Stats/Intel flags */
#define DCONF_STATS_DISABLED 0x1
#define DCONF_STATS_PE_SECTION_DISABLED 0x2
|
82fa5ba0 |
/* PCRE flags */
#define PCRE_CONF_SUPPORT 0x1 |
df50a5ff |
#define PCRE_CONF_OPTIONS 0x2
#define PCRE_CONF_GLOBAL 0x4 |
82fa5ba0 |
|
52dd3a6b |
#define BYTECODE_ENGINE_MASK (BYTECODE_INTERPRETER | BYTECODE_JIT_X86 | BYTECODE_JIT_PPC | BYTECODE_JIT_ARM)
|
b94e66c4 |
#ifdef USE_MPOOL |
47d40feb |
struct cli_dconf *cli_dconf_init(mpool_t *);
#define cli_mpool_dconf_init(a) cli_dconf_init(a) |
b94e66c4 |
#else |
bc93eda0 |
struct cli_dconf *cli_dconf_init(void); |
47d40feb |
#define cli_mpool_dconf_init(a) cli_dconf_init() |
b94e66c4 |
#endif |
bc93eda0 |
void cli_dconf_print(struct cli_dconf *dconf); |
15850fc6 |
int cli_dconf_load(FILE *fs, struct cl_engine *engine, unsigned int options, struct cli_dbio *dbio); |
bc93eda0 |
#endif |