Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arpspoof #86

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
ffd3a17
fk up my repo
Jerry1211 Feb 22, 2018
d4c82c3
more ui changes
Jerry1211 Feb 22, 2018
ce9e186
Update README.md
Jerry1211 Feb 22, 2018
22f19c7
fun stuff
Jerry1211 Feb 23, 2018
1ebd0e9
Merge branch 'master' of https://github.com/Jerry1211/PUBG-Radar
Jerry1211 Feb 23, 2018
0e8e43d
remove 8k
Jerry1211 Feb 23, 2018
df43bb4
Update README.md
Jerry1211 Feb 23, 2018
b4a9fbe
added lonelytb's Compass & removed some unsued code
Jerry1211 Feb 23, 2018
0852dc7
Optimized for VMWare
Jerry1211 Feb 25, 2018
742a921
yep
Jerry1211 Feb 25, 2018
6a7ca80
yayayayayay
Jerry1211 Feb 25, 2018
a922ee3
Added back Compass/AirdropImage and Coloured Certain Weapons / added …
Jerry1211 Feb 25, 2018
1f4686b
minor item positioning fix
Jerry1211 Feb 25, 2018
26428cb
Added the Compressed maps
Jerry1211 Feb 25, 2018
4b110bf
Merged with SamuelNZ, also added Compase Toggle but it doesnt undraw …
Jerry1211 Feb 27, 2018
9257beb
Compass Toggles with Numpad 0
Jerry1211 Feb 27, 2018
3d5a346
need to get vehicle drawing working
Jerry1211 Feb 27, 2018
5b19c1f
updated
Jerry1211 Feb 27, 2018
5be8500
Mass fixes and upd
aVitomin Feb 27, 2018
fc5cfd8
Update README.md
aVitomin Feb 27, 2018
f870248
Update README.md
aVitomin Feb 27, 2018
a841e3a
Update README.md
aVitomin Feb 27, 2018
a403f0b
Bold text
aVitomin Feb 27, 2018
89fb996
Merge branch 'master' of https://github.com/ReddeR1337/PUBG-Radar
aVitomin Feb 27, 2018
fa8a176
Merge pull request #5 from ReddeR1337/master
Jerry1211 Feb 28, 2018
dda3c20
Another merge
Jerry1211 Mar 1, 2018
631b81f
Push
Jerry1211 Mar 1, 2018
7eaccbd
init
Jerry1211 Mar 1, 2018
f852263
Merged With SamuelNZ, Modified Vehicle Textures
Jerry1211 Mar 3, 2018
5a08229
readme
Jerry1211 Mar 3, 2018
9b3af24
ReAdded Grid upon request
Jerry1211 Mar 3, 2018
1464304
Update README.md
Jerry1211 Mar 3, 2018
feb90be
Update README.md
Jerry1211 Mar 3, 2018
ceaf3ed
updated readme
Jerry1211 Mar 3, 2018
74e6fc1
drawsight needs work
Jerry1211 Mar 3, 2018
7e17af3
Merged Again, but added Gridlines + Compass Circle image
Jerry1211 Mar 4, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
target/
.idea
_windows
.gitignore
.gitattributes
Binary file added JSmooth.zip
Binary file not shown.
24 changes: 24 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <https://unlicense.org>
110 changes: 94 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,100 @@
# PUBG-Radar
PUBG-Radar by sniffering udp packet
# PUBG-Radar ![Imgur](https://i.imgur.com/n3JtN5d.png)

Written in Kotlin
#### By engaging with this repository you explicitly agree with the terms of the Unlicense.

# Build
Using [maven](https://maven.apache.org/)
![Imgur](https://i.imgur.com/Pc7foHp.gif)

# Linux
If you experienced `X Error of failed request: RenderBadPicture (invalid Picture parameter)` on Linux build, try switch to branch `linux`. Run with arguments `<ip_to_sniff> <PortFilter|PPTPFilter> [target_ip]`
This version runs without the spoofing shit in a VM.

# vmware or middle pc setup
Here is an easy way using `arpspoof` to redirect packets from your game pc to a middle pc.
'Fixed' the item locations, still working on it.

**Note**: make sure your vmware instance or middle pc is in the same LAN as your game pc.(vmware instance should use bridged network)
### Key Kinds
You can't filter level 3 gear (always enabled)

Execute the following commands on the vmware or middle pc:
1. run `sudo apt-get install dsniff` to install `arpspoof`.
2. edit `/etc/sysctl.conf`. add/uncomment `net.ipv4.ip_forward=1`. save and run `sudo sysctl -p` to enable ip_forward.
3. run `sudo arpspoof -i <eth_interface_name> -t <game_pc_ip> <router_ip>` to spoof game pc.
4. run `sudo arpspoof -i <eth_interface_name> -t <router_ip> <game_pc_ip> ` to spoof router.
5. run `sudo java -jar pubg-radar-with-dependencies.jar <middle_pc_ip> <PortFilter|PPTPFilter> <game_pc_ip>`
#### Item Filter:
* HOME -> Show / Hide Compass
* END -> Show / Hide Grid Lines
* NUMPAD_0 -> Filter Throwables
* NUMPAD_1 -> Filter Attachments
* NUMPAD_2 -> Filter Scopes
* NUMPAD_3 -> Filter Ammo
* NUMPAD_4 -> Filter Weapons
* NUMPAD_5 -> Filter Level 2 Gear
* NUMPAD_6 -> Filter Meds





#### Item Offset Tweaker Keybinds
* F5 -> Item Offset X++
* F6 -> Item Offset X--
* F7 -> Item Offset Y++
* F8 -> Item Offset Y--

#### Zooms:
* NUMPAD_7 -> Scouting
* NUMPAD_8 -> Scout/Loot
* NUMPAD_9 -> Looting
* F9 -> Camera Zoom ++
* F10 -> Camera Zoom --
* F11 -> Toggle View Line


### Online Mode:
`java -jar target\pubg-radar-1.0-SNAPSHOT-jar-with-dependencies.jar "Middle PC IP" PortFilter "Game PC IP"`

### Offline Mode:
You can replay a PCAP file in offline mode:

`java -jar target\pubg-radar-1.0-SNAPSHOT-jar-with-dependencies.jar "Middle PC IP" PortFilter "Game PC IP" Offline`


## Build, Install and Run

1. Install VMWare Workstation Pro
2. Setup your VM in Bridged Mode, replicate physical.
3. Install [Maven](https://maven.apache.org/install.html) on your VM
4. Add Maven to your environment PATH, screenshot below.
4. Add MAVEN_OPTS environment variable, screenshot below.
4. Install [JDK8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) on your VM and
5. Add JAVA_HOME to your Environment Path, screenshot below.
5. Install [Wireshark + WinPCap](https://www.wireshark.org/) on your VM
6. Use the command prompt to go to your VMRadar directory (with the src folder)
7. type `mvn verify install` into the command prompt.
6. Change your IP addresses in the batch file, It will crash if they are wrong.
8. Run the batch file.

-----------------

```
@echo off
for /f "tokens=14" %%a in ('ipconfig ^| findstr IPv4') do set _IPaddr=%%a
echo YOUR IP ADDRESS IS: %_IPaddr%
echo "RUNNING VMRADAR"
set /p game=ENTER GAMEVM IP:
echo "%game%"
java -jar target\pubg-radar-1.0-SNAPSHOT-jar-with-dependencies.jar %_IPaddr% PortFilter "%game%"
```
or

```
@echo off
for /f "tokens=14" %%a in ('ipconfig ^| findstr IPv4') do set _IPaddr=%%a
java -jar target\pubg-radar-1.0-SNAPSHOT-jar-with-dependencies.jar %_IPaddr% PortFilter %_IPaddr% Offline

```

#### MAVEN_OPTS
![Imgur](https://i.imgur.com/aWCdgUX.png)

#### Path (Java and Maven)
![Imgur](https://i.imgur.com/hSCYrCM.png)

#### JAVA_HOME
![Imgur](https://i.imgur.com/4zT1YNR.png)


#### You can find detailed instructions on how to run a maven project [here](https://maven.apache.org/run.html)

[IntelliJ IDEA](https://www.jetbrains.com/idea/?fromMenu)
17 changes: 14 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

Expand All @@ -20,7 +20,7 @@
<maven.assembly.plugin.version>3.1.0</maven.assembly.plugin.version>
<maven.compiler.plugin.version>3.7.0</maven.compiler.plugin.version>
<maven.source.plugin.version>3.0.1</maven.source.plugin.version>
<kotlin.version>1.2.21</kotlin.version>
<kotlin.version>1.2.30</kotlin.version>
<kotlin.coroutines>0.21</kotlin.coroutines>
</properties>

Expand Down Expand Up @@ -110,6 +110,17 @@
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test-junit</artifactId>
<version>${kotlin.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test</artifactId>
Expand Down
86 changes: 86 additions & 0 deletions pubg-radar.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="kotlin-language" name="Kotlin">
<configuration version="3" platform="JVM 1.8" useProjectSettings="false">
<compilerSettings />
<compilerArguments>
<option name="jvmTarget" value="1.8" />
<option name="languageVersion" value="1.2" />
<option name="apiVersion" value="1.2" />
<option name="pluginOptions">
<array />
</option>
<option name="pluginClasspaths">
<array />
</option>
<option name="coroutinesState" value="enable" />
</compilerArguments>
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/kotlin" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/kotlin" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-reflect:1.2.30" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib:1.2.30" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.jetbrains.kotlinx:kotlinx-coroutines-core:0.30" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.2.30" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.30" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.jetbrains.kotlin:kotlin-test-junit:1.2.30" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.jetbrains.kotlin:kotlin-test:1.2.30" level="project" />
<orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.9.1" level="project" />
<orderEntry type="library" name="Maven: com.squareup.okio:okio:1.13.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-math3:3.6.1" level="project" />
<orderEntry type="library" name="Maven: com.badlogicgames.gdx:gdx:1.9.6" level="project" />
<orderEntry type="library" name="Maven: com.badlogicgames.gdx:gdx-backend-lwjgl3:1.9.6" level="project" />
<orderEntry type="library" name="Maven: org.lwjgl:lwjgl:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.lwjgl:lwjgl:natives-windows:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.lwjgl:lwjgl:natives-linux:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.lwjgl:lwjgl:natives-macos:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.lwjgl:lwjgl-glfw:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.lwjgl:lwjgl-glfw:natives-windows:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.lwjgl:lwjgl-glfw:natives-linux:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.lwjgl:lwjgl-glfw:natives-macos:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.lwjgl:lwjgl-jemalloc:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.lwjgl:lwjgl-jemalloc:natives-windows:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.lwjgl:lwjgl-jemalloc:natives-linux:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.lwjgl:lwjgl-jemalloc:natives-macos:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.lwjgl:lwjgl-opengl:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.lwjgl:lwjgl-openal:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.lwjgl:lwjgl-openal:natives-windows:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.lwjgl:lwjgl-openal:natives-linux:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.lwjgl:lwjgl-openal:natives-macos:3.1.0" level="project" />
<orderEntry type="library" name="Maven: com.badlogicgames.jlayer:jlayer:1.0.1-gdx" level="project" />
<orderEntry type="library" name="Maven: org.jcraft:jorbis:0.0.17" level="project" />
<orderEntry type="library" name="Maven: com.badlogicgames.gdx:gdx-platform:natives-desktop:1.9.6" level="project" />
<orderEntry type="library" name="Maven: com.badlogicgames.gdx:gdx-freetype:1.9.6" level="project" />
<orderEntry type="library" name="Maven: com.badlogicgames.gdx:gdx-freetype-platform:natives-desktop:1.9.6" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.6" level="project" />
<orderEntry type="library" name="Maven: org.pcap4j:pcap4j-core:1.7.3" level="project" />
<orderEntry type="library" name="Maven: net.java.dev.jna:jna:4.2.1" level="project" />
<orderEntry type="library" name="Maven: org.pcap4j:pcap4j-packetfactory-static:1.7.3" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.12" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: ch.qos.logback:logback-classic:1.1.2" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: ch.qos.logback:logback-core:1.1.2" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-reflect:1.2.30" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib:1.2.30" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains:annotations:13.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.jetbrains.kotlinx:kotlinx-coroutines-core:0.21" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.2.30" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.30" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.jetbrains.kotlin:kotlin-test-junit:1.2.30" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.jetbrains.kotlin:kotlin-test:1.2.30" level="project" />
</component>
</module>
48 changes: 33 additions & 15 deletions src/main/kotlin/pubg/radar/Game.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,60 @@ package pubg.radar
import pubg.radar.sniffer.Sniffer
import pubg.radar.ui.GLMap

const val gridWidth = 813000f
const val mapWidth = 819200f
const val mapWidthCropped = 8192
const val gridWidth = 813000f

var gameStarted = false
var isErangel = true

interface GameListener {
fun onGameStart() {}
fun onGameOver()
fun onGameStart() {}
fun onGameOver()
}

private val gameListeners = ArrayList<GameListener>()

fun register(gameListener: GameListener) {
gameListeners.add(gameListener)
gameListeners.add(gameListener)
}

fun deregister(gameListener: GameListener) {
gameListeners.remove(gameListener)
gameListeners.remove(gameListener)
}

fun gameStart() {
println("New Game on")
gameStarted = true
gameListeners.forEach { it.onGameStart() }
println("New Game is Starting")

gameStarted = true
gameListeners.forEach { it.onGameStart() }
}

fun gameOver() {
gameStarted = false
gameListeners.forEach { it.onGameOver() }
gameStarted = false
gameListeners.forEach { it.onGameOver() }
}

lateinit var Args: Array<String>
fun main(args: Array<String>) {
Sniffer.sniffLocationOnline()
val ui = GLMap()
ui.show()
Args = args
when {
args.size < 3 -> {
println("usage: <ip> <sniff option> <gaming pc>")
System.exit(-1)

}
args.size > 3 -> {

println("Loading PCAP File.")

Sniffer.sniffLocationOffline()
val ui = GLMap()
ui.show()
}
else -> {
Sniffer.sniffLocationOnline()
val ui = GLMap()
ui.show()
}
}
}
Loading