Minor starcraft/WoW code cleanup
This commit is contained in:
@@ -297,7 +297,7 @@ void init_soulseek_dissector(struct ndpi_detection_module_struct *ndpi_struct, u
|
|||||||
void init_spotify_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
void init_spotify_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||||
void init_ssh_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
void init_ssh_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||||
void init_ssl_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
void init_ssl_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||||
void init_starcraft2_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
void init_starcraft_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||||
void init_stealthnet_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
void init_stealthnet_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||||
void init_steam_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
void init_steam_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||||
void init_stun_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
void init_stun_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||||
|
|||||||
@@ -7407,7 +7407,7 @@ ndpi_protocol_match host_match[] = {
|
|||||||
{ ".windowsupdate.com", "WindowsUpdate", NDPI_SERVICE_WINDOWS_UPDATE, NDPI_PROTOCOL_ACCEPTABLE },
|
{ ".windowsupdate.com", "WindowsUpdate", NDPI_SERVICE_WINDOWS_UPDATE, NDPI_PROTOCOL_ACCEPTABLE },
|
||||||
{ ".battle.net", "Battle.net", NDPI_SERVICE_BATTLENET, NDPI_PROTOCOL_FUN },
|
{ ".battle.net", "Battle.net", NDPI_SERVICE_BATTLENET, NDPI_PROTOCOL_FUN },
|
||||||
{ "bnetcmsus-a.akamaihd.net", "Battle.net", NDPI_SERVICE_BATTLENET, NDPI_PROTOCOL_FUN },
|
{ "bnetcmsus-a.akamaihd.net", "Battle.net", NDPI_SERVICE_BATTLENET, NDPI_PROTOCOL_FUN },
|
||||||
{ "worldofwarcraft.com", "Battle.net", NDPI_SERVICE_BATTLENET, NDPI_PROTOCOL_FUN },
|
{ "worldofwarcraft.com", "WorldOfWarcraft", NDPI_PROTOCOL_WORLDOFWARCRAFT, NDPI_PROTOCOL_FUN },
|
||||||
{ NULL, 0 }
|
{ NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -107,6 +107,8 @@ u_int8_t ndpi_check_starcraft_udp(struct ndpi_detection_module_struct* ndpi_stru
|
|||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ndpi_search_starcraft(struct ndpi_detection_module_struct* ndpi_struct, struct ndpi_flow_struct* flow)
|
void ndpi_search_starcraft(struct ndpi_detection_module_struct* ndpi_struct, struct ndpi_flow_struct* flow)
|
||||||
|
|||||||
@@ -61,22 +61,22 @@ void ndpi_search_worldofwarcraft(struct ndpi_detection_module_struct
|
|||||||
NDPI_LOG(NDPI_PROTOCOL_WORLDOFWARCRAFT, ndpi_struct, NDPI_LOG_DEBUG, "Search World of Warcraft.\n");
|
NDPI_LOG(NDPI_PROTOCOL_WORLDOFWARCRAFT, ndpi_struct, NDPI_LOG_DEBUG, "Search World of Warcraft.\n");
|
||||||
|
|
||||||
if (packet->tcp != NULL) {
|
if (packet->tcp != NULL) {
|
||||||
/*
|
/*
|
||||||
if ((packet->payload_packet_len > NDPI_STATICSTRING_LEN("POST /") &&
|
if ((packet->payload_packet_len > NDPI_STATICSTRING_LEN("POST /") &&
|
||||||
memcmp(packet->payload, "POST /", NDPI_STATICSTRING_LEN("POST /")) == 0) ||
|
memcmp(packet->payload, "POST /", NDPI_STATICSTRING_LEN("POST /")) == 0) ||
|
||||||
(packet->payload_packet_len > NDPI_STATICSTRING_LEN("GET /") &&
|
(packet->payload_packet_len > NDPI_STATICSTRING_LEN("GET /") &&
|
||||||
memcmp(packet->payload, "GET /", NDPI_STATICSTRING_LEN("GET /")) == 0)) {
|
memcmp(packet->payload, "GET /", NDPI_STATICSTRING_LEN("GET /")) == 0)) {
|
||||||
ndpi_parse_packet_line_info(ndpi_struct, flow);
|
ndpi_parse_packet_line_info(ndpi_struct, flow);
|
||||||
if (packet->user_agent_line.ptr != NULL &&
|
if (packet->user_agent_line.ptr != NULL &&
|
||||||
packet->user_agent_line.len == NDPI_STATICSTRING_LEN("Blizzard Web Client") &&
|
packet->user_agent_line.len == NDPI_STATICSTRING_LEN("Blizzard Web Client") &&
|
||||||
memcmp(packet->user_agent_line.ptr, "Blizzard Web Client",
|
memcmp(packet->user_agent_line.ptr, "Blizzard Web Client",
|
||||||
NDPI_STATICSTRING_LEN("Blizzard Web Client")) == 0) {
|
NDPI_STATICSTRING_LEN("Blizzard Web Client")) == 0) {
|
||||||
ndpi_int_worldofwarcraft_add_connection(ndpi_struct, flow);
|
ndpi_int_worldofwarcraft_add_connection(ndpi_struct, flow);
|
||||||
NDPI_LOG(NDPI_PROTOCOL_WORLDOFWARCRAFT, ndpi_struct, NDPI_LOG_DEBUG,
|
NDPI_LOG(NDPI_PROTOCOL_WORLDOFWARCRAFT, ndpi_struct, NDPI_LOG_DEBUG,
|
||||||
"World of Warcraft: Web Client found\n");
|
"World of Warcraft: Web Client found\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
*/
|
*/
|
||||||
if (packet->payload_packet_len > NDPI_STATICSTRING_LEN("GET /")
|
if (packet->payload_packet_len > NDPI_STATICSTRING_LEN("GET /")
|
||||||
&& memcmp(packet->payload, "GET /", NDPI_STATICSTRING_LEN("GET /")) == 0) {
|
&& memcmp(packet->payload, "GET /", NDPI_STATICSTRING_LEN("GET /")) == 0) {
|
||||||
|
|||||||
@@ -2,11 +2,12 @@ Unknown 2 121 1
|
|||||||
DNS 18 1956 5
|
DNS 18 1956 5
|
||||||
HTTP 180 134270 2
|
HTTP 180 134270 2
|
||||||
SSDP 11 4984 1
|
SSDP 11 4984 1
|
||||||
|
WorldOfWarcraft 9 880 1
|
||||||
IGMP 2 120 1
|
IGMP 2 120 1
|
||||||
SSL 43 2903 13
|
SSL 43 2903 13
|
||||||
Google 12 1467 2
|
Google 12 1467 2
|
||||||
Quic 6 475 1
|
Quic 6 475 1
|
||||||
Battle.net 287 162382 20
|
Battle.net 278 161502 19
|
||||||
Starcraft 236 51494 6
|
Starcraft 236 51494 6
|
||||||
|
|
||||||
1 TCP 80.239.186.21:80 <-> 192.168.1.100:3516 [proto: 7.213/HTTP.Battle.net][12 pkts/3680 bytes][Host: eu.launcher.battle.net]
|
1 TCP 80.239.186.21:80 <-> 192.168.1.100:3516 [proto: 7.213/HTTP.Battle.net][12 pkts/3680 bytes][Host: eu.launcher.battle.net]
|
||||||
@@ -58,7 +59,7 @@ Starcraft 236 51494 6
|
|||||||
47 TCP 192.168.1.100:3490 <-> 2.228.46.104:443 [proto: 91/SSL][4 pkts/275 bytes]
|
47 TCP 192.168.1.100:3490 <-> 2.228.46.104:443 [proto: 91/SSL][4 pkts/275 bytes]
|
||||||
48 TCP 192.168.1.100:3482 <-> 2.228.46.114:443 [proto: 91/SSL][4 pkts/275 bytes]
|
48 TCP 192.168.1.100:3482 <-> 2.228.46.114:443 [proto: 91/SSL][4 pkts/275 bytes]
|
||||||
49 TCP 192.168.1.100:3480 <-> 2.228.46.114:443 [proto: 91/SSL][4 pkts/275 bytes]
|
49 TCP 192.168.1.100:3480 <-> 2.228.46.114:443 [proto: 91/SSL][4 pkts/275 bytes]
|
||||||
50 TCP 12.129.222.54:80 <-> 192.168.1.100:3512 [proto: 7.213/HTTP.Battle.net][9 pkts/880 bytes][Host: us.scan.worldofwarcraft.com]
|
50 TCP 12.129.222.54:80 <-> 192.168.1.100:3512 [proto: 7.76/HTTP.WorldOfWarcraft][9 pkts/880 bytes][Host: us.scan.worldofwarcraft.com]
|
||||||
51 UDP 62.115.246.51:1119 <-> 192.168.1.100:53146 [proto: 214/Starcraft][2 pkts/104 bytes]
|
51 UDP 62.115.246.51:1119 <-> 192.168.1.100:53146 [proto: 214/Starcraft][2 pkts/104 bytes]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user