Reworked email metaata extraction

This commit is contained in:
Luca Deri
2019-10-21 01:27:07 +02:00
parent 58daa5ed7d
commit 960aa77b6d
8 changed files with 250 additions and 105 deletions
+2 -1
View File
@@ -837,8 +837,9 @@ extern "C" {
char *outbuf, u_int outbuf_len);
char* ndpi_ssl_version2str(u_int16_t version, u_int8_t *unknown_tls_version);
void ndpi_patchIPv6Address(char *str);
void ndpi_user_pwd_payload_copy(u_int8_t *dest, u_int dest_len,
void ndpi_user_pwd_payload_copy(u_int8_t *dest, u_int dest_len, u_int offset,
const u_int8_t *src, u_int src_len);
u_char* ndpi_base64_decode(const u_char *src, size_t len, size_t *out_len);
int ndpi_flow2json(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
+5 -11
View File
@@ -1130,7 +1130,8 @@ struct ndpi_flow_struct {
/* init parameter, internal used to set up timestamp,... */
u_int16_t guessed_protocol_id, guessed_host_protocol_id, guessed_category, guessed_header_category;
u_int8_t l4_proto, protocol_id_already_guessed:1, host_already_guessed:1, init_finished:1, setup_packet_direction:1, packet_direction:1, check_extra_packets:1;
u_int8_t l4_proto, protocol_id_already_guessed:1, host_already_guessed:1,
init_finished:1, setup_packet_direction:1, packet_direction:1, check_extra_packets:1;
/*
if ndpi_struct->direction_detect_disable == 1
@@ -1235,17 +1236,10 @@ struct ndpi_flow_struct {
} http;
struct {
u_int8_t auth_found;
char username[16], password[16];
} ftp;
struct {
char username[16], password[16];
} imap;
struct {
char username[16], password[16];
} pop;
} ftp_imap_pop_smtp;
struct {
/* Bittorrent hash */
u_char hash[20];