diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2022-03-16 11:03:57 +0100 |
---|---|---|
committer | lns <matzeton@googlemail.com> | 2022-04-14 19:17:48 +0200 |
commit | c3df3a12aa88739e303340ccd7436d467b4662d2 (patch) | |
tree | 13355914f93b668afb47f2b5b643dffc073fb8e7 /src/lib/protocols/mining.c | |
parent | 4775be3d85434d4e385f43a47b783844bbfb2571 (diff) |
Fixed msys2 build warnings and re-activated CI Mingw64 build.fix/windows-msys2
* Removed Visual Studio leftovers. Maintaining an autotools project with VS integration requires some additional overhead.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Signed-off-by: lns <matzeton@googlemail.com>
Diffstat (limited to 'src/lib/protocols/mining.c')
-rw-r--r-- | src/lib/protocols/mining.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/protocols/mining.c b/src/lib/protocols/mining.c index 82e4038db..c12203adb 100644 --- a/src/lib/protocols/mining.c +++ b/src/lib/protocols/mining.c @@ -59,7 +59,7 @@ static void ndpi_search_mining_udp(struct ndpi_detection_module_struct *ndpi_str else if(packet->iphv6 && ntohl(packet->iphv6->ip6_dst.u6_addr.u6_addr32[0]) == 0xFF020000) ; else { - snprintf(flow->flow_extra_info, sizeof(flow->flow_extra_info), "%s", "ETH"); + ndpi_snprintf(flow->flow_extra_info, sizeof(flow->flow_extra_info), "%s", "ETH"); ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_MINING, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI); if(packet->iph) /* TODO: ipv6 */ cacheMiningHostTwins(ndpi_struct, packet->iph->saddr + packet->iph->daddr); @@ -96,7 +96,7 @@ static void ndpi_search_mining_tcp(struct ndpi_detection_module_struct *ndpi_str u_int32_t magic = htonl(0xf9beb4d9), magic1 = htonl(0xfabfb5da), *to_match = (u_int32_t*)packet->payload; if((*to_match == magic) || (*to_match == magic1)) { - snprintf(flow->flow_extra_info, sizeof(flow->flow_extra_info), "%s", "ETH"); + ndpi_snprintf(flow->flow_extra_info, sizeof(flow->flow_extra_info), "%s", "ETH"); ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_MINING, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI); if(packet->iph) /* TODO: ipv6 */ cacheMiningHostTwins(ndpi_struct, packet->iph->saddr + packet->iph->daddr); @@ -108,7 +108,7 @@ static void ndpi_search_mining_tcp(struct ndpi_detection_module_struct *ndpi_str && (packet->payload_packet_len < 600) && (packet->payload[2] == 0x04)) { if(isEthPort(ntohs(packet->tcp->dest)) /* Ethereum port */) { - snprintf(flow->flow_extra_info, sizeof(flow->flow_extra_info), "%s", "ETH"); + ndpi_snprintf(flow->flow_extra_info, sizeof(flow->flow_extra_info), "%s", "ETH"); ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_MINING, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI); if(packet->iph) /* TODO: ipv6 */ cacheMiningHostTwins(ndpi_struct, packet->iph->saddr + packet->iph->daddr); @@ -127,7 +127,7 @@ static void ndpi_search_mining_tcp(struct ndpi_detection_module_struct *ndpi_str { "id": 2, "jsonrpc":"2.0","result":true} {"worker": "", "jsonrpc": "2.0", "params": [], "id": 3, "method": "eth_getWork"} */ - snprintf(flow->flow_extra_info, sizeof(flow->flow_extra_info), "%s", "ETH"); + ndpi_snprintf(flow->flow_extra_info, sizeof(flow->flow_extra_info), "%s", "ETH"); ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_MINING, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI); if(packet->iph) /* TODO: ipv6 */ cacheMiningHostTwins(ndpi_struct, packet->iph->saddr + packet->iph->daddr); @@ -151,7 +151,7 @@ static void ndpi_search_mining_tcp(struct ndpi_detection_module_struct *ndpi_str {"id":1,"jsonrpc":"2.0","error":null,"result":{"id":"479059546883218","job":{"blob":"0606e89883d205a65d8ee78991838a1cf3ec2ebbc5fb1fa43dec5fa1cd2bee4069212a549cd731000000005a88235653097aa3e97ef2ceef4aee610751a828f9be1a0758a78365fb0a4c8c05","job_id":"722134174127131","target":"dc460300"},"status":"OK"}} {"method":"submit","params":{"id":"479059546883218","job_id":"722134174127131","nonce":"98024001","result":"c9be9381a68d533c059d614d961e0534d7d8785dd5c339c2f9596eb95f320100"},"id":1} */ - snprintf(flow->flow_extra_info, sizeof(flow->flow_extra_info), "%s", "ZCash/Monero"); + ndpi_snprintf(flow->flow_extra_info, sizeof(flow->flow_extra_info), "%s", "ZCash/Monero"); ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_MINING, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI); if(packet->iph) /* TODO: ipv6 */ cacheMiningHostTwins(ndpi_struct, packet->iph->saddr + packet->iph->daddr); |