# IPromise - Run the decryptIPromise() => got the flag in ecrypted. # Taylor Swift ![image](https://hackmd.io/_uploads/SkMIJtgV0.png) - We have key, enc, and xor encrypt => A ^ B = C => A = B ^ C ``` from base64 import b64decode as d from pwn import xor enc = "FRsIAQ8PVBUVEREIVERbBkURFkUIBxVQVkAYFxJfV0FYVkIVQgo=" key = "swifties!" print(xor(d(enc), key.encode())) ``` # What's in the box ![image](https://hackmd.io/_uploads/SJULUjxV0.png) - You recognize the script was generated using Makeself. - Makeself is a self-extracting archive file, meaning that you have to create a folder to contain all extracted file from it. ![image](https://hackmd.io/_uploads/ry_d92gVC.png) - Open file test: ![image](https://hackmd.io/_uploads/SyipBigEA.png) - Open file python, you will see. ![image](https://hackmd.io/_uploads/ryAg8olVC.png) - Overwrite in vsc, then get the flag. ![image](https://hackmd.io/_uploads/Byaqrix4C.png) # A Locked Box - We got a shell script for this challenge generated by Makeself again. ![image](https://hackmd.io/_uploads/ry9gz-RE0.png) - We see the expected error, not correct hash, but we have the correct value of the hash so let’s change it. - we see the 2 corrupted bytes, lets fix them with the correct hex values `0x66 for “f” | 0x37 for “7”` - I have changed it on visual code but got corrupted, so i fixed them on HxD. ![image](https://hackmd.io/_uploads/rkUof-REA.png) - This is your flag: ![image](https://hackmd.io/_uploads/Bkb2fZ04A.png)