Cicadas.finance first puzzle write-up

The Trail

import requestsuri1='https://gateway.pinata.cloud/ipfs/QmRKZCMkdZigqutxR5vN7BmMigq9YTDu4NugYwtfcLQzJs/'
uri2='.png'
image_path = 'C:\\cicadas\\'# change the path where you want to savefor i in range(0,10000):
try:
with open(str(i)+uri2) as f:
continue
except:
print(i)
r = requests.get(uri1+str(i)+uri2)
while r.status_code != 200:
r = requests.get(uri1+str(i)+uri2)
with open(str(i)+uri2, 'wb') as f:
for chunk in r:
f.write(chunk)
One of the 52 images that featured a letter
— take the upper portion of the image, above where the cicada extends
- hash it
- obtain the background trait name from the jsons file
- check if all traits of the same type have the same hash
A XOR (+contrast increase) of the 2nd and 3rd image ids

The ape at the end of the tunnel

import json
import numpy as np
import cv2
json_path = 'C:\\cicadas\\json\\' # path to json files
image_path = 'C:\\cicadas\\images\\' # path to image files
image = np.zeros((4096,4096,3), np.uint8)for i in range (0,10000):
jsf = open(json_path+str(i)+".json",'r')
js = json.loads(jsf.readline())
for attr in js["attributes"]:
if (attr["trait_type"] == "Background"):
if (attr["value"] == "Black"):
print(i)
im = cv2.imread(image_path+str(i)+".png")
image = cv2.bitwise_xor(image, im)
cv2.imshow('res',image)
cv2.imwrite('xord_all.png',image)
Squint your eyes and look at the top left corner, it’s there

http://spc7g20jmm4rdpo287d665sm.finance/

Acknowledgements

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How GCC do it’s job

AWS CloudFormation Step by Step (Part 2)

Performance Test With Selenium

Dynamic real-world cameras in WebGL

Writing My First Chia Blockchain Program — Part 3 — Smart Coin

How to determine Executor Core, Memory and Size for a Spark app

Schedule Slack message from Google Sheet

More to golang than meets the eye

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
pogo

pogo

More from Medium

BASIC | Q4 Newsletter

Uploading Images with ActiveStorage for Rails

DaoDAO NFT wants to empower everyone by customizing specific NFT, using Yi, Daoism, Five-element…

Hunnys Golden Ticket Extravaganza