From e7e110101f88b9a2f0365e49def09b856cf5a482 Mon Sep 17 00:00:00 2001 From: TheUserUnknown <36273453+TheUserUnknown@users.noreply.github.com> Date: Thu, 8 Feb 2018 17:31:13 +0100 Subject: [PATCH] Update Sniffer.kt --- src/main/kotlin/pubg/radar/sniffer/Sniffer.kt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/pubg/radar/sniffer/Sniffer.kt b/src/main/kotlin/pubg/radar/sniffer/Sniffer.kt index 76f4fcee..9ad2d28b 100644 --- a/src/main/kotlin/pubg/radar/sniffer/Sniffer.kt +++ b/src/main/kotlin/pubg/radar/sniffer/Sniffer.kt @@ -198,11 +198,15 @@ class Sniffer { val ip = packet[IpPacket::class.java] val udp = udp_payload(packet) ?: return@loop val raw = udp.payload.rawData - if (ip.header.srcAddr == localAddr) { - if (raw.size == 44) - parseSelfLocation(raw) - } else if (udp.header.srcPort.valueAsInt() in 7000..7999) + + //Add a check here to compare the ip.header.srcAddr with your gaming pc (The one running the game), + //but for now this will work fine (TESTED) + if(raw.size == 44){ + parseSelfLocation(raw) + } else if (udp.header.srcPort.valueAsInt() in 7000..7999){ proc_raw_packet(raw) + } + } catch (e: Exception) { } }