practice_1 · Web
Bakery Backstage
first move: view the page source
The Copper Kettle Bakery (fictional) just launched a website. Developers sometimes leave notes in the HTML that the page never shows. Find both halves of the flag: each is labeled Flag part 1 of 2 or Flag part 2 of 2, and the full flag ends with }.
Hint
Press Ctrl+U (or right-click, View Page Source) to see the raw HTML, comments included. The second half is written inside a file that well-behaved search engines skip: robots.txt gives you its path, and you open that path to read it.
Walkthrough (full spoilers)
- Open the bakery page and press
Ctrl+U(on a Mac:Cmd+Option+U). You can also pressF12and look in the Elements tab. On an Android phone, putview-source:in front of the page address in Chrome. - Find the HTML comment that starts with
<!--. It holds part 1 of the flag and points you torobots.txt. - Open
/practice/web/robots.txt. It lists oneDisallow:path: a file the bakery hoped nobody would read. - Open that path in your browser (the page address is
/practice/web/kitchen-notes.txt). The path itself isn't the flag: part 2 is the line labeledFlag part 2 of 2inside the file. Join the two parts with nothing in between, so the flag ends with}. - On real sites,
robots.txtlives at the root, for exampleexample.com/robots.txt. Checking it is a classic first move in Web challenges.
free tools: Chrome DevTools docs (opens in a new tab)