41 lines
947 B
Python
Executable File
41 lines
947 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
# modules are all in the parent directory
|
|
import sys
|
|
# sys.path.append('..')
|
|
|
|
# import helpers from modules
|
|
from helpers import get_client_cert
|
|
from db import *
|
|
|
|
TLS_CLIENT_HASH = get_client_cert()
|
|
user_id = check_hash(TLS_CLIENT_HASH)
|
|
user_name = get_name(user_id) or "[Not Set]"
|
|
game_id = get_game_id(user_id)
|
|
|
|
print("# Welcome: User Logged In")
|
|
print()
|
|
|
|
print("## Your USER ID:")
|
|
print(user_id)
|
|
print()
|
|
|
|
print("## Your USER NAME:")
|
|
print(user_name)
|
|
print("=> change-name.cgi Change User Name")
|
|
print()
|
|
|
|
print("## TLS Certs associated with account")
|
|
print("=> update-auth-code.cgi Generate an auth code to add another cert to your account")
|
|
print("=> add-cert.cgi Add another cert to your account (with auth code)")
|
|
print()
|
|
|
|
if game_id:
|
|
print("=> game.cgi back to game")
|
|
|
|
print("=> rank.cgi ranking")
|
|
print("=> lobby.cgi lobby")
|
|
print("=> new_game.cgi new game")
|
|
|
|
#vim:fenc=utf-8:ts=4:sw=4:sta:noet:sts=4:fdm=marker:ai
|