There are now three additional abstract PacketCodec classes:
FixedPacketCodec, VariableBytePacketCodec and VariableShortPacketCodec.
The PacketLength class has been removed, as it is no longer required.
The main reason for this change is that the create suggested names
packet is a bit of an oddball: its length field measures the size of the
packet in longs, not bytes. The codec for this packet will be able to
inherit from PacketCodec directly to implement the custom length logic.
Signed-off-by: Graham <gpe@openrs2.org>
I've also removed the comment - I'm going to have to do something
similar for CREATE_DOWNSTREAM, and I think it's a bit more obvious with
the more distinctive name.
This allows us to deal with a single corner case of the same opcode
being used for two slightly different login response packets, depending
on the request.
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>
It removes the archive/group prefix and the 0xFF markers.
Unfortunately using Js5ResponseDecoder here is tricky - perhaps it
could've been done with an EmbeddedChannel.
Signed-off-by: Graham <gpe@openrs2.org>
Keys are now initially imported into a key_queue table, which is never
locked exclusively - allowing the API endpoint to function while the
brute forcer is running. The brute forcer moves all pending keys in the
queue to the keys table before running the actual brute forcing.
Signed-off-by: Graham <gpe@openrs2.org>