> For the complete documentation index, see [llms.txt](https://thamizhiniyancs.gitbook.io/writeups/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://thamizhiniyancs.gitbook.io/writeups/ctf/2024/pico-ctf/web-exploitation/bookmarklet.md).

# Bookmarklet

## Challenge Description

Why search for the flag when I can make a bookmarklet to print it for me?

Browse [here](http://titan.picoctf.net:51073/), and find the flag!

***

## Solution

On the given website, you can see a text box with some javascript code snippet.

<figure><img src="https://2035863894-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjvlUrxK6i7ZNmn3d6e8B%2Fuploads%2FfGOA7P9fAZNeZS1WJcXp%2Fimage.png?alt=media&amp;token=33018328-6ac9-4c7a-9526-86e2fcb0f0ad" alt=""><figcaption></figcaption></figure>

I copied the above code and put it in a online javascript compiler and changed the alert call to console.log to print the output and ran the program to get the flag. Basically the program decrypts the encrypted flag.

<figure><img src="https://2035863894-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjvlUrxK6i7ZNmn3d6e8B%2Fuploads%2FkJxQMxiudP4gLiu2XNQM%2Fimage.png?alt=media&amp;token=8a208d1f-48ca-47aa-90eb-e8f296819598" alt=""><figcaption></figcaption></figure>

Flag: `picoCTF{p@g3_turn3r_0c0d211f}`
