# two-frames-one-champ

## Challenge

> Lake Champlain has always been a hotspot for mysterious sightings, but it seems like something recently odd came up. Apparently an old cryptid hunter went missing after attempting to reveal his findings. Rumors have been spreading that the cryptid hunter was once affiliated with the Consortium. But anything they left behind? An broken hard drive. Simon was able to recover the hard drive. Unfortunately, he was only able to recover two images files that are corrupted, likely tampered by the Consortium. Anna is tasking you to JOIN Simon piece this puzzle TOGETHER to uncover what the Consortium are hiding.

The two images:

{% file src="<https://1102212211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa46Jmz9dIuFnWcXn3ooO%2Fuploads%2FURSLYTMtidpvFM8zZdCk%2Fimage1.png?alt=media&token=af419519-a568-4145-9de7-1556f610c183>" %}

{% file src="<https://1102212211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa46Jmz9dIuFnWcXn3ooO%2Fuploads%2F3JJJgV81g2nNABG7aArc%2Fimage2.png?alt=media&token=dc59956c-b673-4f61-ac2f-f816a75867ee>" %}

## Solution

Looking at both files, they are impossible to open with an image viewer. And through the `file` command we see that they are considered just data.

<figure><img src="https://1102212211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa46Jmz9dIuFnWcXn3ooO%2Fuploads%2FLHyyzkqFo4mgyfZRt2k0%2Finchresting.PNG?alt=media&#x26;token=9f4e9e8b-47ef-4005-99a0-8e9e1268801e" alt=""><figcaption></figcaption></figure>

That leads me to think there's something wrong with the file itself and most likely, the Magic Number. So I check the hex.

<figure><img src="https://1102212211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa46Jmz9dIuFnWcXn3ooO%2Fuploads%2FCu9DZAPoosynUo6bym9z%2Fmagicnumber.PNG?alt=media&#x26;token=37e89b50-0c5a-4a84-a61c-e0ec5b30f01c" alt=""><figcaption></figcaption></figure>

As you can see, the first 8 digits do not match with the official `.png` format (which is `89 50 4e 47`).

So we need a hex editor to fix this. I used an online tool called [HexEd.it](https://hexed.it/) to change the first two digits.

<figure><img src="https://1102212211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa46Jmz9dIuFnWcXn3ooO%2Fuploads%2FtXdK7B1RAALWQNe6uEHU%2Fedited.PNG?alt=media&#x26;token=5d912ca4-3144-4426-a138-eb12d9e86899" alt=""><figcaption></figcaption></figure>

I export the file and now it's an actual png !

<figure><img src="https://1102212211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa46Jmz9dIuFnWcXn3ooO%2Fuploads%2FqB5fBgSc4qwo3ncssPDg%2Fimage1(1).png?alt=media&#x26;token=a97734b9-4a27-4f03-827d-53482b0ead0a" alt=""><figcaption></figcaption></figure>

Now we do the same thing for image2, with this result.

<figure><img src="https://1102212211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa46Jmz9dIuFnWcXn3ooO%2Fuploads%2FDqXAKZUNaqTse8uqbKbp%2Fimage2(1).png?alt=media&#x26;token=6c11b04b-1c58-4133-8cd0-1fe0a7707c72" alt=""><figcaption></figcaption></figure>

And now we can combine both images into one. I used Photoshop and dragged one image onto the other, and changing blending mode.

<figure><img src="https://1102212211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa46Jmz9dIuFnWcXn3ooO%2Fuploads%2F9pZRfNTDoZqPBr3nP4jW%2Fnessie.png?alt=media&#x26;token=d878b4da-1300-4702-904d-642df4c442c2" alt=""><figcaption></figcaption></figure>
