Improved MGCP detection by allowing '\r' as line feed.
Signed-off-by: lns <matzeton@googlemail.com> Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* mgcp.c
|
||||
*
|
||||
* Copyright (C) 2017-22 - ntop.org
|
||||
* Copyright (C) 2017-23 - ntop.org
|
||||
*
|
||||
* This file is part of nDPI, an open source deep packet inspection
|
||||
* library based on the OpenDPI and PACE technology by ipoque GmbH
|
||||
@@ -50,7 +50,9 @@ static void ndpi_search_mgcp(struct ndpi_detection_module_struct *ndpi_struct, s
|
||||
if (packet->payload_packet_len < 8) break;
|
||||
|
||||
/* packet must end with 0x0d0a or with 0x0a */
|
||||
if (packet->payload[packet->payload_packet_len - 1] != 0x0a) break;
|
||||
if (packet->payload[packet->payload_packet_len - 1] != 0x0a &&
|
||||
packet->payload[packet->payload_packet_len - 1] != 0x0d)
|
||||
break;
|
||||
|
||||
if (packet->payload[0] != 'A' && packet->payload[0] != 'C' && packet->payload[0] != 'D' &&
|
||||
packet->payload[0] != 'E' && packet->payload[0] != 'M' && packet->payload[0] != 'N' &&
|
||||
|
||||
Binary file not shown.
Binary file not shown.
+10
-7
@@ -1,8 +1,8 @@
|
||||
Guessed flow protos: 0
|
||||
|
||||
DPI Packets (UDP): 2 (1.00 pkts/flow)
|
||||
Confidence DPI : 2 (flows)
|
||||
Num dissector calls: 36 (18.00 diss/flow)
|
||||
DPI Packets (UDP): 5 (1.00 pkts/flow)
|
||||
Confidence DPI : 5 (flows)
|
||||
Num dissector calls: 90 (18.00 diss/flow)
|
||||
LRU cache ookla: 0/0/0 (insert/search/found)
|
||||
LRU cache bittorrent: 0/0/0 (insert/search/found)
|
||||
LRU cache zoom: 0/0/0 (insert/search/found)
|
||||
@@ -16,11 +16,14 @@ Automa domain: 0/0 (search/found)
|
||||
Automa tls cert: 0/0 (search/found)
|
||||
Automa risk mask: 0/0 (search/found)
|
||||
Automa common alpns: 0/0 (search/found)
|
||||
Patricia risk mask: 4/0 (search/found)
|
||||
Patricia risk: 0/0 (search/found)
|
||||
Patricia protocols: 4/0 (search/found)
|
||||
Patricia risk mask: 10/0 (search/found)
|
||||
Patricia risk: 6/0 (search/found)
|
||||
Patricia protocols: 10/0 (search/found)
|
||||
|
||||
MGCP 20 2437 2
|
||||
MGCP 23 2731 5
|
||||
|
||||
1 UDP 10.10.228.72:2427 <-> 10.10.244.2:2427 [proto: 94/MGCP][IP: 0/Unknown][ClearText][Confidence: DPI][DPI packets: 1][cat: VoIP/10][6 pkts/1254 bytes <-> 6 pkts/418 bytes][Goodput ratio: 79/40][6.26 sec][Hostname/SNI: vg224][bytes ratio: 0.500 (Upload)][IAT c2s/s2c min/avg/max/stddev: 1/0 884/884 3523/3523 1524/1523][Pkt Len c2s/s2c min/avg/max/stddev: 60/57 209/70 846/104 285/19][PLAIN TEXT (RSIP 262662134 )][Plen Bins: 41,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
|
||||
2 UDP 172.16.1.116:2427 <-> 172.16.1.119:2427 [proto: 94/MGCP][IP: 0/Unknown][ClearText][Confidence: DPI][DPI packets: 1][cat: VoIP/10][4 pkts/370 bytes <-> 4 pkts/395 bytes][Goodput ratio: 54/57][80.75 sec][Hostname/SNI: gateway44.myplace.com][bytes ratio: -0.033 (Mixed)][IAT c2s/s2c min/avg/max/stddev: 9/36 26914/26914 76721/76695 35257/35238][Pkt Len c2s/s2c min/avg/max/stddev: 61/98 92/99 103/101 18/1][PLAIN TEXT (RQNT 1 )][Plen Bins: 12,87,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
|
||||
3 UDP 67.232.180.250:38238 -> 186.112.128.179:2427 [proto: 94/MGCP][IP: 0/Unknown][ClearText][Confidence: DPI][DPI packets: 1][cat: VoIP/10][1 pkts/98 bytes -> 0 pkts/0 bytes][Goodput ratio: 57/0][< 1 sec][Hostname/SNI: gateway44.myplace.com][Risk: ** Unidirectional Traffic **][Risk Score: 10][Risk Info: No server to client traffic][PLAIN TEXT (RQNT 1 )][Plen Bins: 0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
|
||||
4 UDP 92.173.166.213:51954 -> 83.250.239.33:2427 [proto: 94/MGCP][IP: 0/Unknown][ClearText][Confidence: DPI][DPI packets: 1][cat: VoIP/10][1 pkts/98 bytes -> 0 pkts/0 bytes][Goodput ratio: 57/0][< 1 sec][Hostname/SNI: gateway44.myplace.com][Risk: ** Unidirectional Traffic **][Risk Score: 10][Risk Info: No server to client traffic][PLAIN TEXT (RQNT 1 )][Plen Bins: 0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
|
||||
5 UDP 187.43.37.188:40798 -> 196.167.59.124:2427 [proto: 94/MGCP][IP: 0/Unknown][ClearText][Confidence: DPI][DPI packets: 1][cat: VoIP/10][1 pkts/98 bytes -> 0 pkts/0 bytes][Goodput ratio: 57/0][< 1 sec][Hostname/SNI: gateway44.myplace.com][Risk: ** Unidirectional Traffic **][Risk Score: 10][Risk Info: No server to client traffic][PLAIN TEXT (RQNT 1 )][Plen Bins: 0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
|
||||
Reference in New Issue
Block a user