Rating:

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.

Original writeup (https://github.com/orangeblock/ctf-writeups/tree/master/Hack.lu%20CTF%202017/b64).