Reconnect until you get 4 char output from server on first try, proceed to flip bytes until you get 6 characters back, at which point you reverse the decoding process and submit the secret to grab the flag. Read the writeup for more detail.