Rating: 0

Hamming 7,4 codes and I was too lazy to study it :) What about a brute force? The code is 7 bits and the response 4 bits:

```
from pwn import *

tab = {}
attempts = {}

br = ['0000', '0001', '0010', '0011', '0100', '0101', '0110', '0111', '1000', '1001', '1010', '1011', '1100', '1101', '1110', '1111']

while True:
try:
r = remote('104.154.106.182', 6969)

for i in range(100):
msg = r.recvuntil('DATA:')
print msg

if 'CODE VALIDATED' in msg and code not in tab:
tab[code] = br[attempts[code]]

code = msg.split('CODE: ')[1][:7]
if code in tab:
r.sendline(tab[code])
else:
if not code in attempts:
attempts[code] = 0
else:
attempts[code] += 1
r.sendline(br[attempts[code]])

r.interactive()
except:
continue
```

It can take a couple of minutes, you can do other challs :)