aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/mail_pop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/protocols/mail_pop.c')
-rw-r--r--src/lib/protocols/mail_pop.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/lib/protocols/mail_pop.c b/src/lib/protocols/mail_pop.c
index 7d25d34df..c3ab9ffe0 100644
--- a/src/lib/protocols/mail_pop.c
+++ b/src/lib/protocols/mail_pop.c
@@ -70,8 +70,8 @@ static int ndpi_int_mail_pop_check_for_client_commands(struct ndpi_detection_mod
&& (packet->payload[1] == 'S' || packet->payload[1] == 's')
&& (packet->payload[2] == 'E' || packet->payload[2] == 'e')
&& (packet->payload[3] == 'R' || packet->payload[3] == 'r')) {
- ndpi_user_pwd_payload_copy((u_int8_t*)flow->protos.pop.username,
- sizeof(flow->protos.pop.username),
+ ndpi_user_pwd_payload_copy((u_int8_t*)flow->protos.ftp_imap_pop_smtp.username,
+ sizeof(flow->protos.ftp_imap_pop_smtp.username), 5,
packet->payload, packet->payload_packet_len);
flow->l4.tcp.pop_command_bitmask |= POP_BIT_USER;
@@ -80,8 +80,8 @@ static int ndpi_int_mail_pop_check_for_client_commands(struct ndpi_detection_mod
&& (packet->payload[1] == 'A' || packet->payload[1] == 'a')
&& (packet->payload[2] == 'S' || packet->payload[2] == 's')
&& (packet->payload[3] == 'S' || packet->payload[3] == 's')) {
- ndpi_user_pwd_payload_copy((u_int8_t*)flow->protos.pop.password,
- sizeof(flow->protos.pop.password),
+ ndpi_user_pwd_payload_copy((u_int8_t*)flow->protos.ftp_imap_pop_smtp.password,
+ sizeof(flow->protos.ftp_imap_pop_smtp.password), 5,
packet->payload, packet->payload_packet_len);
flow->l4.tcp.pop_command_bitmask |= POP_BIT_PASS;
@@ -172,10 +172,8 @@ void ndpi_search_mail_pop_tcp(struct ndpi_detection_module_struct
if((bit_count + flow->l4.tcp.mail_pop_stage) >= 3) {
if(flow->l4.tcp.mail_pop_stage > 0) {
NDPI_LOG_INFO(ndpi_struct, "mail_pop identified\n");
-
- // printf("==> %u\n", flow->l4.tcp.mail_pop_stage);
- if((flow->protos.pop.password[0] != '\0')
+ if((flow->protos.ftp_imap_pop_smtp.password[0] != '\0')
|| (flow->l4.tcp.mail_pop_stage > 3))
ndpi_int_mail_pop_add_connection(ndpi_struct, flow);
}