forked from barak/ettercap-old
/
ec_profiles.h
85 lines (58 loc) · 1.62 KB
/
ec_profiles.h
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
#ifndef EC_PROFILES_H
#define EC_PROFILES_H
#include <ec_fingerprint.h>
#include <ec_resolv.h>
struct dissector_info {
char *user;
char *pass;
char *info;
char *banner;
char failed;
};
/* the list of users for each port */
struct active_user {
char *user;
char *pass;
char *info;
u_int8 failed;
struct ip_addr client;
LIST_ENTRY(active_user) next;
};
/* each port is indentified this way : */
struct open_port {
u_int16 L4_addr;
u_int8 L4_proto;
/* the service banner */
char *banner;
/* the list of users */
LIST_HEAD(, active_user) users_list_head;
LIST_ENTRY(open_port) next;
};
/* this contains all the info related to an host */
struct host_profile {
u_int8 L2_addr[MEDIA_ADDR_LEN];
struct ip_addr L3_addr;
char hostname[MAX_HOSTNAME_LEN];
/* the list of open ports */
LIST_HEAD(, open_port) open_ports_head;
/* distance in hop (TTL) */
u_int8 distance;
/* local or not ? */
u_int8 type;
/* OS fingerprint */
u_char fingerprint[FINGER_LEN+1];
TAILQ_ENTRY(host_profile) next;
};
/* exported functions */
EC_API_EXTERN void profile_purge_local(void);
EC_API_EXTERN void profile_purge_remote(void);
EC_API_EXTERN void profile_purge_all(void);
EC_API_EXTERN int profile_convert_to_hostlist(void);
EC_API_EXTERN int profile_dump_to_file(char *filename);
/* fake forward declaration (profiles include packet and viceversa) */
struct packet_object;
EC_API_EXTERN void profile_parse(struct packet_object *po);
EC_API_EXTERN void * profile_print(int mode, void *list, char **desc, size_t len);
#endif
/* EOF */
// vim:ts=3:expandtab