Exploit database

GH-22358d6677f064bdb1d9d633280d9cbe

bthn-celik/cve-2023-4863-analysis

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2023-4863

21 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files6
bthn-celik/cve-2023-4863-analysisRevision a38b99849f81

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

src/blue_team/json_logger.py

Python · 1,295 bytes
import json
import os
from datetime import datetime

RESULTS_FILE = os.path.join(os.path.dirname(__file__), "../public/data/results.json")


def load_results():
    if os.path.exists(RESULTS_FILE):
        with open(RESULTS_FILE, "r", encoding="utf-8") as f:
            return json.load(f)
    return {"cve": "CVE-2023-4863", "metadata": {}, "findings": [], "mitigations": []}


def add_finding(category, summary, severity="info", references=None):
    if references is None:
        references = []

    data = load_results()
    new_finding = {
        "id": f"RES-{len(data.get('findings', [])) + 1:03d}",
        "category": category,
        "summary": summary,
        "severity": severity,
        "timestamp": datetime.now().isoformat() + "Z",
        "references": references,
    }
    data.setdefault("findings", []).append(new_finding)

    # Ensure directory exists
    os.makedirs(os.path.dirname(RESULTS_FILE), exist_ok=True)

    with open(RESULTS_FILE, "w", encoding="utf-8") as f:
        json.dump(data, f, indent=2, ensure_ascii=False)

    print(f"[+] Finding saved to JSON: {new_finding['id']}")


if __name__ == "__main__":
    print("Testing JSON Logger...")
    add_finding(
        "test", "Test finding to verify JSON logging structure works properly.", "info"
    )