X-com / RealmShark

MIT License
43 stars 19 forks source link

RealmShark

A library/GUI packet sniffer for Realm of the Mad God built with Java.

Discord link: https://discord.gg/uDK2EhJUtv

RealmShark is a Java library/program created to read network packets at the kernel level without the the ability to modify, block or send packets. The library is EULA/copyright compliant because it does not use any game code or assets.

Given RealmShark reads packets directly from the network adapter it can even be used to listen on a PC that is not running the game. It is an independent program from the game and is completely extendable/customizable.

Multiple instances of Realm of the Mad God are not supported using this sniffer.
As of now the sniffer cannot filter packets from multiple instances of the game running at the same time.
The sniffer crashes if it cannot distinguish the packets from different instances at the network layer.
In the future, OS specific functionality will be added to support multiple instances of clients.

Credits:

Install guide

MAC support is not available right now. It will be added in a future version.

For Windows:

  1. Java and Npcap is required for running the program. Java can be downloaded from here and Npcap from here. Open the files one at a time and follow the install instructions for both.

  2. Download the latest Tomato-v*.jar file from Releases. Only need the *.jar file.

  1. Run the program by simply opening the downloaded Tomato-v*.jar file.

  2. The RealmShark GUI should open. Start it by clicking File -> Start Sniffer. All chat in the game should appear in the Chat tab.

If there are errors running the program described above, please look under Trouble shooting guide or open an issue here, so it can be resolved.

Troubleshooting guide

Join discord for live tech support: https://discord.gg/uDK2EhJUtv

Windows troubleshooting guide:

Some Windows 11 users have issues with Npcap 1.70. Try and uninstall 1.70 and install the 1.60 version. Link found here, Npcap 1.60.

If the Tomato-v.jar file does nothing double clicking it after following the installation guide above. Open powershell or CMD in the folder where the Tomato-v.jar file is located.

  1. Open File Explorer and navigate to the folder where the *.jar is located.
  2. Right click in the empty space inside the folder, while holding shift. Then select Powershell or CMD. Example image
  3. If PowerShell is opened. type "cmd" and press Enter. If CMD is opened, skip to step 4.
  4. Type "java -jar ". Make sure to add space after "-jar ".
  5. Press tab several times until the Tomato-v*.jar name appears. Then press Enter. Example image

If the program starts without problems it means you have issues with your register keys. To fix your register to not need command prompt to start the program a simple jarfix is needed. If the program still doesn't start, report the bug in the issues here. Try to include as much information as possible in the report.

  1. Download the jarfix from here. Image of file here.
  2. Run it as Administrator. Example of running the jarfix here.
  3. Start the program by double clicking Tomato-v*.jar.

If you can start the program, but you can not see any chat messages from ingame chat after starting the sniffer.

  1. Open the program in console prompt described above.
  2. Start the sniffer and check console for error messages.
  3. If you get an error stating "The pcap_t has not been activated" similar to this image your network interface is faulty or you are missing a Loopback Adapter.
  4. Follow this guide, link here, for repairing your network interface (recommending to do the steps in inverted order starting with step 5). Do one step at a time and check if it fixes the problem before trying the next.
  5. If it still doesn't fix the problem follow a youtube guide to install a Loopback Adapter here.

If any other problem shows up. Please report them in the issues tracker found here to have it resolved. Make sure to include any console outputs, version of java installed (type "java -v" in console to get the version), windows version and other reproduction steps.

Building from source!

This is written for use with IntelliJ IDEA only. Other IDEs can also be used in a similar manner.

You will need an OpenJDK 8 SDK install from here. If you are using IntelliJ IDEA, IntelliJ can install the JDK automatically.

IntelliJ IDEA can be found here. Download the free community edition.

Download the .zip or clone the repo via CLI: git clone https://github.com/X-com/RealmShark && cd RealmShark

Open IntelliJ and click File > New > Project from Existing Sources... Navigate to the realm shark source folder and open build.gradle. Alternatively drag and drop the build.gradle into the IntelliJ window and then double click on it. IntelliJ will automatically install gradle and setup the project.

The application can now be built, ran and debugged from IntelliJ.

To build a runnable jar. Use the gradle tool named shadowJar. The shadowJar will build a runnable jar and place it in the build/libs folder. The shadowJar build tool builds a fat jar including all the resources. Note! This includes any files that can't be red from within the jar, i.e. dll files.

Setting up Tomato or Potato requires RealmShark-vXX.jar to be built as explained above and placed in the /libs folder.

  1. Swap to the "realmshark" branch on github.
  2. Follow the guide above to build the RealmShark-vXX.jar build using shadow jar builder.
  3. Move the RealmShark-vXX.jar file from "./build/libs" into to "./libs".
  4. Swap branch to "tomato" or "potato".
  5. Run either app with the corresponding class "Tomato.java" or "Potato.java"
  6. When ready to build the edited tomato/potato, follow the guide above using the shadow jar again.