Skip to content

Commit

Permalink
Gnutella: improve detection (#2019)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanNardi authored Jun 21, 2023
1 parent 570c75d commit cc58205
Show file tree
Hide file tree
Showing 2 changed files with 657 additions and 653 deletions.
5 changes: 5 additions & 0 deletions src/lib/protocols/gnutella.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,11 @@ static void ndpi_search_gnutella(struct ndpi_detection_module_struct *ndpi_struc
return;
}
}
if (packet->payload_packet_len >= 4 && memcmp(packet->payload, "GND\x10", 4) == 0) {
NDPI_LOG_DBG2(ndpi_struct, "detected gnutella udp, GND (2)\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_CONFIDENCE_DPI);
return;
}

if ((packet->payload_packet_len == 32)
&& memcmp(&packet->payload[16], "\x31\x01\x00\x09\x00\x00\x00", 7) == 0) {
Expand Down
Loading

0 comments on commit cc58205

Please sign in to comment.