/usr/include/emu/environment/emu_env.h is in libemu-dev 0.2.0+git20120122-1.2+b1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | /********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2008 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* 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.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
struct emu_env_linux;
struct emu_env_linux_syscall;
struct emu_env_w32;
struct emu_env_w32_dll_export;
/*
typedef void *(*new_env)(struct emu *e);
typedef void (*free_env)(void *env);
typedef int32_t (*env_hook)(void *env, const char *syscallname,
int (*userhook)(void *env, void *syscall, ...),
void *userdata);
typedef int32_t (*env_pre_check)(void *env);
typedef int32_t (*env_post_check)(void *env);
struct env_helper
{
void *env;
void *(*new_env)(struct emu *e);
void (*free_env)(void *env);
int32_t (*env_hook)(void *env, const char *syscallname,
int (*userhook)(void *env, void *syscall, ...),
void *userdata);
int32_t (*env_pre_check)(void *env);
int32_t (*env_post_check)(void *env);
};
struct env_helper envs[] =
{
{
NULL,
(new_env)emu_env_w32_new,
(free_env)emu_env_w32_free,
(env_hook)NULL,
(env_pre_check) NULL,
(env_post_check) NULL
},
{
NULL,
(new_env)emu_env_linux_new,
(free_env)emu_env_linux_free,
(env_hook)emu_env_linux_syscall_hook,
(env_pre_check) NULL,
(env_post_check) NULL
}
};
*/
enum emu_env_type
{
emu_env_type_win32,
emu_env_type_linux,
};
struct emu_env_hook
{
enum emu_env_type type;
union
{
struct emu_env_w32_dll_export *win;
struct emu_env_linux_syscall *lin;
} hook;
};
struct emu_env
{
struct
{
struct emu_env_w32 *win;
struct emu_env_linux *lin;
} env;
struct emu *emu;
// struct env_helper *envs;
struct emu_profile *profile;
void *userdata;
};
struct emu_env *emu_env_new(struct emu *e);
void emu_env_free(struct emu_env *env);
|