27 lines
804 B
Python
27 lines
804 B
Python
import hashlib
|
|
|
|
def sha512_hash(Password):
|
|
HashedPassword = hashlib.sha512(Password.encode('utf-8')).hexdigest()
|
|
return HashedPassword
|
|
|
|
|
|
def dropdown_menu(object_input):
|
|
html = ''
|
|
def loop(x, count):
|
|
html = ''
|
|
for key,value in x.items():
|
|
print(' ' * count * 5, key)
|
|
if type(value) == dict:
|
|
html += f'<details style="left: {count * 5}px; position: relative">'
|
|
html += f'<summary>{key}</summary>'
|
|
html += loop(x[key], count+1)
|
|
html += f'</details>'
|
|
else:
|
|
html += f'<a href="/wiki/{value}" style="left: {count * 5}px; position: relative">{key}</a><br/>'
|
|
return html
|
|
|
|
count = 0
|
|
html += loop(object_input, count)
|
|
print(html)
|
|
return html
|