diff --git a/sujet_tp.typ b/sujet_tp.typ index a8be194..c91fc1f 100644 --- a/sujet_tp.typ +++ b/sujet_tp.typ @@ -55,9 +55,12 @@ from string import ascii_lowercase, ascii_uppercase, digits from subprocess import check_output alphabet = ascii_lowercase + ascii_uppercase + digits +env = { + "LD_PRELOAD": "..." # TODO +} -def request(url: str) -> str: +def request(url: str) -> int: """Executes the client binary with the following URL, and checks its output.""" - # TODO: extraire l'information utile pour l'attaque - return check_output(["./client", "127.0.0.1", "8080", url]).decode('utf-8') + out = check_output(["./client", "127.0.0.1", "8080", url], env=env).decode('utf-8') + return int(out.split(' ')[1]) ```