From 724761d13003d378a0f41a78291239f2eb957043 Mon Sep 17 00:00:00 2001 From: CrafterPika Date: Fri, 1 Nov 2024 15:51:10 +0100 Subject: [PATCH] check if syscheck2 or syscheckhde and newer --- app.py | 13 +++++++++++-- config.json | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index da65f3b..f254b0f 100644 --- a/app.py +++ b/app.py @@ -68,14 +68,23 @@ def syscheck_report(): console_id = get_console_id(report_txt) if console_id == "0": return "ERROR: Not a valid sysCheck!", 200 - console_id_censor = console_id[:-4]+"***" + # figure difference between syscheck2 and syscheckhde and newer + if report_txt.split("\n")[0].startswith("sysCheck v2.1.0b19"): + console_id_censor = console_id[:-4]+"****" + old_syscheck = True + else: + old_syscheck = False + console_id = console_id[:-4] timestamp = int(time.time()) report_id = id_generator(6, 'AaBbCcDdFfeEgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWXxYyZz1234567890') if form_data["password"][0] in config["upload_passwords"]: try: with open(f"{report_dir}/{report_id}.csv", "a+") as report: - report.write(report_txt.replace(console_id, console_id_censor)) + if old_syscheck: + report.write(report_txt.replace(console_id, console_id_censor)) + else: + report.write(report_txt) db = sqlite3.connect(db_dir) cursor = db.cursor() diff --git a/config.json b/config.json index 0ac8049..a9bde4b 100644 --- a/config.json +++ b/config.json @@ -1,7 +1,7 @@ { "ip": "0.0.0.0", "port": "6969", - "version": "1.0.7", + "version": "1.0.8", "upload_passwords": [ "d2wRuTEObSAN", "B277eNGp789a"