2004-01-23 11:17:16 +00:00
|
|
|
/*
|
2004-01-25 06:34:45 +00:00
|
|
|
* Extract VBA source code for component MS Office Documents
|
2004-01-23 11:17:16 +00:00
|
|
|
*
|
2015-09-17 13:41:26 -04:00
|
|
|
* Copyright (C) 2015 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
|
2008-04-02 15:24:51 +00:00
|
|
|
* Copyright (C) 2007-2008 Sourcefire, Inc.
|
|
|
|
*
|
|
|
|
* Authors: Trog, Nigel Horne
|
2007-12-13 16:18:18 +00:00
|
|
|
*
|
2004-01-23 11:17:16 +00:00
|
|
|
* This program is free software; you can redistribute it and/or modify
|
2008-04-02 15:24:51 +00:00
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
2004-01-23 11:17:16 +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.
|
2004-01-23 11:17:16 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __VBA_EXTRACT_H
|
|
|
|
#define __VBA_EXTRACT_H
|
|
|
|
|
2008-05-27 16:30:47 +00:00
|
|
|
#include "others.h"
|
2004-01-25 06:34:45 +00:00
|
|
|
#include "cltypes.h"
|
2008-08-03 14:30:33 +00:00
|
|
|
#include "uniq.h"
|
2004-01-23 11:17:16 +00:00
|
|
|
|
|
|
|
typedef struct vba_project_tag {
|
2008-08-03 14:30:33 +00:00
|
|
|
char **name;
|
2008-05-27 16:30:47 +00:00
|
|
|
uint32_t *colls;
|
2004-01-23 11:17:16 +00:00
|
|
|
uint32_t *offset;
|
2004-04-27 11:42:53 +00:00
|
|
|
uint32_t *length; /* for Word 6 macros */
|
|
|
|
unsigned char *key; /* for Word 6 macros */
|
2004-01-23 11:17:16 +00:00
|
|
|
char *dir;
|
2008-05-27 16:30:47 +00:00
|
|
|
struct uniq *U;
|
2008-01-24 13:24:02 +00:00
|
|
|
int count;
|
2004-01-23 11:17:16 +00:00
|
|
|
} vba_project_t;
|
|
|
|
|
2008-05-27 16:30:47 +00:00
|
|
|
vba_project_t *cli_vba_readdir(const char *dir, struct uniq *U, uint32_t which);
|
|
|
|
vba_project_t *cli_wm_readdir(int fd);
|
2007-12-18 14:32:47 +00:00
|
|
|
unsigned char *cli_vba_inflate(int fd, off_t offset, int *size);
|
2008-05-27 16:30:47 +00:00
|
|
|
int cli_scan_ole10(int fd, cli_ctx *ctx);
|
2008-11-14 22:23:39 +00:00
|
|
|
char *cli_ppt_vba_read(int fd, cli_ctx *ctx);
|
2007-12-18 14:32:47 +00:00
|
|
|
unsigned char *cli_wm_decrypt_macro(int fd, off_t offset, uint32_t len,
|
2004-04-27 11:42:53 +00:00
|
|
|
unsigned char key);
|
2004-01-23 11:17:16 +00:00
|
|
|
#endif
|