더북(TheBook)
# 취약: 과도한 오류 노출
@app.route("/debug-error")
def debug_error():
    1/0  # 예외 스택 트레이스 노출(디버그 True라면)

@app.route("/")
def index():
    return {
        "endpoints": ["/user?username=", "/read?path=", "/ping?host=", "/load (POST b64)", "/login (POST json)", "/regex?text="],
        "debug": app.config["DEBUG"],
        "note": "This app is intentionally vulnerable. Do NOT deploy."
    }

if __name__ == "__main__":
    init_db()
    # host=0.0.0.0로 외부 노출 + 디버그 True
    app.run(host="0.0.0.0", port=5000, debug=True)