Skip to content

Commit

Permalink
Update Sniffer.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
TheUserUnknown authored Feb 8, 2018
1 parent 3629ce2 commit e7e1101
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/main/kotlin/pubg/radar/sniffer/Sniffer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
}
}
Expand Down

0 comments on commit e7e1101

Please sign in to comment.