# [EN] Trending Cats ###### tags: `Writeup` `Web` `English` > [name=FlyDragon] ## Step.1 When opening the image in a new tab, you can see that each cat has a four-digit number. ![](https://hackmd.io/_uploads/SyVSiy2P3.png) ## Step.2 It is known that there is no cat with the number 1. Taking advantage of this fact, we can write a program to search for the cats. ```py= import requests NotFound = requests.get(f"http://lotuxctf.com:20003/1.jpg").text found = [] for i in range(6000, 7000): print(i) response = requests.get(f"http://lotuxctf.com:20003/{i}.jpg").text if(response != NotFound): print(f"found at {i}") found.append(i) print(found) ``` We can find the cat with the number 6166, called "spin cat." ![](https://hackmd.io/_uploads/BJ_t6JnP2.png) ## Step.3 Based on the naming pattern on other pages, we can infer that there might be a "spin.php" file. ![](https://hackmd.io/_uploads/r1jGA12vn.png) ## Step.4 Clicking the button reveals that it sends the parameter `cat=aGFwcHk%3D`. Base64 decoding `aGFwcHk%3D` results in "happy". Base64 encoding "spin" results in `c3Bpbg==`. Therefore, the URL becomes `spin.php?cat=c3Bpbg==`. We obtain the flag: ![](https://hackmd.io/_uploads/Sy3PklhD3.png) {%hackmd M1bgOPoiQbmM0JRHWaYA1g %}