-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathhandler.h
More file actions
71 lines (60 loc) · 1.87 KB
/
handler.h
File metadata and controls
71 lines (60 loc) · 1.87 KB
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
/* cSploit - a simple penetration testing suite
* Copyright (C) 2014 Massimo Dragano aka tux_mind <tux_mind@csploit.org>
*
* cSploit 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 3 of the License, or
* (at your option) any later version.
*
* cSploit 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 cSploit. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef HANDLER_H
#define HANDLER_H
#include <stdint.h>
#include <jni.h>
#include <csploit/list.h>
#include <csploit/control.h>
typedef struct handler {
node *next;
uint8_t id; ///< handler id
uint8_t have_stdin:1; ///< does it have stdin ?
uint8_t have_stdout:1; ///< does it have stdout ?
uint8_t reserved:6;
char *name; ///< an human readable identifier
} handler;
enum handlers_loading_status {
HANDLER_UNKOWN, // inital value ( 0x0 )
HANDLER_WAIT,
HANDLER_OK
};
extern struct handlers_list {
data_control control;
list list;
struct {
handler *blind;
handler *raw;
handler *nmap;
handler *ettercap;
handler *hydra;
handler *arpspoof;
handler *tcpdump;
handler *fusemounts;
handler *network_radar;
handler *msfrpcd;
} by_name; ///< access handlers by name
enum handlers_loading_status status;
} handlers;
struct message;
jboolean jload_handlers(JNIEnv *, jclass);
void unload_handlers(void);
int on_handler(struct message *);
jobjectArray get_handlers(JNIEnv *, jclass);
handler *get_handler_by_name(const char *);
#endif