Improved Teamspeak3 License/Weblist detection. (#1802)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com> Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
@@ -42,6 +42,7 @@ void ndpi_search_teamspeak(struct ndpi_detection_module_struct *ndpi_struct, str
|
||||
{
|
||||
NDPI_LOG_INFO(ndpi_struct, "found TEAMSPEAK udp\n");
|
||||
ndpi_int_teamspeak_add_connection(ndpi_struct, flow);
|
||||
return;
|
||||
}
|
||||
} else if(packet->tcp != NULL) {
|
||||
/* https://github.com/Youx/soliloque-server/wiki/Connection-packet */
|
||||
@@ -51,12 +52,48 @@ void ndpi_search_teamspeak(struct ndpi_detection_module_struct *ndpi_struct, str
|
||||
{
|
||||
NDPI_LOG_INFO(ndpi_struct, "found TEAMSPEAK tcp\n");
|
||||
ndpi_int_teamspeak_add_connection(ndpi_struct, flow);
|
||||
return;
|
||||
} /* http://www.imfirewall.com/en/protocols/teamSpeak.htm */
|
||||
}
|
||||
}
|
||||
|
||||
if (packet->udp != NULL)
|
||||
{
|
||||
if (packet->payload_packet_len == 16 &&
|
||||
packet->payload[0] == 0x01 && packet->payload[3] == 0x02 &&
|
||||
get_u_int32_t(packet->payload, 11) == 0x00000000 && packet->payload[15] == 0x00)
|
||||
{
|
||||
goto ts3_license_weblist;
|
||||
}
|
||||
|
||||
if ((packet->payload_packet_len == 4 || packet->payload_packet_len == 8) &&
|
||||
packet->payload[0] == 0x01 && packet->payload[3] == 0x01)
|
||||
{
|
||||
goto ts3_license_weblist;
|
||||
}
|
||||
|
||||
if (packet->payload_packet_len == 5 &&
|
||||
packet->payload[0] == 0x01 && packet->payload[3] == 0x02 &&
|
||||
packet->payload[4] == 0x00)
|
||||
{
|
||||
goto ts3_license_weblist;
|
||||
}
|
||||
}
|
||||
|
||||
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
||||
return;
|
||||
|
||||
ts3_license_weblist:
|
||||
if (flow->packet_counter == 3)
|
||||
{
|
||||
NDPI_LOG_INFO(ndpi_struct, "found TEAMSPEAK license/weblist\n");
|
||||
ndpi_int_teamspeak_add_connection(ndpi_struct, flow);
|
||||
return;
|
||||
}
|
||||
if (flow->packet_counter >= 3)
|
||||
{
|
||||
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
||||
}
|
||||
}
|
||||
|
||||
void init_teamspeak_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id,
|
||||
|
||||
Reference in New Issue
Block a user