For most packets we know (or have a very good guess at) the official
Jagex name, based on the NXT/TFU leaks.
The document will be fleshed out with the payloads and a more detailed
description of every packet in the future.
Signed-off-by: Graham <gpe@openrs2.org>
There's no UPDATE_ZONE_FULL_ENCLOSED packet, so clearing and then
populating a zone actually requires two packets -
UPDATE_ZONE_FULL_FOLLOWS followed by UPDATE_ZONE_PARTIAL_ENCLOSED.
Signed-off-by: Graham <gpe@openrs2.org>
We fsync the temp file before doing the atomic move, which I think is
necessary if the underlying filesystem re-orders the operations (e.g. if
the atomic move is performed before the writes to the temp file have
been flushed to disk).
Similarly we fsync the parent dir before returning. For a single atomic
write in isolation this probably isn't important, but probably is useful
if a sequence of atomic writes is performed in order.
Signed-off-by: Graham <gpe@openrs2.org>
This fixes a bug when deobfuscating the build 225 client, which has code
that looks like a flow obstructor initializer, but it reads an argument
rather than a static variable.
Signed-off-by: Graham <gpe@openrs2.org>
Bit of a corner case, but if we ever encounter an index with a checksum
and version of 0 that resolves then this will ensure the statistics are
consistent between the overall cache and the index row.
Signed-off-by: Graham <gpe@openrs2.org>
These replace the whirlpool, group count and total uncompressed length
columns, which were kind of useless - in particular:
* The group count is also represented with the new stats columns.
* The total uncompressed length overflows, as some indexes are now
larger than 2 gigabytes. One of the new stats columns contains the
compressed size of each archive, which isn't too different.
Signed-off-by: Graham <gpe@openrs2.org>
Everything is read-only and unauthenticated, so there is no security
risk. Hopefully this will allow some cool projects based on AJAX to be
developed.
Signed-off-by: Graham <gpe@openrs2.org>
This will allow us to import FunOrb caches without worrying about the
risk of collisions with the main set of RuneScape caches.
Signed-off-by: Graham <gpe@openrs2.org>
lo should've been masked rather than hi. I've switched the code to mask
both the low and high DWORDs for simplicity.
Signed-off-by: Graham <gpe@openrs2.org>
Useful for running directly on my server, which is headless Linux. (The
current extract tool is a GUI Windows app.)
Signed-off-by: Graham <gpe@openrs2.org>
Creating the InputStream first allows us to immediately fail if a key is
invalid, without having the chance of allocating a huge ByteBuf based on
an incorrect length.
Signed-off-by: Graham <gpe@openrs2.org>