Theres a flaw in code that means every nth bit results in 1,
which can be unxored later [used primes for efficiency - doesnt repeat bit]
get every 7 bytes to get...
flag{bits_leaking_out_down_the_water_spout}
import sockethost ="2020.redpwnc.tf"port =31284ip ="35.231.164.133"#socket.gethostbyname(host)defcrack(): template = [x for x in"-"*500]for i in primes:# use ur own primes a =server(i-1,i)for k,l inenumerate(str(a)):if k%(i) ==0: template[k]=str(int(l) ^1)print("".join(template))defserver(i,j): s = socket.socket() s.connect((ip, port)) a = s.recv(1024)print(a,i) s.send((str(i)+"\n").encode()) a = s.recv(1024)print(a,j) s.send((str(j)+"\n").encode()) out = s.recv(1024).decode().split(" ")[1]print(out)return outcrack()