import asyncio #import time import random as rnd import websockets import json flag='ctf{1_l0v3_4774ck_0n_7174n}' async def game(ws,path): if('train' in path): train=True else: train=False if train: state=[3,5,7] else: state=[rnd.randint(1,300) for i in range(300)] await ws.recv() await ws.send(json.dumps({'state':state})) while(state!=[0]*len(state)): try: data = json.loads(await ws.recv()) index=data['index'] value=data['value'] if(state[index]