Unminify | picoCTF

 Hello guys! Today, I’m diving into a PicoCTF challenge called Unminify. Let’s see how we can crack this one and learn something cool along the way. Stay tuned!




Hints:

1. Try CTRL+U / ⌘+U in your browser to view the page source. 

   You can also add 'view-source:' before the URL, or try curl <URL> in your shell.

2. Minification reduces the size of code, but does not change its functionality.

3. What tools do developers use when working on a website? 

   Many text editors and browsers include formatting.


Challenge link: https://play.picoctf.org/practice/challenge/426

Manual Solution :

Browse to the web site and you will see a web page with the message "Welcome to my flag distribution website!".

On the page, right-click and select 'View page source' (or press CTRL + U) to get the HTML-source of the page.

Since all new lines have been removed the source code is compacted to one line only and is somewhat hard to read.

But we can also view the code via DevTools. Press F12 or Ctrl + Shift + I to activate the developer tools.

Then select the Sources tab and select the (index) page in the menu to the left.

We get the following source code which is much easier to read




                    If this view isn't shown as default, press the {}-button to pretty print the code.

                    On the 9th line from the bottom, we can see the flag                



                Curl Solution

                A nicer way to solve this challenge is to use curl to retrieve the web page and then search for                    the flag

                in regular expression format with grep

             


               this flag : picoCTF{pr3tty_c0d3_b99eb82e}


               For additional information, please see the references below.

References

Subscribe to receive free email updates:

0 Response to "Unminify | picoCTF"

Posting Komentar