From 2ed07613422cd4396cd70ac766c8572a6226b0e2 Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 24 Jul 2026 15:25:04 +0000 Subject: [PATCH] Upload files to "tracking" --- tracking/anticheat_suspects.json | 1 + tracking/discord_first_login.json | 1 + tracking/password_resets.json | 1 + tracking/password_tracking.py | 38 +++++++++++++++++++++++++++++++ 4 files changed, 41 insertions(+) create mode 100644 tracking/anticheat_suspects.json create mode 100644 tracking/discord_first_login.json create mode 100644 tracking/password_resets.json create mode 100644 tracking/password_tracking.py diff --git a/tracking/anticheat_suspects.json b/tracking/anticheat_suspects.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/tracking/anticheat_suspects.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tracking/discord_first_login.json b/tracking/discord_first_login.json new file mode 100644 index 0000000..49d987e --- /dev/null +++ b/tracking/discord_first_login.json @@ -0,0 +1 @@ +{"notified": [1, 259, 260, 5, 4, 261, 263, 265, 266, 267, 270, 273, 276, 21, 277, 278, 24, 279, 26, 280, 281, 282, 158, 31, 160, 159, 283, 285, 288, 293, 292, 294, 297, 300, 308, 309, 310, 311, 312, 313, 314, 60, 78, 79, 82, 87, 91, 94, 98, 103, 104, 105, 106, 107, 111, 112, 113, 114, 115, 116, 117, 118, 119, 124, 126, 127], "peak": 8} \ No newline at end of file diff --git a/tracking/password_resets.json b/tracking/password_resets.json new file mode 100644 index 0000000..488bab9 --- /dev/null +++ b/tracking/password_resets.json @@ -0,0 +1 @@ +[1, 4, 5, 21, 24, 26, 31, 60, 78, 79, 82, 87, 91, 94, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 114, 115, 116, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314] \ No newline at end of file diff --git a/tracking/password_tracking.py b/tracking/password_tracking.py new file mode 100644 index 0000000..42a3462 --- /dev/null +++ b/tracking/password_tracking.py @@ -0,0 +1,38 @@ +import json +import os +import threading + +_LOCK = threading.Lock() +_PATH = os.path.join(os.path.dirname(__file__), "password_resets.json") + + +def _read(): + try: + with open(_PATH, "r") as f: + return set(json.load(f)) + except (FileNotFoundError, json.JSONDecodeError): + return set() + + +def _write(ids): + with open(_PATH, "w") as f: + json.dump(sorted(ids), f) + + +def mark_password_set(pid: int): + with _LOCK: + ids = _read() + ids.add(pid) + _write(ids) + + +def clear_password_set(pid: int): + with _LOCK: + ids = _read() + ids.discard(pid) + _write(ids) + + +def has_real_password(pid: int) -> bool: + with _LOCK: + return pid in _read()