Redpwn CTF

Base646464 [145 pts]

 Challenge Description

Challenge Description:

Take a look at the given generate.js:

const btoa = str => Buffer.from(str).toString('base64');

const fs = require("fs");
const flag = fs.readFileSync("flag.txt", "utf8").trim();

let ret = flag;
for(let i = 0; i < 25; i++) ret = btoa(ret);

fs.writeFileSync("cipher.txt", ret);

The script basically encodes the flag with base64 25 times. So to reverse that, cyberchef can be used:

Cyberchef recipe

The flag is: flag{l00ks_l1ke_a_l0t_of_64s}