This post is no longer relevant as the original RuneLite Deobfuscator has been removed from my GitHub osrsbox-cache repo. This is to align with Jagex policies with the previously available RuneLite Deobfuscator. Sorry for any inconvenience - the post was written a long time ago (and later published) when the deobfuscator was still publically available.
My previous post discussed using Runelite to extract NPC and item definitions. Leading on from this, I started performing more research and projects using the OSRS cache. One thing I really wanted to know was: Which version of the client/cache was I working on?
This post answers this question and outlines methods and simple scripts to extract the cache version on both Windows and Linux operating systems. Both scripts are based on the RuneLite cache updater that is actually no longer available - as the RuneLite deobfuscator tool is no longer released to the public. The full code to accompany this post is provided in the osrsbox-cache GitHub repository.
To provide some context and further information, both Windows and Linux scripts work in the same way. The script will download the latest OSRS cache version, the same way that any OSRS client would. The RuneLite deobfuscator tool will then be executed against the downloaded .jar
client and the version number extracted.
The script has two dependencies:
Unfortunately, the RuneLite deobfuscator tool is no longer public. I do have an old version (1.2.9) from December 2017 (approximately). My compiled version still detects the OSRS cache version without problems, and the compiled version is available from: deob-1.2.9-SNAPSHOT-jar-with-dependencies.jar. You could also have a look at older commits on the RuneLite GitHub repository and download a past version that has the deobfuscator in it.
Using Git SCM (GitBash), or another git client, download the osrsbox-cache repository:
The git clone
command will download the repository and put it is a folder named osrsbox-cache
. Inside this folder is a sub-folder named determine_cache_version
. The following files are provided:
deob-1.2.9-SNAPSHOT-jar-with-dependencies.jar
: A compiled version of the old RuneLite deobfuscatorosrs_cache_version.ps1
: A PowerShell script to download the latest OSRS client and check the versionosrs_cache_version.sh
: A Bash script to download the latest OSRS client and check the versionBoth scripts work by downloading the most recent version of the OSRS cache and using the RuneLite deobfuscator tool to check the version number on the downloaded .jar
file. Both scripts have the same process, just written in different scripting languages: PowerShell for Windows, and Bash for Linux.
The first step in each script is to download the jav_config.ws
file from an Old School RuneScape server. This file provides the URL of the codebase and the initial_jar filename. This information is required to download the actual .jar
file. An example of the contents of the jav_config.ws
is provided below for informational purposes.
As outlined in the code snippet above, the values of interest are:
If we concatenate (combine) these two values, we get a full URL to download the initial .jar
file. In this file, we can examine the contents (using the RuneLite deobfuscator) and reveal the OSRS client version number.
Calling the deobfuscator is easy once we have all the information. Basically, we run a Java command with the deobfuscator in the classpath and specify a specific function to run against the .jar
file we downloaded. The function required is:
This section was only written to provide a basic overview of how to extract the OSRS Client version number. Further information can be obtained by reviewing the code in the scripts provided.
The following two sections outline how to determine the OSRS cache version using the two scripts available, either 1) Using Windows and PowerShell, or 2) Using Linux and Bash.
A simple PowerShell script is provided to download the latest OSRS cache and determine the current version number. The easiest method to run this code is to clone the entire repository. If you are using PowerShell on Windows, I would recommend using Git SCM for a robust git client for Windows, however, you can use any git client.
Using Git SCM (GitBash), or another git client, download the osrsbox-cache repository:
Open PowerShell and navigate to the directory that you cloned the osrsbox-cache repository into.
To run this script, you must first allow scripts to be run in PowerShell. This is disabled by default for security reasons. To enable scripts to be run for a temporary session, execute the following command:
Invoke the script using the following command:
The output from the script will be similar to that displayed below. The second to last line of the script output will display the current OSRS cache version.
As you can see, there is a line that specifies the OSRS cache version.
A simple BASH script is provided to download the latest OSRS cache and determine the current version number. The easiest method to run this code is to clone the entire repository. If you are using a Debian-based Linux distribution, for example, Ubuntu, I would recommend installing git
from the distribution repositories using apt
. The following command will achieve this:
Now download the osrsbox-cache repository:
If you don’t already have Java, the easiest option for installing Java on a Debian-based Linux distribution is installing the version packaged with the distribution repositories using apt
. Specifically, this will install OpenJDK 8 on Ubuntu Linux, using the most recent and recommended version.
Make sure you are in the osrsbox-cache directory and determine_cache_version
sub-folder. Now invoke the script using the following command:
The output from the script will be similar to that displayed below. The second to last line of the script output will display the current OSRS cache version.
As you can see, there is a line that specifies the OSRS cache version.
I hoped this tutorial helped you find the OSRS Client cache version. Please note: This code and the associated resources should not be used maliciously. This information is provided only for learning purposes. Stay legitimate and keep OSRS safe! I only use this information for placing a specific OSRS client version on my OSRSBox Database project. If you have any comments, feedback or notice any errors please post a comment below. Thanks!