1
/* $Id: test_mod.cc,v 1.2 2003/04/22 20:00:51 fygrave Exp $ */
3
** Copyright (C) 2001 Fyodor Yarochkin <fygrave@tigerteam.net>,
4
** Ofir Arkin <ofir@sys-security.com>
6
** This program is free software; you can redistribute it and/or modify
7
** it under the terms of the GNU General Public License as published by
8
** the Free Software Foundation; either version 2 of the License, or
9
** (at your option) any later version.
12
** This program is distributed in the hope that it will be useful,
13
** but WITHOUT ANY WARRANTY; without even the implied warranty of
14
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
** GNU General Public License for more details.
17
** You should have received a copy of the GNU General Public License
18
** along with this program; if not, write to the Free Software
19
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
#define _XPROBE_MODULE
25
#include "xprobe_module.h"
26
#include "xprobe_module_hdlr.h"
28
#include "interface.h"
35
int Test_Mod::init(void) {
37
xprobe_debug(XPROBE_DEBUG_MODULES, "%s module initialized\n", get_name());
42
int Test_Mod::exec(Target *tg, OS_Matrix *os) {
43
xprobe_debug(XPROBE_DEBUG_MODULES, "--%s module has been executed against: %s\n", get_name(),
44
inet_ntoa(tg->get_addr()));
45
os->add_result(get_id(), 1, XPROBE_MATCH_YES);
49
int Test_Mod::fini(void) {
50
xprobe_debug(XPROBE_DEBUG_MODULES, "%s module has been deinitilized\n", get_name());
54
int Test_Mod::parse_keyword(int os_id, char *kwd, char *val) {
56
xprobe_debug(XPROBE_DEBUG_MODULES, "Parsing for %i : %s = %s\n",
61
/* initialization function */
63
int test_mod_init(Xprobe_Module_Hdlr *pt) {
65
Test_Mod *test_mod = new Test_Mod;
67
xprobe_mdebug(XPROBE_DEBUG_MODULES, "Initializing the test module\n");
68
pt->register_module(test_mod);