Challenge Author:
Difficulty: Easy
Description
I don’t like scrolling down to read the code of my website, so I’ve squished it. As a bonus, my pages load faster!
Process / Notes
- Go to the listed site
- It’s telling us we have the flag, but they just deliver them , they don’t know how to read them
<C-u>to see what’s going on- It’s all in one line. Is this the minification?
- Hard to read, so putting it into Neo Vim. With the html ending for syntax highlighting and such
- In Neo Vim, I could separate everything one at a time, or I could try to use a macro
- Ended up separating everything our manually, but really want to learn how to do that with a macro
- Found under the “If you’re reading this, your browser has successfully found the flag.”
- Figured I could just search
/{but that returned a lot of decoy flags in the page source. - Used regex expression to find a letter after the
{instead of a matching} /{[:alpha]brought me straight to the flag
11 minutes 43 seconds to complete
Hints
- Try CTLR+U in your browser to view the page source. You can also add ‘view-source:’ before the URL, or try curl
in your shell - Minification reduces the size of code, but does not change its functionality
- What tools do developers use when working on a website? Many text editors and browsers include formatting
Core Lessons
- Understand minification
- Understand how to search through mini-fied source code and find your target
- Understand how to un-minify source code if necessary