2024-05-29 14:22:49 +08:00
|
|
|
#SPDX-FileCopyrightText: 2024 Crimson Hawk
|
|
|
|
#SPDX-License-Identifier: GPL-3.0-or-later
|
2024-05-29 14:21:05 +08:00
|
|
|
import base64
|
|
|
|
import hashlib
|
|
|
|
import string
|
|
|
|
import time
|
2024-06-18 09:23:39 +08:00
|
|
|
import keyboard
|
|
|
|
import os
|
|
|
|
from libexam.py import *
|
2024-05-29 14:21:05 +08:00
|
|
|
|
2024-05-29 14:22:49 +08:00
|
|
|
|
2024-06-18 09:23:39 +08:00
|
|
|
def clearConsole():
|
|
|
|
command = 'clear'
|
|
|
|
if os.name in ('nt', 'dos'): # If computer is running windows use cls
|
|
|
|
command = 'cls'
|
|
|
|
os.system(command)
|
2024-05-29 14:21:05 +08:00
|
|
|
|
2024-05-29 14:22:49 +08:00
|
|
|
|
2024-05-29 14:21:05 +08:00
|
|
|
print("""
|
|
|
|
___ ___ __
|
2024-05-29 14:26:58 +08:00
|
|
|
/ / /__/ / / Coded by Crimson Hawk
|
2024-05-29 14:21:05 +08:00
|
|
|
/ / ___ / /___ ____ __ __ _____ __ __ __
|
|
|
|
/ / / / / __ / / _ / \\ \\/ / / __ / / / / /
|
|
|
|
/ / / / / /_/ / / /__/ / /\\ \\ / /_/ / / /__/ /
|
|
|
|
/__/ /__/ /_____/ /____/ /_/ \\_\\ /____/_/ /__/ /__/
|
|
|
|
""")
|
|
|
|
|
2024-05-29 14:22:49 +08:00
|
|
|
print(f"libexam frontend UI initiated")
|
2024-06-18 09:23:39 +08:00
|
|
|
|
|
|
|
sleep(1)
|
|
|
|
print("\r")
|
|
|
|
|
|
|
|
libexam.setmode(1) #setmode as client
|
|
|
|
|
|
|
|
username = ""
|
|
|
|
|
|
|
|
print(f"""
|
|
|
|
______________________________
|
|
|
|
| |
|
|
|
|
| libexam demo frontend ui |
|
|
|
|
| |
|
|
|
|
| Username:{username}
|
|
|
|
| |
|
|
|
|
| (L)ogin |
|
|
|
|
|______________________________|""")
|
|
|
|
|
|
|
|
while (True):
|
|
|
|
key = keyboard.wait()
|
|
|
|
#print(f"{key} pressed")
|
|
|
|
username = username + key
|
|
|
|
clearConsole()
|
|
|
|
print(f"""
|
|
|
|
______________________________
|
|
|
|
| |
|
|
|
|
| libexam demo frontend ui |
|
|
|
|
| |
|
|
|
|
| Username:{username}
|
|
|
|
| |
|
|
|
|
| (L)ogin |
|
|
|
|
|______________________________|""")
|