---
# System prepended metadata

title: Crypto/base646464 (160)

---

# Crypto/base646464 (160)
Two download files `generate.js` and `cipher.txt`.
`cipher` seems to contain base64 encoded content.

`generate.js`
``` 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);
```

Too lazy to actually script it
``` sh
i=$(cat /tmp/cipher.txt)
# Repeat the line below until you get the flag (25 times)
i=$(echo $i | base64 -d); echo $i
```

`flag{l00ks_l1ke_a_l0t_of_64s}`