Files
ssof_labs/pa/lab2/chall_guess_number.py
2025-11-20 19:37:58 +00:00

16 lines
339 B
Python

from requests import Session
BASE = "http://mustard.stt.rnl.tecnico.ulisboa.pt:25051"
sesh = Session()
resp = sesh.get(BASE+"/")
content = resp.content.decode('utf-8')
for guess in range(1,1000):
resp = sesh.get(BASE+"/number/"+str(guess))
content = resp.content.decode('utf-8')
if "SSof" in content:
break
print(guess, content)