ndpiReader now report protocol category and breed
Modified TikTok category to Fun
This commit is contained in:
@@ -414,7 +414,8 @@ static void help(u_int long_help) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(long_help) {
|
if(long_help) {
|
||||||
printf("\n\nSupported protocols:\n");
|
printf("\n\nnDPI supported protocols:\n");
|
||||||
|
printf("%3s %-22s %-12s %s\n", "Id", "Protocol", "Breed", "Category");
|
||||||
num_threads = 1;
|
num_threads = 1;
|
||||||
ndpi_dump_protocols(ndpi_info_mod);
|
ndpi_dump_protocols(ndpi_info_mod);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8731,8 +8731,8 @@ ndpi_protocol_match host_match[] = {
|
|||||||
|
|
||||||
{ "signal.org", NULL, "signal\\.org" TLD, "Signal", NDPI_PROTOCOL_SIGNAL, NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_ACCEPTABLE },
|
{ "signal.org", NULL, "signal\\.org" TLD, "Signal", NDPI_PROTOCOL_SIGNAL, NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_ACCEPTABLE },
|
||||||
{ "whispersystems.org", NULL, "whispersystems\\.org" TLD, "Signal", NDPI_PROTOCOL_SIGNAL, NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_ACCEPTABLE },
|
{ "whispersystems.org", NULL, "whispersystems\\.org" TLD, "Signal", NDPI_PROTOCOL_SIGNAL, NDPI_PROTOCOL_CATEGORY_CHAT, NDPI_PROTOCOL_ACCEPTABLE },
|
||||||
{ "musical.ly", NULL, "musical\\.ly" TLD, "TikTok", NDPI_PROTOCOL_TIKTOK, NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, NDPI_PROTOCOL_ACCEPTABLE },
|
{ "musical.ly", NULL, "musical\\.ly" TLD, "TikTok", NDPI_PROTOCOL_TIKTOK, NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, NDPI_PROTOCOL_FUN },
|
||||||
{ "muscdn.com", NULL, "muscndl\\.com" TLD, "TikTok", NDPI_PROTOCOL_TIKTOK, NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, NDPI_PROTOCOL_ACCEPTABLE },
|
{ "muscdn.com", NULL, "muscndl\\.com" TLD, "TikTok", NDPI_PROTOCOL_TIKTOK, NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, NDPI_PROTOCOL_FUN },
|
||||||
|
|
||||||
{ NULL, NULL, NULL, 0 }
|
{ NULL, NULL, NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|||||||
+7
-2
@@ -966,7 +966,7 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
|
|||||||
no_master, "SkypeCall", NDPI_PROTOCOL_CATEGORY_VOIP,
|
no_master, "SkypeCall", NDPI_PROTOCOL_CATEGORY_VOIP,
|
||||||
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_TIKTOK,
|
ndpi_set_proto_defaults(ndpi_mod, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_TIKTOK,
|
||||||
0 /* can_have_a_subprotocol */, no_master,
|
0 /* can_have_a_subprotocol */, no_master,
|
||||||
no_master, "TikTok", NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK,
|
no_master, "TikTok", NDPI_PROTOCOL_CATEGORY_SOCIAL_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 */,
|
||||||
@@ -5862,8 +5862,13 @@ int ndpi_get_category_id(struct ndpi_detection_module_struct *ndpi_mod, char *ca
|
|||||||
|
|
||||||
void ndpi_dump_protocols(struct ndpi_detection_module_struct *ndpi_mod) {
|
void ndpi_dump_protocols(struct ndpi_detection_module_struct *ndpi_mod) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for(i=0; i<(int)ndpi_mod->ndpi_num_supported_protocols; i++)
|
for(i=0; i<(int)ndpi_mod->ndpi_num_supported_protocols; i++)
|
||||||
printf("[%3d] %s\n", i, ndpi_mod->proto_defaults[i].protoName);
|
printf("%3d %-22s %-12s %s\n", i,
|
||||||
|
ndpi_mod->proto_defaults[i].protoName,
|
||||||
|
ndpi_get_proto_breed_name(ndpi_mod, ndpi_mod->proto_defaults[i].protoBreed),
|
||||||
|
ndpi_category_get_name(ndpi_mod, ndpi_mod->proto_defaults[i].protoCategory)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ****************************************************** */
|
/* ****************************************************** */
|
||||||
|
|||||||
Reference in New Issue
Block a user