我们直接开始,先从前端找到API,可以看到publicSale相关的这两个,通过阅读js代码我们知道要先获取问题,然后再输入答案即可得到salt和signature。
#获取随机问题的Post请求,参数为自己的地址
def posttest():
proxie = {"http": "http://127.0.0.1:24213", "https": "https://127.0.0.1:24213"}
header = {
"Content-Type": "application/json",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36",
}
data = {
"address":"your address",
#"anwser":"able"
}
url = "https://weirdoghost.com/ghostApi/publicSale/getRandom"
res = requests.post(url=url, headers=header, proxies=proxie, verify=False)
去这个链接获得自己问题的图片,得到答案。(在Mint前接口是没有更新的,如果提前更新那你就可以提前准备好,如果到Mint时在更新那你就要像下图一样做图片识别来最快获得答案)
以答案为able为例则再构建一个post请求获得salt和signature
def posttest():
proxie = {"http": "http://127.0.0.1:24213", "https": "https://127.0.0.1:24213"}
header = {
"Content-Type": "application/json",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36",
}
data = {
"address":"your address",
"anwser":"able"
}
url = "https://weirdoghost.com/ghostApi/publicSale/"
res = requests.post(url=url, headers=header, proxies=proxie, verify=False)
得到我们需要的数据
最后去合约填写就好啦或者写个mint函数就好啦
如果你看到这里,那么恭喜你看了一篇完全没用上的文章,最后还是要拼网,能加载出来图片的随便Mint,加载不出来的怎么折腾也没用
本文来自抽奖学习社区DFarm Club