sligh changed to dashbaord
This commit is contained in:
@@ -10,6 +10,7 @@ import json
|
||||
import sqlite3
|
||||
import datetime
|
||||
import os
|
||||
import re
|
||||
|
||||
UDP_IP = "0.0.0.0"
|
||||
UDP_PORT = 5005
|
||||
@@ -19,6 +20,7 @@ DB_PATH = os.path.join(os.path.dirname(__file__), "events.db")
|
||||
|
||||
def init_db(path: str) -> sqlite3.Connection:
|
||||
conn = sqlite3.connect(path, check_same_thread=False)
|
||||
conn.execute("PRAGMA journal_mode=WAL")
|
||||
conn.execute("""
|
||||
CREATE TABLE IF NOT EXISTS beacon_events (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
@@ -129,7 +131,6 @@ def store_probe(conn: sqlite3.Connection, ev: dict, received_at: str):
|
||||
|
||||
# ─── Validation ──────────────────────────────────────────────────────────────
|
||||
|
||||
import re
|
||||
_MAC_RE = re.compile(r'^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$')
|
||||
|
||||
def _check_mac(val: str) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user