New "webadmin" service (Flask + PyMySQL, port 8081) backing a small server-rendered admin UI: - Login gated on an existing game account: only accounts with accesslevel >= ADMIN_MIN_ACCESSLEVEL (default 900) get in. Password is MD5-hashed before comparison since the game client hashes it client-side before it ever hits the wire -- accounts.password is always an MD5 hex digest, confirmed against existing DB rows. - Accounts: list/search, create, edit accesslevel/active/password. - Characters: list/search, create (mirrors the real char-creation INSERT in Src/Char Server/charpackets.cpp -- only account_name, char_name, face, hairStyle, sex are set, everything else relies on the table's own defaults), edit core stats (level, zuly, attributes, hp/mp, stat/skill points) and isgm/isdev flags directly. All queries are parameterized (no string-formatted SQL). No CSRF protection or rate limiting yet -- acceptable for a small already-behind-a-high-accesslevel-gate private server, worth revisiting before ever exposing this port publicly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
28 lines
985 B
HTML
28 lines
985 B
HTML
{% extends "base.html" %}
|
|
{% block title %}Neuer Charakter - ROSS Admin{% endblock %}
|
|
{% block content %}
|
|
<div class="card" style="max-width:420px;">
|
|
<h2 style="margin-top:0;">Neuer Charakter</h2>
|
|
<form method="post">
|
|
<label>Account</label>
|
|
<select name="account_name" required>
|
|
{% for name in account_names %}
|
|
<option value="{{ name }}">{{ name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
<label>Charaktername</label>
|
|
<input type="text" name="char_name" required autofocus>
|
|
<label>Geschlecht (0 = männlich, 1 = weiblich)</label>
|
|
<input type="number" name="sex" value="0" min="0" max="1">
|
|
<label>Face</label>
|
|
<input type="number" name="face" value="1">
|
|
<label>Frisur</label>
|
|
<input type="number" name="hairstyle" value="1">
|
|
<div style="margin-top:20px;">
|
|
<button type="submit">Anlegen</button>
|
|
<a class="btn secondary" href="{{ url_for('characters') }}">Abbrechen</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
{% endblock %}
|