JavaScript Deobfuscation (ABCTF2016 – JS Pls)

One of the challenges in ABCTF 2016 last week was some JavaScript deobfuscation to obtain a flag. As this is something I've never fully done before, I figured this would be a good start.

To start things off, the original code is below.

// original - http://pastebin.com/raw/9Y55hxbw

eval(new Buffer('cHJvY2Vzcy5zdGRpbi5yZXN1bWUoKTtwcm9jZXNzLnN0ZGluLnNldEVuY29kaW5nKCd1dGY4Jyk7Y29uc29sZS5sb2coIkdpdmUgbWUgYSBmbGFnIik7cHJvY2Vzcy5zdGRpbi5vbignZGF0YScsKHQpPT57dD10LnRyaW0oKTtpZih0Lmxlbmd0aD09PStbWyshK1tdXStbIStbXSshK1tdKyErW10rIStbXSshK1tdKyErW10rIStbXSshK1tdKyErW11dXSl7aWYodC5zdWJzdHIoK1tdLFshK1tdKyErW10rIStbXSshK1tdKyErW11dK1tdKT09PSgrIVtdK1tdWyhbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0pWyshK1tdK1srW11dXSsoW11bW11dK1tdKVsrIStbXV0rKCFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVsrIStbXV0rKFtdW1tdXStbXSlbK1tdXSsoW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dKVsrIStbXStbK1tdXV0rKCEhW10rW10pWyshK1tdXV0pWyshK1tdK1srW11dXSsoKyFbXSsoIVtdKVsoW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dKVsrIStbXStbK1tdXV0rKFtdW1tdXStbXSlbKyErW11dKyghW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbKyErW11dKyhbXVtbXV0rW10pWytbXV0rKFtdWyghW10rW10pWytbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghW10rW10pWyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbKyErW11dXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdWyghW10rW10pWytbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghW10rW10pWyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbKyErW11dXSlbKyErW10rWytbXV1dKyghIVtdK1tdKVsrIStbXV1dKVsrIStbXStbK1tdXV0rW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dWyhbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0pWyshK1tdK1srW11dXSsoW11bW11dK1tdKVsrIStbXV0rKCFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVsrIStbXV0rKFtdW1tdXStbXSlbK1tdXSsoW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dKVsrIStbXStbK1tdXV0rKCEhW10rW10pWyshK1tdXV0oKCEhW10rW10pWyshK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyhbXVtbXV0rW10pWytbXV0rKCEhW10rW10pWyshK1tdXSsoW11bW11dK1tdKVsrIStbXV0rKCtbIVtdXStbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0pWyshK1tdK1srIStbXV1dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCFbXStbXSlbIStbXSshK1tdKyErW11dKyhbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0rW10pWyErW10rIStbXSshK1tdXSsoIVtdK1tdKVsrIStbXV0rKCsoIStbXSshK1tdK1srIStbXV0rWyshK1tdXSkpWyghIVtdK1tdKVsrW11dKyghIVtdK1tdWyghW10rW10pWytbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghW10rW10pWyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbKyErW11dXSlbKyErW10rWytbXV1dKygrIVtdKyhbXStbXSlbKFtdWyghW10rW10pWytbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghW10rW10pWyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbKyErW11dXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdWyghW10rW10pWytbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghW10rW10pWyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbKyErW11dXSlbKyErW10rWytbXV1dKyhbXVtbXV0rW10pWyshK1tdXSsoIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyshK1tdXSsoW11bW11dK1tdKVsrW11dKyhbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0pWyshK1tdK1srW11dXSsoISFbXStbXSlbKyErW11dXSlbKyErW10rWytbXV1dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVsrIStbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyhbXVtbXV0rW10pWyshK1tdXSsoKyFbXStbIVtdXSsoW10rW10pWyhbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0pWyshK1tdK1srW11dXSsoW11bW11dK1tdKVsrIStbXV0rKCFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVsrIStbXV0rKFtdW1tdXStbXSlbK1tdXSsoW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dKVsrIStbXStbK1tdXV0rKCEhW10rW10pWyshK1tdXV0pWyErW10rIStbXStbK1tdXV1dKCErW10rIStbXSshK1tdK1srIStbXV0pWyshK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKSgpKChbXStbXSlbKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghIVtdK1tdKVsrW11dKyghW10rW10pWyshK1tdXSsoIVtdK1tdKVshK1tdKyErW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dK1tdKVshK1tdKyErW10rIStbXV0rKCFbXStbXSlbIStbXSshK1tdKyErW11dXSgpWytbXV0pWyErW10rIStbXV0rKCtbIVtdXStbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV1bKFtdWyghW10rW10pWytbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghW10rW10pWyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbKyErW11dXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdWyghW10rW10pWytbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghW10rW10pWyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbKyErW11dXSlbKyErW10rWytbXV1dKyhbXVtbXV0rW10pWyshK1tdXSsoIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyshK1tdXSsoW11bW11dK1tdKVsrW11dKyhbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0pWyshK1tdK1srW11dXSsoISFbXStbXSlbKyErW11dXSgoISFbXStbXSlbKyErW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKFtdW1tdXStbXSlbK1tdXSsoISFbXStbXSlbKyErW11dKyhbXVtbXV0rW10pWyshK1tdXSsoK1shW11dK1tdWyghW10rW10pWytbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghW10rW10pWyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbKyErW11dXSlbKyErW10rWyshK1tdXV0rW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dWyhbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0pWyshK1tdK1srW11dXSsoW11bW11dK1tdKVsrIStbXV0rKCFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVsrIStbXV0rKFtdW1tdXStbXSlbK1tdXSsoW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dKVsrIStbXStbK1tdXV0rKCEhW10rW10pWyshK1tdXV0oKCEhW10rW10pWyshK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyhbXVtbXV0rW10pWytbXV0rKCEhW10rW10pWyshK1tdXSsoW11bW11dK1tdKVsrIStbXV0rKCtbIVtdXStbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0pWyshK1tdK1srIStbXV1dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCFbXStbXSlbIStbXSshK1tdKyErW11dKyhbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0rW10pWyErW10rIStbXSshK1tdXSsoIVtdK1tdKVsrIStbXV0rKCsoIStbXSshK1tdK1srIStbXV0rWyshK1tdXSkpWyghIVtdK1tdKVsrW11dKyghIVtdK1tdWyghW10rW10pWytbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghW10rW10pWyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbKyErW11dXSlbKyErW10rWytbXV1dKygrIVtdKyhbXStbXSlbKFtdWyghW10rW10pWytbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghW10rW10pWyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbKyErW11dXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdWyghW10rW10pWytbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghW10rW10pWyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbKyErW11dXSlbKyErW10rWytbXV1dKyhbXVtbXV0rW10pWyshK1tdXSsoIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyshK1tdXSsoW11bW11dK1tdKVsrW11dKyhbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0pWyshK1tdK1srW11dXSsoISFbXStbXSlbKyErW11dXSlbKyErW10rWytbXV1dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVsrIStbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyhbXVtbXV0rW10pWyshK1tdXSsoKyFbXStbIVtdXSsoW10rW10pWyhbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0pWyshK1tdK1srW11dXSsoW11bW11dK1tdKVsrIStbXV0rKCFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVsrIStbXV0rKFtdW1tdXStbXSlbK1tdXSsoW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dKVsrIStbXStbK1tdXV0rKCEhW10rW10pWyshK1tdXV0pWyErW10rIStbXStbK1tdXV1dKCErW10rIStbXSshK1tdK1srIStbXV0pWyshK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKSgpKChbXStbXSlbKCFbXStbXSlbK1tdXSsoISFbXStbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0pWyshK1tdK1srW11dXSsoW11bW11dK1tdKVsrIStbXV0rKCEhW10rW10pWytbXV0rKFtdWyghW10rW10pWytbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghW10rW10pWyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbKyErW11dXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdWyghW10rW10pWytbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghW10rW10pWyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbKyErW11dXSlbKyErW10rWytbXV1dKyghW10rW10pWyErW10rIStbXV0rKCEhW10rW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dKVsrIStbXStbK1tdXV0rKCEhW10rW10pWyshK1tdXV0oKVsrIStbXStbKyErW11dXSlbIStbXSshK1tdXSsoIVtdK1tdKVsrIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyErW10rIStbXSshK1tdXSkoKSgpKVshK1tdKyErW10rIStbXStbK1tdXV0rKCshW10rW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dWyhbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0pWyshK1tdK1srW11dXSsoW11bW11dK1tdKVsrIStbXV0rKCFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVsrIStbXV0rKFtdW1tdXStbXSlbK1tdXSsoW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dKVsrIStbXStbK1tdXV0rKCEhW10rW10pWyshK1tdXV0pWyshK1tdK1srW11dXSl7aWYodFtbIStbXSshK1tdKyErW10rIStbXSshK1tdXStbXV0uY2hhckNvZGVBdCgrW10pPT09dFtbKyErW11dK1shK1tdKyErW10rIStbXSshK1tdKyErW10rIStbXSshK1tdKyErW11dXS5jaGFyQ29kZUF0KCtbXSktIStbXS0hK1tdJiZ0W1shK1tdKyErW10rIStbXSshK1tdKyErW11dK1tdXS5jaGFyQ29kZUF0KCtbXSk9PT0rKCgrISFbXStbXSkrKCErW10rISFbXStbXSkrKCErW10rISFbXSshIVtdK1tdKSkpe2lmKHQuc3Vic3RyKFshK1tdKyErW10rIStbXSshK1tdKyErW10rIStbXV0rW10sWyErW10rIStbXSshK1tdKyErW11dK1tdKT09PU9iamVjdC5rZXlzKHByb2Nlc3MudmVyc2lvbnMpWyshK1tdXSl7aWYodFtbKyErW11dK1srW11dXT09PXRbWyshK1tdXStbIStbXSshK1tdKyErW11dXSYmdFtbKyErW11dK1srW11dXS5jaGFyQ29kZUF0KCtbXSk9PT0rKCghK1tdKyEhW10rISFbXSshIVtdKyEhW10rISFbXSshIVtdKyEhW10rISFbXStbXSkrKCErW10rISFbXSshIVtdKyEhW10rISFbXStbXSkpKXtpZih0LnN1YnN0cihbKyErW11dK1srIStbXV0sIStbXSshK1tdKT09PSgodHlwZW9mIHgpW1shK1tdKyErW10rIStbXSshK1tdKyErW11dK1tdXSsodHlwZW9mIHQpWytbXV0pKXtpZih0LnN1YnN0cihbKyErW11dK1shK1tdKyErW10rIStbXSshK1tdXSxbIStbXSshK1tdKyErW10rIStbXV0rW10pPT09KCsoIStbXSshK1tdKyErW10rWyErW10rIStbXV0pKVsoISFbXStbXSlbK1tdXSsoISFbXStbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0pWyshK1tdK1srW11dXSsoKyFbXSsoW10rW10pWyhbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0pWyshK1tdK1srW11dXSsoW11bW11dK1tdKVsrIStbXV0rKCFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVsrIStbXV0rKFtdW1tdXStbXSlbK1tdXSsoW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dKVsrIStbXStbK1tdXV0rKCEhW10rW10pWyshK1tdXV0pWyshK1tdK1srW11dXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbKyErW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoW11bW11dK1tdKVsrIStbXV0rKCshW10rWyFbXV0rKFtdK1tdKVsoW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dKVsrIStbXStbK1tdXV0rKFtdW1tdXStbXSlbKyErW11dKyghW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbKyErW11dKyhbXVtbXV0rW10pWytbXV0rKFtdWyghW10rW10pWytbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghW10rW10pWyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbKyErW11dXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdWyghW10rW10pWytbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghW10rW10pWyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbKyErW11dXSlbKyErW10rWytbXV1dKyghIVtdK1tdKVsrIStbXV1dKVshK1tdKyErW10rWytbXV1dXSghK1tdKyErW10rIStbXStbIStbXSshK1tdKyErW11dKStbIStbXSshK1tdKyErW10rIStbXV0rW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dWyhbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0pWyshK1tdK1srW11dXSsoW11bW11dK1tdKVsrIStbXV0rKCFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVsrIStbXV0rKFtdW1tdXStbXSlbK1tdXSsoW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dKVsrIStbXStbK1tdXV0rKCEhW10rW10pWyshK1tdXV0oKCEhW10rW10pWyshK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyhbXVtbXV0rW10pWytbXV0rKCEhW10rW10pWyshK1tdXSsoW11bW11dK1tdKVsrIStbXV0rKCtbIVtdXStbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0pWyshK1tdK1srIStbXV1dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCFbXStbXSlbIStbXSshK1tdKyErW11dKyhbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0rW10pWyErW10rIStbXSshK1tdXSsoIVtdK1tdKVsrIStbXV0rKCsoIStbXSshK1tdK1srIStbXV0rWyshK1tdXSkpWyghIVtdK1tdKVsrW11dKyghIVtdK1tdWyghW10rW10pWytbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghW10rW10pWyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbKyErW11dXSlbKyErW10rWytbXV1dKygrIVtdKyhbXStbXSlbKFtdWyghW10rW10pWytbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghW10rW10pWyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbKyErW11dXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdWyghW10rW10pWytbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghW10rW10pWyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbKyErW11dXSlbKyErW10rWytbXV1dKyhbXVtbXV0rW10pWyshK1tdXSsoIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyshK1tdXSsoW11bW11dK1tdKVsrW11dKyhbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0pWyshK1tdK1srW11dXSsoISFbXStbXSlbKyErW11dXSlbKyErW10rWytbXV1dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVsrIStbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyhbXVtbXV0rW10pWyshK1tdXSsoKyFbXStbIVtdXSsoW10rW10pWyhbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0pWyshK1tdK1srW11dXSsoW11bW11dK1tdKVsrIStbXV0rKCFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVsrIStbXV0rKFtdW1tdXStbXSlbK1tdXSsoW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dKVsrIStbXStbK1tdXV0rKCEhW10rW10pWyshK1tdXV0pWyErW10rIStbXStbK1tdXV1dKCErW10rIStbXSshK1tdK1srIStbXV0pWyshK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKSgpKChbXStbXSlbKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghIVtdK1tdKVsrW11dKyghW10rW10pWyshK1tdXSsoIVtdK1tdKVshK1tdKyErW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dK1tdKVshK1tdKyErW10rIStbXV0rKCFbXStbXSlbIStbXSshK1tdKyErW11dXSgpWytbXV0pWyErW10rIStbXV0rKCsoIStbXSshK1tdK1srW11dKSlbKCEhW10rW10pWytbXV0rKCEhW10rW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dKVsrIStbXStbK1tdXV0rKCshW10rKFtdK1tdKVsoW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW11bKCFbXStbXSlbK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKCFbXStbXSlbIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrIStbXV1dKVsrIStbXStbK1tdXV0rKFtdW1tdXStbXSlbKyErW11dKyghW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXSlbKyErW11dKyhbXVtbXV0rW10pWytbXV0rKFtdWyghW10rW10pWytbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghW10rW10pWyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbKyErW11dXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdWyghW10rW10pWytbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghW10rW10pWyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbKyErW11dXSlbKyErW10rWytbXV1dKyghIVtdK1tdKVsrIStbXV1dKVsrIStbXStbK1tdXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyshK1tdXSsoWyFbXV0rW11bW11dKVsrIStbXStbK1tdXV0rKFtdW1tdXStbXSlbKyErW11dKygrIVtdK1shW11dKyhbXStbXSlbKFtdWyghW10rW10pWytbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghW10rW10pWyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbKyErW11dXStbXSlbIStbXSshK1tdKyErW11dKyghIVtdK1tdWyghW10rW10pWytbXV0rKFshW11dK1tdW1tdXSlbKyErW10rWytbXV1dKyghW10rW10pWyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbKyErW11dXSlbKyErW10rWytbXV1dKyhbXVtbXV0rW10pWyshK1tdXSsoIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWytbXV0rKCEhW10rW10pWyshK1tdXSsoW11bW11dK1tdKVsrW11dKyhbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0rW10pWyErW10rIStbXSshK1tdXSsoISFbXStbXSlbK1tdXSsoISFbXStbXVsoIVtdK1tdKVsrW11dKyhbIVtdXStbXVtbXV0pWyshK1tdK1srW11dXSsoIVtdK1tdKVshK1tdKyErW11dKyghIVtdK1tdKVsrW11dKyghIVtdK1tdKVshK1tdKyErW10rIStbXV0rKCEhW10rW10pWyshK1tdXV0pWyshK1tdK1srW11dXSsoISFbXStbXSlbKyErW11dXSlbIStbXSshK1tdK1srW11dXV0oIStbXSshK1tdK1srIStbXV0pKXtjb25zb2xlLmxvZygibmljZSBqb2IhIik7cHJvY2Vzcy5leGl0KCk7fX19fX19fWNvbnNvbGUubG9nKCJub3BlISIpO3Byb2Nlc3MuZXhpdCgpO30pOwo=','base64').toString());

The first thing I did was to base64 decode it obviously.

process.stdin.resume();process.stdin.setEncoding('utf8');console.log("Give me a flag");process.stdin.on('data',(t)=>{t=t.trim();if(
 < ...snip ...>
 ){console.log("nice job!");process.exit();}}}}}}}console.log("nope!");process.exit();});

Running this through the JavaScript beautifier at least gave me some white-space to work with, but that was about it.

process.stdin.resume();
process.stdin.setEncoding('utf8');
console.log("Give me a flag");
process.stdin.on('data', (t) => {
    t = t.trim();
    if (t.length === +[
            [+!+[]] + [!+[] + !+[] + !+[] + !+[] + !+[] + !+[] + !+[] + !+[] + !+[]]
        ]) {
        if (t.substr(+[], [!+[] + !+[] + !+[] + !+[] + !+[]] + []) === (+![] + [][([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + ([][
                []
            ] + [])[+!+[]] + (![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[+!+[]] + ([][
                []
            ] + [])[+[]] + ([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (+![] + (![])[([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + ([][
                []
            ] + [])[+!+[]] + (![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[+!+[]] + ([][
                []
            ] + [])[+[]] + ([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]][([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + ([][
                []
            ] + [])[+!+[]] + (![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[+!+[]] + ([][
                []
            ] + [])[+[]] + ([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+!+[]]]((!![] + [])[+!+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + ([][
                []
            ] + [])[+[]] + (!![] + [])[+!+[]] + ([][
                []
            ] + [])[+!+[]] + (+[![]] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+!+[]]] + (!![] + [])[!+[] + !+[] + !+[]] + (![] + [])[!+[] + !+[] + !+[]] + ([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (![] + [])[+!+[]] + (+(!+[] + !+[] + [+!+[]] + [+!+[]]))[(!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (+![] + ([] + [])[([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + ([][
                []
            ] + [])[+!+[]] + (![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[+!+[]] + ([][
                []
            ] + [])[+[]] + ([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+[]] + (!![] + [])[+!+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + ([][
                []
            ] + [])[+!+[]] + (+![] + [![]] + ([] + [])[([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + ([][
                []
            ] + [])[+!+[]] + (![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[+!+[]] + ([][
                []
            ] + [])[+[]] + ([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+!+[]]])[!+[] + !+[] + [+[]]]](!+[] + !+[] + !+[] + [+!+[]])[+!+[]] + (!![] + [])[!+[] + !+[] + !+[]])()(([] + [])[([![]] + [][
                []
            ])[+!+[] + [+[]]] + (!![] + [])[+[]] + (![] + [])[+!+[]] + (![] + [])[!+[] + !+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + ([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (![] + [])[!+[] + !+[] + !+[]]]()[+[]])[!+[] + !+[]] + (+[![]] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]][([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + ([][
                []
            ] + [])[+!+[]] + (![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[+!+[]] + ([][
                []
            ] + [])[+[]] + ([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+!+[]]]((!![] + [])[+!+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + ([][
                []
            ] + [])[+[]] + (!![] + [])[+!+[]] + ([][
                []
            ] + [])[+!+[]] + (+[![]] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+!+[]]] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]][([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + ([][
                []
            ] + [])[+!+[]] + (![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[+!+[]] + ([][
                []
            ] + [])[+[]] + ([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+!+[]]]((!![] + [])[+!+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + ([][
                []
            ] + [])[+[]] + (!![] + [])[+!+[]] + ([][
                []
            ] + [])[+!+[]] + (+[![]] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+!+[]]] + (!![] + [])[!+[] + !+[] + !+[]] + (![] + [])[!+[] + !+[] + !+[]] + ([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (![] + [])[+!+[]] + (+(!+[] + !+[] + [+!+[]] + [+!+[]]))[(!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (+![] + ([] + [])[([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + ([][
                []
            ] + [])[+!+[]] + (![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[+!+[]] + ([][
                []
            ] + [])[+[]] + ([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+[]] + (!![] + [])[+!+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + ([][
                []
            ] + [])[+!+[]] + (+![] + [![]] + ([] + [])[([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + ([][
                []
            ] + [])[+!+[]] + (![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[+!+[]] + ([][
                []
            ] + [])[+[]] + ([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+!+[]]])[!+[] + !+[] + [+[]]]](!+[] + !+[] + !+[] + [+!+[]])[+!+[]] + (!![] + [])[!+[] + !+[] + !+[]])()(([] + [])[(![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + ([][
                []
            ] + [])[+!+[]] + (!![] + [])[+[]] + ([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+!+[]]]()[+!+[] + [+!+[]]])[!+[] + !+[]] + (![] + [])[+!+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]])()())[!+[] + !+[] + !+[] + [+[]]] + (+![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]][([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + ([][
                []
            ] + [])[+!+[]] + (![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[+!+[]] + ([][
                []
            ] + [])[+[]] + ([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]]) {
            if (t[[!+[] + !+[] + !+[] + !+[] + !+[]] + []].charCodeAt(+[]) === t[[+!+[]] + [!+[] + !+[] + !+[] + !+[] + !+[] + !+[] + !+[] + !+[]]].charCodeAt(+[]) - !+[] - !+[] && t[[!+[] + !+[] + !+[] + !+[] + !+[]] + []].charCodeAt(+[]) === +((+!![] + []) + (!+[] + !![] + []) + (!+[] + !![] + !![] + []))) {
                if (t.substr([!+[] + !+[] + !+[] + !+[] + !+[] + !+[]] + [], [!+[] + !+[] + !+[] + !+[]] + []) === Object.keys(process.versions)[+!+[]]) {
                    if (t[[+!+[]] + [+[]]] === t[[+!+[]] + [!+[] + !+[] + !+[]]] && t[[+!+[]] + [+[]]].charCodeAt(+[]) === +((!+[] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + []) + (!+[] + !![] + !![] + !![] + !![] + []))) {
                        if (t.substr([+!+[]] + [+!+[]], !+[] + !+[]) === ((typeof x)[[!+[] + !+[] + !+[] + !+[] + !+[]] + []] + (typeof t)[+[]])) {
                            if (t.substr([+!+[]] + [!+[] + !+[] + !+[] + !+[]], [!+[] + !+[] + !+[] + !+[]] + []) === (+(!+[] + !+[] + !+[] + [!+[] + !+[]]))[(!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (+![] + ([] + [])[([][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + ([][
                                    []
                                ] + [])[+!+[]] + (![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[+!+[]] + ([][
                                    []
                                ] + [])[+[]] + ([][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+[]] + (!![] + [])[+!+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + ([][
                                    []
                                ] + [])[+!+[]] + (+![] + [![]] + ([] + [])[([][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + ([][
                                    []
                                ] + [])[+!+[]] + (![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[+!+[]] + ([][
                                    []
                                ] + [])[+[]] + ([][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+!+[]]])[!+[] + !+[] + [+[]]]](!+[] + !+[] + !+[] + [!+[] + !+[] + !+[]]) + [!+[] + !+[] + !+[] + !+[]] + [][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]][([][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + ([][
                                    []
                                ] + [])[+!+[]] + (![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[+!+[]] + ([][
                                    []
                                ] + [])[+[]] + ([][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+!+[]]]((!![] + [])[+!+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + ([][
                                    []
                                ] + [])[+[]] + (!![] + [])[+!+[]] + ([][
                                    []
                                ] + [])[+!+[]] + (+[![]] + [][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+!+[]]] + (!![] + [])[!+[] + !+[] + !+[]] + (![] + [])[!+[] + !+[] + !+[]] + ([][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (![] + [])[+!+[]] + (+(!+[] + !+[] + [+!+[]] + [+!+[]]))[(!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (+![] + ([] + [])[([][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + ([][
                                    []
                                ] + [])[+!+[]] + (![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[+!+[]] + ([][
                                    []
                                ] + [])[+[]] + ([][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+[]] + (!![] + [])[+!+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + ([][
                                    []
                                ] + [])[+!+[]] + (+![] + [![]] + ([] + [])[([][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + ([][
                                    []
                                ] + [])[+!+[]] + (![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[+!+[]] + ([][
                                    []
                                ] + [])[+[]] + ([][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+!+[]]])[!+[] + !+[] + [+[]]]](!+[] + !+[] + !+[] + [+!+[]])[+!+[]] + (!![] + [])[!+[] + !+[] + !+[]])()(([] + [])[([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (!![] + [])[+[]] + (![] + [])[+!+[]] + (![] + [])[!+[] + !+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + ([][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (![] + [])[!+[] + !+[] + !+[]]]()[+[]])[!+[] + !+[]] + (+(!+[] + !+[] + [+[]]))[(!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (+![] + ([] + [])[([][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + ([][
                                    []
                                ] + [])[+!+[]] + (![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[+!+[]] + ([][
                                    []
                                ] + [])[+[]] + ([][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+[]] + (!![] + [])[+!+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + ([][
                                    []
                                ] + [])[+!+[]] + (+![] + [![]] + ([] + [])[([][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + ([][
                                    []
                                ] + [])[+!+[]] + (![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[+!+[]] + ([][
                                    []
                                ] + [])[+[]] + ([][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                                    []
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+!+[]]])[!+[] + !+[] + [+[]]]](!+[] + !+[] + [+!+[]])) {
                                console.log("nice job!");
                                process.exit();
                            }
                        }
                    }
                }
            }
        }
    }
    console.log("nope!");
    process.exit();
});

At this point, I remembered the recent post on PortSwigger, so I knew I would have to get my hands dirty.

In cases like this, the easiest way is to use the language (and available tools) against itself. For this specific example, I opened up my browser console and started cleaning up some of the non alphanumeric code. I prefer to break the code up into chunks (sections between parenthesis, curly braces, specific methods, etc.) and decode it piece by piece. This prevents the interpreter from missing something or me copying and pasting too much somewhere.

>> console.log(+[
            [+!+[]] + [!+[] + !+[] + !+[] + !+[] + !+[] + !+[] + !+[] + !+[] + !+[]]
        ])
19
>> console.log(+[], [!+[] + !+[] + !+[] + !+[] + !+[]] + [])
0 5
// everything after the === and before the {
>> console.log((+![] + [][([][(![] + [])[+[]] + ([![]] + [][
                []
            ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]] + [])[!+[] + !+[] + !+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][
                
                < ... snip ... >
ABCTF

With those 3 changes alone, the top 7 lines of my file were now readable and useful.

process.stdin.resume();
process.stdin.setEncoding('utf8');
console.log("Give me a flag");
process.stdin.on('data', (t) => {
    t = t.trim();
    if (t.length === 19) {
        if (t.substr(0,5) === "ABCTF") {

At this point I already knew that my flag was 19 characters long and started with ABCTF (which was expected).

Next up was line 8.

>> console.log([!+[] + !+[] + !+[] + !+[] + !+[]] + [])
5
>> console.log(+[])
0
>> console.log([+!+[]] + [!+[] + !+[] + !+[] + !+[] + !+[] + !+[] + !+[] + !+[]])
18
>> console.log(- !+[] - !+[])
-2
>> console.log(+((+!![] + []) + (!+[] + !![] + []) + (!+[] + !![] + !![] + [])))
123
if (t[5].charCodeAt(0) === t[18].charCodeAt(0) - 2 && t[5].charCodeAt(0) === 123) {

Line 9 was much simpler, as there were only two non-alphanumeric strings to deal with for now.

>> console.log([!+[] + !+[] + !+[] + !+[] + !+[] + !+[]] + [], [!+[] + !+[] + !+[] + !+[]] + [])
6 4
>> console.log(+!+[])
1

That gave me the following line (I'd have to come back to the rest of it later).

if (t.substr(6,4) === Object.keys(process.versions)[1]) {

Line 10 was similar to the ones earlier, and I decoded it the same way.

>> console.log([+!+[]] + [+[]])
10
>> console.log([+!+[]] + [!+[] + !+[] + !+[]])
13
>> console.log(+((!+[] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + !![] + []) + (!+[] + !![] + !![] + !![] + !![] + [])))
95

At this point I understood how I was decoding the lines, so I figured I would just finish off the rest of the script and get it in a more readable form.

>> console.log([+!+[]] + [+!+[]], !+[] + !+[])
11 2
>> console.log([!+[] + !+[] + !+[] + !+[] + !+[]] + [])
5
>> console.log(+[])
0
>> console.log([+!+[]] + [!+[] + !+[] + !+[] + !+[]], [!+[] + !+[] + !+[] + !+[]] + [])
14 4
>> console.log(+(!+[] + !+[] + !+[] + [!+[] + !+[]]))
32
>> console.log((+(!+[] + !+[] + !+[] + [!+[] + !+[]]))[(!![] + [])[+[]] + (!![] + [][(![] + [])[+[]] + ([![]] + [][

< ... EVERYTHING ELSE UNTIL THE LAST { ... >
 
                                ])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]] + (!![] + [])[+[]] + (!![] + [])[!+[] + !+[] + !+[]] + (!![] + [])[+!+[]]])[+!+[] + [+[]]] + (!![] + [])[+!+[]]])[!+[] + !+[] + [+[]]]](!+[] + !+[] + [+!+[]]))
w4Ck

Now I finally had a mostly useful script, that I would be able to work with.

process.stdin.resume();
process.stdin.setEncoding('utf8');
console.log("Give me a flag");
process.stdin.on('data', (t) => {
    t = t.trim();
    if (t.length === 19) {
        if (t.substr(0,5) === "ABCTF") {
            if (t[5].charCodeAt(0) === t[18].charCodeAt(0) && t[5].charCodeAt(0) === 123) {
                if (t.substr(6,4) === Object.keys(process.versions)[1]) {
                    if (t[10] === t[13] && t[10].charCodeAt(0) === 95) {
                        if (t.substr(11,2) === ((typeof x)[5] + (typeof t)[0])) {
                            if (t.substr(14,4) === "w4Ck") {
                                console.log("nice job!");
                                process.exit();
                            }
                        }
                    }
                }
            }
        }
    }
    console.log("nope!");
    process.exit();
});

Based on lines 6 and 7, I knew that the 19 character flag started with "ABCTF". Based on line 8 I knew that the 6th and 18th characters were character code 123 and 125 respectively (console.log(String.fromCharCode(123)) = '{'; 125 = '}').

With line 12 I knew that the 14th through 18th characters were "w4CK", giving me a fair chunk of the flag already.

ABCTF{????????w4Ck}

Next up was line 9. The process.versions command didn't work in my console originally, until I realized it was for Node.js.

root@kali:~# node
> process.versions
{ http_parser: '2.6.2',
  node: '5.10.1',
  v8: '4.6.85.31',
  uv: '1.8.0',
  zlib: '1.2.8',
  ares: '1.10.1-DEV',
  icu: '56.1',
  modules: '47',
  openssl: '1.0.2g' }
> console.log(Object.keys(process.versions)[1])
node

With that string, I knew that the 6th through 10th characters of the flag would be "node".

Line 10 provided the location of the underscores (String.fromCharCode(95) = "_"), so I was down to 2 unknown characters in my flag.

ABCTF{node_??_w4Ck}

At this point, I could have probably guessed the last two characters, but I wanted to do it the right way.

The last line was actually kind of interesting, and I liked the way they used it to finish up my flag.

if (t.substr(11,2) === ((typeof x)[5] + (typeof t)[0])) {

For this line, my last two characters were actually individual characters taken from the type of two variables.

I knew that t was a "string" since it was the flag, so the second character was 's'.
There wasn't actually an x variable in this entire script, so its type was actually "undefined". The 6th character of undefined is 'i', giving me 'is' for the middle of my flag.

When it was all said and done, the following (and correct) flag was what I got.

ABCTF{node_is_w4Ck}
doyler on Githubdoyler on Twitter
doyler
Ray Doyle is an avid pentester/security enthusiast/beer connoisseur who has worked in IT for almost 16 years now. From building machines and the software on them, to breaking into them and tearing it all down; he's done it all. To show for it, he has obtained an OSCE, OSCP, eCPPT, GXPN, eWPT, eWPTX, SLAE, eMAPT, Security+, ICAgile CP, ITIL v3 Foundation, and even a sabermetrics certification!

He currently serves as a Senior Penetration tester for Avalara, and his previous position was a Principal Penetration Testing Consultant for Secureworks.

When he's not figuring out what cert to get next or side project to work on, he enjoys playing video games, traveling, and watching sports.

Leave a Comment

Filed under Security Not Included

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.