Browse Source
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>bzip2
11 changed files with 179 additions and 51 deletions
@ -0,0 +1,9 @@
@@ -0,0 +1,9 @@
|
||||
package org.openrs2.archive.key |
||||
|
||||
public enum class KeySource { |
||||
API, |
||||
DISK, |
||||
OPENOSRS, |
||||
POLAR, |
||||
RUNELITE |
||||
} |
@ -0,0 +1,24 @@
@@ -0,0 +1,24 @@
|
||||
-- @formatter:off |
||||
CREATE TYPE key_source AS ENUM ( |
||||
'api', |
||||
'disk', |
||||
'openosrs', |
||||
'polar', |
||||
'runelite' |
||||
); |
||||
|
||||
CREATE TABLE key_sources ( |
||||
key_id BIGINT NOT NULL REFERENCES keys (id), |
||||
source key_source NOT NULL, |
||||
first_seen TIMESTAMPTZ NOT NULL, |
||||
last_seen TIMESTAMPTZ NOT NULL, |
||||
PRIMARY KEY (key_id, source) |
||||
); |
||||
|
||||
CREATE TABLE key_queue ( |
||||
key xtea_key NOT NULL, |
||||
source key_source NOT NULL, |
||||
first_seen TIMESTAMPTZ NOT NULL, |
||||
last_seen TIMESTAMPTZ NOT NULL, |
||||
PRIMARY KEY (key, source) |
||||
); |
Loading…
Reference in new issue