Rating:

We solved the equations with sympy and got the flag after a while of running the following script.

from sympy import sympify, solve
import re
import requests

scount = 0
symbols_dict = {}
def symbol_from_unicode(c):
global scount
if c in symbols_dict:
return symbols_dict[c]
scount += 1
name = f'V{scount}V'
symbols_dict[c] = name
return name

def clean_eq(eq):
eq = ''.join(symbol_from_unicode(c) if ord(c) > 128 else c for c in eq)
eq = re.sub(r'(\d+|\))(V\d+V)', r'\1*\2', eq)
eq = re.sub(r'(V\d+V)(\d+|\()', r'\1*\2', eq)
eq = eq.replace('?', 'zz')
return eq

def solve_system_equations(eqs):
yes = []
for e in eqs:
print(e)
eq = sympify("Eq(" + e.replace("=", ",") + ")")
yes.append(eq)

s = solve(yes)
syms = {k.name: k for k in s.keys()}
return s, syms

http = requests.Session()

def get_eqs_from_html(html):
pp = re.search(r'"enigma">\s+([\s\S]+?)</div>', html).group(1)
pp = pp.replace('', '').replace('', '')
pp = re.findall(r'

(.+?)

', pp)
return pp

sol, syms = solve_system_equations(map(clean_eq, eqs))
return sol[syms['zz']]

eqs = get_eqs_from_html(html)
while True:
print(html)
eqs = get_eqs_from_html(html)
print(eqs)