Bandit 1 → 2
Goal: read the password from a file whose entire name is a single dash.
Approach
Section titled “Approach”bandit1@bandit:~$ ls-bandit1@bandit:~$ cat ./-The password you are looking for is: <password>Password
263JGJPfgU6LtdEvgfWU1XP5yac29mFxWhy it works
Section titled “Why it works”cat reads its filename as an argument, and any token starting with a dash is parsed as an option before it is ever treated as a path. Prefixing the file as ./- (or feeding it through stdin) forces it to be read as a file, not a flag.