Proto cleanup
This commit is contained in:
@@ -242,7 +242,7 @@ typedef enum {
|
||||
NDPI_PROTOCOL_GITHUB = 203,
|
||||
NDPI_PROTOCOL_BJNP = 204,
|
||||
NDPI_PROTOCOL_FREE_205 = 205, /* Free */
|
||||
NDPI_PROTOCOL_VIDTO = 206,
|
||||
NDPI_PROTOCOL_FREE_206 = 206, /* Free */
|
||||
NDPI_PROTOCOL_SMPP = 207, /* Damir Franusic <df@release14.org> */
|
||||
NDPI_PROTOCOL_DNSCRYPT = 208,
|
||||
NDPI_PROTOCOL_TINC = 209, /* William Guglielmo <william@deselmo.com> */
|
||||
|
||||
@@ -7947,13 +7947,6 @@ static ndpi_network host_protocol_list[] = {
|
||||
{ 0xD040C900 /* 208.64.201.0/22 */, 22, NDPI_PROTOCOL_STEAM },
|
||||
{ 0xD04EA400 /* 208.78.164.0/22 */, 22, NDPI_PROTOCOL_STEAM },
|
||||
|
||||
/*
|
||||
VidTO
|
||||
*/
|
||||
{ 0x51111030 /* 81.17.16.48/32 */, 32, NDPI_PROTOCOL_VIDTO },
|
||||
{ 0x5fb7329d /* 95.183.50.157/32 */, 32, NDPI_PROTOCOL_VIDTO },
|
||||
{ 0x577824f2 /* 87.120.36.242/32 */, 32, NDPI_PROTOCOL_VIDTO },
|
||||
|
||||
{ 0x0, 0, 0 }
|
||||
};
|
||||
|
||||
|
||||
@@ -1263,6 +1263,11 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
|
||||
no_master, "Free", NDPI_PROTOCOL_CATEGORY_CUSTOM_1 /* dummy */,
|
||||
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_set_proto_defaults(ndpi_mod, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_FREE_206,
|
||||
0 /* can_have_a_subprotocol */, no_master,
|
||||
no_master, "Free", NDPI_PROTOCOL_CATEGORY_CUSTOM_1 /* dummy */,
|
||||
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_set_proto_defaults(ndpi_mod, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_PPSTREAM,
|
||||
0 /* can_have_a_subprotocol */, no_master,
|
||||
no_master, "PPStream", NDPI_PROTOCOL_CATEGORY_VIDEO,
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
|
||||
#include "ndpi_api.h"
|
||||
|
||||
// #define CERTIFICATE_DEBUG 1
|
||||
//#define CERTIFICATE_DEBUG 1
|
||||
|
||||
#define NDPI_MAX_SSL_REQUEST_SIZE 10000
|
||||
|
||||
/* Skype.c */
|
||||
@@ -150,9 +151,9 @@ int getSSLcertificate(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
|
||||
#ifdef CERTIFICATE_DEBUG
|
||||
{
|
||||
static u_int8_t id = 0;
|
||||
u_int16_t ssl_version = (packet->payload[1] << 8) + packet->payload[2];
|
||||
|
||||
NDPI_LOG_DBG2(ndpi_struct,"-> [%u] %02X\n", ++id, packet->payload[0] & 0xFF);
|
||||
printf("SSL [version: %u]\n", ssl_version);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -232,8 +233,7 @@ int getSSLcertificate(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
}
|
||||
} else if(handshake_protocol == 0x01 /* Client Hello */) {
|
||||
u_int offset, base_offset = 43;
|
||||
if (base_offset + 2 <= packet->payload_packet_len)
|
||||
{
|
||||
if (base_offset + 2 <= packet->payload_packet_len) {
|
||||
u_int16_t session_id_len = packet->payload[base_offset];
|
||||
|
||||
if((session_id_len+base_offset+2) <= total_len) {
|
||||
|
||||
Reference in New Issue
Block a user