spelling: unencrypted
This commit is contained in:
@@ -103,7 +103,7 @@
|
|||||||
#define NDPI_PROTOCOL_SSL_NO_CERT 64 /* SSL without certificate (Skype Ultrasurf?) - ntop.org */
|
#define NDPI_PROTOCOL_SSL_NO_CERT 64 /* SSL without certificate (Skype Ultrasurf?) - ntop.org */
|
||||||
#define NDPI_PROTOCOL_IRC 65
|
#define NDPI_PROTOCOL_IRC 65
|
||||||
#define NDPI_PROTOCOL_AYIYA 66
|
#define NDPI_PROTOCOL_AYIYA 66
|
||||||
#define NDPI_PROTOCOL_UNENCRYPED_JABBER 67
|
#define NDPI_PROTOCOL_UNENCRYPTED_JABBER 67
|
||||||
#define NDPI_PROTOCOL_MSN 68
|
#define NDPI_PROTOCOL_MSN 68
|
||||||
#define NDPI_PROTOCOL_OSCAR 69
|
#define NDPI_PROTOCOL_OSCAR 69
|
||||||
#define NDPI_PROTOCOL_YAHOO 70
|
#define NDPI_PROTOCOL_YAHOO 70
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ struct ndpi_id_struct {
|
|||||||
#ifdef NDPI_PROTOCOL_ZATTOO
|
#ifdef NDPI_PROTOCOL_ZATTOO
|
||||||
u_int32_t zattoo_ts;
|
u_int32_t zattoo_ts;
|
||||||
#endif
|
#endif
|
||||||
#ifdef NDPI_PROTOCOL_UNENCRYPED_JABBER
|
#ifdef NDPI_PROTOCOL_UNENCRYPTED_JABBER
|
||||||
u_int32_t jabber_stun_or_ft_ts;
|
u_int32_t jabber_stun_or_ft_ts;
|
||||||
#endif
|
#endif
|
||||||
#ifdef NDPI_PROTOCOL_DIRECTCONNECT
|
#ifdef NDPI_PROTOCOL_DIRECTCONNECT
|
||||||
@@ -404,7 +404,7 @@ struct ndpi_id_struct {
|
|||||||
u_int16_t bt_port_t[NDPI_BT_PORTS];
|
u_int16_t bt_port_t[NDPI_BT_PORTS];
|
||||||
u_int16_t bt_port_u[NDPI_BT_PORTS];
|
u_int16_t bt_port_u[NDPI_BT_PORTS];
|
||||||
#endif
|
#endif
|
||||||
#ifdef NDPI_PROTOCOL_UNENCRYPED_JABBER
|
#ifdef NDPI_PROTOCOL_UNENCRYPTED_JABBER
|
||||||
#define JABBER_MAX_STUN_PORTS 6
|
#define JABBER_MAX_STUN_PORTS 6
|
||||||
u_int16_t jabber_voice_stun_port[JABBER_MAX_STUN_PORTS];
|
u_int16_t jabber_voice_stun_port[JABBER_MAX_STUN_PORTS];
|
||||||
u_int16_t jabber_file_transfer_port[2];
|
u_int16_t jabber_file_transfer_port[2];
|
||||||
@@ -425,7 +425,7 @@ struct ndpi_id_struct {
|
|||||||
#ifdef NDPI_PROTOCOL_OSCAR
|
#ifdef NDPI_PROTOCOL_OSCAR
|
||||||
u_int8_t oscar_ssl_session_id[33];
|
u_int8_t oscar_ssl_session_id[33];
|
||||||
#endif
|
#endif
|
||||||
#ifdef NDPI_PROTOCOL_UNENCRYPED_JABBER
|
#ifdef NDPI_PROTOCOL_UNENCRYPTED_JABBER
|
||||||
u_int8_t jabber_voice_stun_used_ports;
|
u_int8_t jabber_voice_stun_used_ports;
|
||||||
#endif
|
#endif
|
||||||
#ifdef NDPI_PROTOCOL_SIP
|
#ifdef NDPI_PROTOCOL_SIP
|
||||||
|
|||||||
+2
-2
@@ -1037,9 +1037,9 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
|
|||||||
no_master, "Ayiya", NDPI_PROTOCOL_CATEGORY_NETWORK,
|
no_master, "Ayiya", NDPI_PROTOCOL_CATEGORY_NETWORK,
|
||||||
ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
|
ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
|
||||||
ndpi_build_default_ports(ports_b, 5072, 0, 0, 0, 0) /* UDP */);
|
ndpi_build_default_ports(ports_b, 5072, 0, 0, 0, 0) /* UDP */);
|
||||||
ndpi_set_proto_defaults(ndpi_mod, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_UNENCRYPED_JABBER,
|
ndpi_set_proto_defaults(ndpi_mod, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_UNENCRYPTED_JABBER,
|
||||||
no_master,
|
no_master,
|
||||||
no_master, "Unencryped_Jabber", NDPI_PROTOCOL_CATEGORY_WEB,
|
no_master, "Unencrypted_Jabber", NDPI_PROTOCOL_CATEGORY_WEB,
|
||||||
ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
|
ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
|
||||||
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
|
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
|
||||||
ndpi_set_proto_defaults(ndpi_mod, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_OSCAR,
|
ndpi_set_proto_defaults(ndpi_mod, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_OSCAR,
|
||||||
|
|||||||
+34
-34
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include "ndpi_api.h"
|
#include "ndpi_api.h"
|
||||||
|
|
||||||
#ifdef NDPI_PROTOCOL_UNENCRYPED_JABBER
|
#ifdef NDPI_PROTOCOL_UNENCRYPTED_JABBER
|
||||||
struct jabber_string {
|
struct jabber_string {
|
||||||
char *string;
|
char *string;
|
||||||
u_int ndpi_protocol;
|
u_int ndpi_protocol;
|
||||||
@@ -70,19 +70,19 @@ void ndpi_search_jabber_tcp(struct ndpi_detection_module_struct *ndpi_struct, st
|
|||||||
|
|
||||||
u_int16_t x;
|
u_int16_t x;
|
||||||
|
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct, NDPI_LOG_TRACE, "JABBER detection....\n");
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct, NDPI_LOG_TRACE, "JABBER detection....\n");
|
||||||
|
|
||||||
/* search for jabber file transfer */
|
/* search for jabber file transfer */
|
||||||
/* this part is working asymmetrically */
|
/* this part is working asymmetrically */
|
||||||
if (packet->tcp != NULL && packet->tcp->syn != 0 && packet->payload_packet_len == 0) {
|
if (packet->tcp != NULL && packet->tcp->syn != 0 && packet->payload_packet_len == 0) {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct, NDPI_LOG_DEBUG, "check jabber syn\n");
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct, NDPI_LOG_DEBUG, "check jabber syn\n");
|
||||||
if (src != NULL && src->jabber_file_transfer_port[0] != 0) {
|
if (src != NULL && src->jabber_file_transfer_port[0] != 0) {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct, NDPI_LOG_DEBUG,
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct, NDPI_LOG_DEBUG,
|
||||||
"src jabber ft port set, ports are: %u, %u\n", ntohs(src->jabber_file_transfer_port[0]),
|
"src jabber ft port set, ports are: %u, %u\n", ntohs(src->jabber_file_transfer_port[0]),
|
||||||
ntohs(src->jabber_file_transfer_port[1]));
|
ntohs(src->jabber_file_transfer_port[1]));
|
||||||
if (((u_int32_t)
|
if (((u_int32_t)
|
||||||
(packet->tick_timestamp - src->jabber_stun_or_ft_ts)) >= ndpi_struct->jabber_file_transfer_timeout) {
|
(packet->tick_timestamp - src->jabber_stun_or_ft_ts)) >= ndpi_struct->jabber_file_transfer_timeout) {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct,
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct,
|
||||||
NDPI_LOG_DEBUG, "JABBER src stun timeout %u %u\n", src->jabber_stun_or_ft_ts,
|
NDPI_LOG_DEBUG, "JABBER src stun timeout %u %u\n", src->jabber_stun_or_ft_ts,
|
||||||
packet->tick_timestamp);
|
packet->tick_timestamp);
|
||||||
src->jabber_file_transfer_port[0] = 0;
|
src->jabber_file_transfer_port[0] = 0;
|
||||||
@@ -91,20 +91,20 @@ void ndpi_search_jabber_tcp(struct ndpi_detection_module_struct *ndpi_struct, st
|
|||||||
|| src->jabber_file_transfer_port[0] == packet->tcp->source
|
|| src->jabber_file_transfer_port[0] == packet->tcp->source
|
||||||
|| src->jabber_file_transfer_port[1] == packet->tcp->dest
|
|| src->jabber_file_transfer_port[1] == packet->tcp->dest
|
||||||
|| src->jabber_file_transfer_port[1] == packet->tcp->source) {
|
|| src->jabber_file_transfer_port[1] == packet->tcp->source) {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct, NDPI_LOG_DEBUG,
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct, NDPI_LOG_DEBUG,
|
||||||
"found jabber file transfer.\n");
|
"found jabber file transfer.\n");
|
||||||
|
|
||||||
ndpi_int_jabber_add_connection(ndpi_struct, flow,
|
ndpi_int_jabber_add_connection(ndpi_struct, flow,
|
||||||
NDPI_PROTOCOL_UNENCRYPED_JABBER);
|
NDPI_PROTOCOL_UNENCRYPTED_JABBER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dst != NULL && dst->jabber_file_transfer_port[0] != 0) {
|
if (dst != NULL && dst->jabber_file_transfer_port[0] != 0) {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct, NDPI_LOG_DEBUG,
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct, NDPI_LOG_DEBUG,
|
||||||
"dst jabber ft port set, ports are: %u, %u\n", ntohs(dst->jabber_file_transfer_port[0]),
|
"dst jabber ft port set, ports are: %u, %u\n", ntohs(dst->jabber_file_transfer_port[0]),
|
||||||
ntohs(dst->jabber_file_transfer_port[1]));
|
ntohs(dst->jabber_file_transfer_port[1]));
|
||||||
if (((u_int32_t)
|
if (((u_int32_t)
|
||||||
(packet->tick_timestamp - dst->jabber_stun_or_ft_ts)) >= ndpi_struct->jabber_file_transfer_timeout) {
|
(packet->tick_timestamp - dst->jabber_stun_or_ft_ts)) >= ndpi_struct->jabber_file_transfer_timeout) {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct,
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct,
|
||||||
NDPI_LOG_DEBUG, "JABBER dst stun timeout %u %u\n", dst->jabber_stun_or_ft_ts,
|
NDPI_LOG_DEBUG, "JABBER dst stun timeout %u %u\n", dst->jabber_stun_or_ft_ts,
|
||||||
packet->tick_timestamp);
|
packet->tick_timestamp);
|
||||||
dst->jabber_file_transfer_port[0] = 0;
|
dst->jabber_file_transfer_port[0] = 0;
|
||||||
@@ -113,11 +113,11 @@ void ndpi_search_jabber_tcp(struct ndpi_detection_module_struct *ndpi_struct, st
|
|||||||
|| dst->jabber_file_transfer_port[0] == packet->tcp->source
|
|| dst->jabber_file_transfer_port[0] == packet->tcp->source
|
||||||
|| dst->jabber_file_transfer_port[1] == packet->tcp->dest
|
|| dst->jabber_file_transfer_port[1] == packet->tcp->dest
|
||||||
|| dst->jabber_file_transfer_port[1] == packet->tcp->source) {
|
|| dst->jabber_file_transfer_port[1] == packet->tcp->source) {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct, NDPI_LOG_DEBUG,
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct, NDPI_LOG_DEBUG,
|
||||||
"found jabber file transfer.\n");
|
"found jabber file transfer.\n");
|
||||||
|
|
||||||
ndpi_int_jabber_add_connection(ndpi_struct, flow,
|
ndpi_int_jabber_add_connection(ndpi_struct, flow,
|
||||||
NDPI_PROTOCOL_UNENCRYPED_JABBER);
|
NDPI_PROTOCOL_UNENCRYPTED_JABBER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@@ -129,23 +129,23 @@ void ndpi_search_jabber_tcp(struct ndpi_detection_module_struct *ndpi_struct, st
|
|||||||
|
|
||||||
|
|
||||||
/* this part parses a packet and searches for port=. it works asymmetrically. */
|
/* this part parses a packet and searches for port=. it works asymmetrically. */
|
||||||
if (packet->detected_protocol_stack[0] == NDPI_PROTOCOL_UNENCRYPED_JABBER) {
|
if (packet->detected_protocol_stack[0] == NDPI_PROTOCOL_UNENCRYPTED_JABBER) {
|
||||||
u_int16_t lastlen;
|
u_int16_t lastlen;
|
||||||
u_int16_t j_port = 0;
|
u_int16_t j_port = 0;
|
||||||
/* check for google jabber voip connections ... */
|
/* check for google jabber voip connections ... */
|
||||||
/* need big packet */
|
/* need big packet */
|
||||||
if (packet->payload_packet_len < 100) {
|
if (packet->payload_packet_len < 100) {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct, NDPI_LOG_DEBUG, "packet too small, return.\n");
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct, NDPI_LOG_DEBUG, "packet too small, return.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* need message to or type for file-transfer */
|
/* need message to or type for file-transfer */
|
||||||
if (memcmp(packet->payload, "<iq from=\"", 8) == 0 || memcmp(packet->payload, "<iq from=\'", 8) == 0) {
|
if (memcmp(packet->payload, "<iq from=\"", 8) == 0 || memcmp(packet->payload, "<iq from=\'", 8) == 0) {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct, NDPI_LOG_DEBUG, "JABBER <iq from=\".\n");
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct, NDPI_LOG_DEBUG, "JABBER <iq from=\".\n");
|
||||||
lastlen = packet->payload_packet_len - 11;
|
lastlen = packet->payload_packet_len - 11;
|
||||||
for (x = 10; x < lastlen; x++) {
|
for (x = 10; x < lastlen; x++) {
|
||||||
if (packet->payload[x] == 'p') {
|
if (packet->payload[x] == 'p') {
|
||||||
if (memcmp(&packet->payload[x], "port=", 5) == 0) {
|
if (memcmp(&packet->payload[x], "port=", 5) == 0) {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct, NDPI_LOG_DEBUG, "port=\n");
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct, NDPI_LOG_DEBUG, "port=\n");
|
||||||
if (src != NULL) {
|
if (src != NULL) {
|
||||||
src->jabber_stun_or_ft_ts = packet->tick_timestamp;
|
src->jabber_stun_or_ft_ts = packet->tick_timestamp;
|
||||||
}
|
}
|
||||||
@@ -155,16 +155,16 @@ void ndpi_search_jabber_tcp(struct ndpi_detection_module_struct *ndpi_struct, st
|
|||||||
}
|
}
|
||||||
x += 6;
|
x += 6;
|
||||||
j_port = ntohs_ndpi_bytestream_to_number(&packet->payload[x], packet->payload_packet_len, &x);
|
j_port = ntohs_ndpi_bytestream_to_number(&packet->payload[x], packet->payload_packet_len, &x);
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct,
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct,
|
||||||
NDPI_LOG_DEBUG, "JABBER port : %u\n", ntohs(j_port));
|
NDPI_LOG_DEBUG, "JABBER port : %u\n", ntohs(j_port));
|
||||||
if (src != NULL) {
|
if (src != NULL) {
|
||||||
if (src->jabber_file_transfer_port[0] == 0 || src->jabber_file_transfer_port[0] == j_port) {
|
if (src->jabber_file_transfer_port[0] == 0 || src->jabber_file_transfer_port[0] == j_port) {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct,
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct,
|
||||||
NDPI_LOG_DEBUG, "src->jabber_file_transfer_port[0] = j_port = %u;\n",
|
NDPI_LOG_DEBUG, "src->jabber_file_transfer_port[0] = j_port = %u;\n",
|
||||||
ntohs(j_port));
|
ntohs(j_port));
|
||||||
src->jabber_file_transfer_port[0] = j_port;
|
src->jabber_file_transfer_port[0] = j_port;
|
||||||
} else {
|
} else {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct,
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct,
|
||||||
NDPI_LOG_DEBUG, "src->jabber_file_transfer_port[1] = j_port = %u;\n",
|
NDPI_LOG_DEBUG, "src->jabber_file_transfer_port[1] = j_port = %u;\n",
|
||||||
ntohs(j_port));
|
ntohs(j_port));
|
||||||
src->jabber_file_transfer_port[1] = j_port;
|
src->jabber_file_transfer_port[1] = j_port;
|
||||||
@@ -172,12 +172,12 @@ void ndpi_search_jabber_tcp(struct ndpi_detection_module_struct *ndpi_struct, st
|
|||||||
}
|
}
|
||||||
if (dst != NULL) {
|
if (dst != NULL) {
|
||||||
if (dst->jabber_file_transfer_port[0] == 0 || dst->jabber_file_transfer_port[0] == j_port) {
|
if (dst->jabber_file_transfer_port[0] == 0 || dst->jabber_file_transfer_port[0] == j_port) {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct,
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct,
|
||||||
NDPI_LOG_DEBUG, "dst->jabber_file_transfer_port[0] = j_port = %u;\n",
|
NDPI_LOG_DEBUG, "dst->jabber_file_transfer_port[0] = j_port = %u;\n",
|
||||||
ntohs(j_port));
|
ntohs(j_port));
|
||||||
dst->jabber_file_transfer_port[0] = j_port;
|
dst->jabber_file_transfer_port[0] = j_port;
|
||||||
} else {
|
} else {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct,
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct,
|
||||||
NDPI_LOG_DEBUG, "dst->jabber_file_transfer_port[1] = j_port = %u;\n",
|
NDPI_LOG_DEBUG, "dst->jabber_file_transfer_port[1] = j_port = %u;\n",
|
||||||
ntohs(j_port));
|
ntohs(j_port));
|
||||||
dst->jabber_file_transfer_port[1] = j_port;
|
dst->jabber_file_transfer_port[1] = j_port;
|
||||||
@@ -191,7 +191,7 @@ void ndpi_search_jabber_tcp(struct ndpi_detection_module_struct *ndpi_struct, st
|
|||||||
|
|
||||||
} else if (memcmp(packet->payload, "<iq to=\"", 8) == 0 || memcmp(packet->payload, "<iq to=\'", 8) == 0
|
} else if (memcmp(packet->payload, "<iq to=\"", 8) == 0 || memcmp(packet->payload, "<iq to=\'", 8) == 0
|
||||||
|| memcmp(packet->payload, "<iq type=", 9) == 0) {
|
|| memcmp(packet->payload, "<iq type=", 9) == 0) {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct, NDPI_LOG_DEBUG, "JABBER <iq to=\"/type=\"\n");
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct, NDPI_LOG_DEBUG, "JABBER <iq to=\"/type=\"\n");
|
||||||
lastlen = packet->payload_packet_len - 21;
|
lastlen = packet->payload_packet_len - 21;
|
||||||
for (x = 8; x < lastlen; x++) {
|
for (x = 8; x < lastlen; x++) {
|
||||||
/* invalid character */
|
/* invalid character */
|
||||||
@@ -199,7 +199,7 @@ void ndpi_search_jabber_tcp(struct ndpi_detection_module_struct *ndpi_struct, st
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (packet->payload[x] == '@') {
|
if (packet->payload[x] == '@') {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct, NDPI_LOG_DEBUG, "JABBER @\n");
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct, NDPI_LOG_DEBUG, "JABBER @\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -211,7 +211,7 @@ void ndpi_search_jabber_tcp(struct ndpi_detection_module_struct *ndpi_struct, st
|
|||||||
for (; x < lastlen; x++) {
|
for (; x < lastlen; x++) {
|
||||||
if (packet->payload[x] == 'p') {
|
if (packet->payload[x] == 'p') {
|
||||||
if (memcmp(&packet->payload[x], "port=", 5) == 0) {
|
if (memcmp(&packet->payload[x], "port=", 5) == 0) {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct, NDPI_LOG_DEBUG, "port=\n");
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct, NDPI_LOG_DEBUG, "port=\n");
|
||||||
if (src != NULL) {
|
if (src != NULL) {
|
||||||
src->jabber_stun_or_ft_ts = packet->tick_timestamp;
|
src->jabber_stun_or_ft_ts = packet->tick_timestamp;
|
||||||
}
|
}
|
||||||
@@ -222,7 +222,7 @@ void ndpi_search_jabber_tcp(struct ndpi_detection_module_struct *ndpi_struct, st
|
|||||||
|
|
||||||
x += 6;
|
x += 6;
|
||||||
j_port = ntohs_ndpi_bytestream_to_number(&packet->payload[x], packet->payload_packet_len, &x);
|
j_port = ntohs_ndpi_bytestream_to_number(&packet->payload[x], packet->payload_packet_len, &x);
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct,
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct,
|
||||||
NDPI_LOG_DEBUG, "JABBER port : %u\n", ntohs(j_port));
|
NDPI_LOG_DEBUG, "JABBER port : %u\n", ntohs(j_port));
|
||||||
|
|
||||||
if (src != NULL && src->jabber_voice_stun_used_ports < JABBER_MAX_STUN_PORTS - 1) {
|
if (src != NULL && src->jabber_voice_stun_used_ports < JABBER_MAX_STUN_PORTS - 1) {
|
||||||
@@ -232,11 +232,11 @@ void ndpi_search_jabber_tcp(struct ndpi_detection_module_struct *ndpi_struct, st
|
|||||||
} else {
|
} else {
|
||||||
if (src->jabber_file_transfer_port[0] == 0
|
if (src->jabber_file_transfer_port[0] == 0
|
||||||
|| src->jabber_file_transfer_port[0] == j_port) {
|
|| src->jabber_file_transfer_port[0] == j_port) {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct, NDPI_LOG_DEBUG,
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct, NDPI_LOG_DEBUG,
|
||||||
"src->jabber_file_transfer_port[0] = j_port = %u;\n", ntohs(j_port));
|
"src->jabber_file_transfer_port[0] = j_port = %u;\n", ntohs(j_port));
|
||||||
src->jabber_file_transfer_port[0] = j_port;
|
src->jabber_file_transfer_port[0] = j_port;
|
||||||
} else {
|
} else {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct,
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct,
|
||||||
NDPI_LOG_DEBUG, "src->jabber_file_transfer_port[1] = j_port = %u;\n",
|
NDPI_LOG_DEBUG, "src->jabber_file_transfer_port[1] = j_port = %u;\n",
|
||||||
ntohs(j_port));
|
ntohs(j_port));
|
||||||
src->jabber_file_transfer_port[1] = j_port;
|
src->jabber_file_transfer_port[1] = j_port;
|
||||||
@@ -251,11 +251,11 @@ void ndpi_search_jabber_tcp(struct ndpi_detection_module_struct *ndpi_struct, st
|
|||||||
} else {
|
} else {
|
||||||
if (dst->jabber_file_transfer_port[0] == 0
|
if (dst->jabber_file_transfer_port[0] == 0
|
||||||
|| dst->jabber_file_transfer_port[0] == j_port) {
|
|| dst->jabber_file_transfer_port[0] == j_port) {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct, NDPI_LOG_DEBUG,
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct, NDPI_LOG_DEBUG,
|
||||||
"dst->jabber_file_transfer_port[0] = j_port = %u;\n", ntohs(j_port));
|
"dst->jabber_file_transfer_port[0] = j_port = %u;\n", ntohs(j_port));
|
||||||
dst->jabber_file_transfer_port[0] = j_port;
|
dst->jabber_file_transfer_port[0] = j_port;
|
||||||
} else {
|
} else {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct,
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct,
|
||||||
NDPI_LOG_DEBUG, "dst->jabber_file_transfer_port[1] = j_port = %u;\n",
|
NDPI_LOG_DEBUG, "dst->jabber_file_transfer_port[1] = j_port = %u;\n",
|
||||||
ntohs(j_port));
|
ntohs(j_port));
|
||||||
dst->jabber_file_transfer_port[1] = j_port;
|
dst->jabber_file_transfer_port[1] = j_port;
|
||||||
@@ -282,7 +282,7 @@ void ndpi_search_jabber_tcp(struct ndpi_detection_module_struct *ndpi_struct, st
|
|||||||
|| ndpi_strnstr((const char *)&packet->payload[13], "xmlns:stream=\"http://etherx.jabber.org/streams\"", start)) {
|
|| ndpi_strnstr((const char *)&packet->payload[13], "xmlns:stream=\"http://etherx.jabber.org/streams\"", start)) {
|
||||||
|
|
||||||
/* Protocol family */
|
/* Protocol family */
|
||||||
ndpi_int_jabber_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_UNENCRYPED_JABBER);
|
ndpi_int_jabber_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_UNENCRYPTED_JABBER);
|
||||||
|
|
||||||
/* search for subprotocols */
|
/* search for subprotocols */
|
||||||
check_content_type_and_change_protocol(ndpi_struct, flow, 13);
|
check_content_type_and_change_protocol(ndpi_struct, flow, 13);
|
||||||
@@ -291,13 +291,13 @@ void ndpi_search_jabber_tcp(struct ndpi_detection_module_struct *ndpi_struct, st
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (flow->packet_counter < 3) {
|
if (flow->packet_counter < 3) {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct,
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct,
|
||||||
NDPI_LOG_DEBUG, "packet_counter: %u\n", flow->packet_counter);
|
NDPI_LOG_DEBUG, "packet_counter: %u\n", flow->packet_counter);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct, NDPI_LOG_TRACE, "JABBER Excluded.\n");
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct, NDPI_LOG_TRACE, "JABBER Excluded.\n");
|
||||||
NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_UNENCRYPED_JABBER);
|
NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_UNENCRYPTED_JABBER);
|
||||||
|
|
||||||
#ifdef NDPI_PROTOCOL_TRUPHONE
|
#ifdef NDPI_PROTOCOL_TRUPHONE
|
||||||
NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_TRUPHONE);
|
NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_TRUPHONE);
|
||||||
@@ -307,8 +307,8 @@ void ndpi_search_jabber_tcp(struct ndpi_detection_module_struct *ndpi_struct, st
|
|||||||
|
|
||||||
void init_jabber_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask)
|
void init_jabber_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask)
|
||||||
{
|
{
|
||||||
ndpi_set_bitmask_protocol_detection("Unencryped_Jabber", ndpi_struct, detection_bitmask, *id,
|
ndpi_set_bitmask_protocol_detection("Unencrypted_Jabber", ndpi_struct, detection_bitmask, *id,
|
||||||
NDPI_PROTOCOL_UNENCRYPED_JABBER,
|
NDPI_PROTOCOL_UNENCRYPTED_JABBER,
|
||||||
ndpi_search_jabber_tcp,
|
ndpi_search_jabber_tcp,
|
||||||
NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_TCP_OR_UDP_WITHOUT_RETRANSMISSION,
|
NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_TCP_OR_UDP_WITHOUT_RETRANSMISSION,
|
||||||
SAVE_DETECTION_BITMASK_AS_UNKNOWN,
|
SAVE_DETECTION_BITMASK_AS_UNKNOWN,
|
||||||
|
|||||||
@@ -363,14 +363,14 @@ static void ssl_mark_and_payload_search_for_other_protocols(struct
|
|||||||
ndpi_detection_module_struct
|
ndpi_detection_module_struct
|
||||||
*ndpi_struct, struct ndpi_flow_struct *flow)
|
*ndpi_struct, struct ndpi_flow_struct *flow)
|
||||||
{
|
{
|
||||||
#if defined(NDPI_PROTOCOL_MEEBO)|| defined(NDPI_PROTOCOL_TOR) || defined(NDPI_PROTOCOL_VPN_X) || defined(NDPI_PROTOCOL_UNENCRYPED_JABBER) || defined (NDPI_PROTOCOL_OSCAR) || defined (NDPI_PROTOCOL_ITUNES) || defined (NDPI_PROTOCOL_GMAIL)
|
#if defined(NDPI_PROTOCOL_MEEBO)|| defined(NDPI_PROTOCOL_TOR) || defined(NDPI_PROTOCOL_VPN_X) || defined(NDPI_PROTOCOL_UNENCRYPTED_JABBER) || defined (NDPI_PROTOCOL_OSCAR) || defined (NDPI_PROTOCOL_ITUNES) || defined (NDPI_PROTOCOL_GMAIL)
|
||||||
struct ndpi_packet_struct *packet = &flow->packet;
|
struct ndpi_packet_struct *packet = &flow->packet;
|
||||||
// struct ndpi_id_struct *src=flow->src;
|
// struct ndpi_id_struct *src=flow->src;
|
||||||
// struct ndpi_id_struct *dst=flow->dst;
|
// struct ndpi_id_struct *dst=flow->dst;
|
||||||
u_int32_t a;
|
u_int32_t a;
|
||||||
u_int32_t end;
|
u_int32_t end;
|
||||||
#if defined(NDPI_PROTOCOL_UNENCRYPED_JABBER)
|
#if defined(NDPI_PROTOCOL_UNENCRYPTED_JABBER)
|
||||||
if(NDPI_COMPARE_PROTOCOL_TO_BITMASK(ndpi_struct->detection_bitmask, NDPI_PROTOCOL_UNENCRYPED_JABBER) != 0)
|
if(NDPI_COMPARE_PROTOCOL_TO_BITMASK(ndpi_struct->detection_bitmask, NDPI_PROTOCOL_UNENCRYPTED_JABBER) != 0)
|
||||||
goto check_for_ssl_payload;
|
goto check_for_ssl_payload;
|
||||||
#endif
|
#endif
|
||||||
#if defined(NDPI_PROTOCOL_OSCAR)
|
#if defined(NDPI_PROTOCOL_OSCAR)
|
||||||
@@ -382,13 +382,13 @@ static void ssl_mark_and_payload_search_for_other_protocols(struct
|
|||||||
check_for_ssl_payload:
|
check_for_ssl_payload:
|
||||||
end = packet->payload_packet_len - 20;
|
end = packet->payload_packet_len - 20;
|
||||||
for (a = 5; a < end; a++) {
|
for (a = 5; a < end; a++) {
|
||||||
#ifdef NDPI_PROTOCOL_UNENCRYPED_JABBER
|
#ifdef NDPI_PROTOCOL_UNENCRYPTED_JABBER
|
||||||
if(packet->payload[a] == 't') {
|
if(packet->payload[a] == 't') {
|
||||||
if(memcmp(&packet->payload[a], "talk.google.com", 15) == 0) {
|
if(memcmp(&packet->payload[a], "talk.google.com", 15) == 0) {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPED_JABBER, ndpi_struct, NDPI_LOG_DEBUG, "ssl jabber packet match\n");
|
NDPI_LOG(NDPI_PROTOCOL_UNENCRYPTED_JABBER, ndpi_struct, NDPI_LOG_DEBUG, "ssl jabber packet match\n");
|
||||||
if(NDPI_COMPARE_PROTOCOL_TO_BITMASK
|
if(NDPI_COMPARE_PROTOCOL_TO_BITMASK
|
||||||
(ndpi_struct->detection_bitmask, NDPI_PROTOCOL_UNENCRYPED_JABBER) != 0) {
|
(ndpi_struct->detection_bitmask, NDPI_PROTOCOL_UNENCRYPTED_JABBER) != 0) {
|
||||||
ndpi_int_ssl_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_UNENCRYPED_JABBER);
|
ndpi_int_ssl_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_UNENCRYPTED_JABBER);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user