Skip to content

Instantly share code, notes, and snippets.

@the-pesar
Last active October 4, 2024 14:26
Show Gist options
  • Save the-pesar/66e855c9b1136786a87e178db1227df4 to your computer and use it in GitHub Desktop.
Save the-pesar/66e855c9b1136786a87e178db1227df4 to your computer and use it in GitHub Desktop.
Cats airdrop script
const headers = {
authorization: "$token",
}
async function delay(ms) {
return new Promise((reslove) => setTimeout(() => reslove(true), ms))
}
async function makeMoney() {
for (let i = 1; i <= 500; i++) {
fetch(
`https://api.catshouse.club/tasks/${i}/complete`,
{
method: "POST",
headers,
}
)
.then(async (res) => {
const data = await res.json()
console.log(`${i}: ${res.status} ${Object.values(data)}`)
})
.catch((err) => {
console.log(err)
})
await delay(250)
}
}
makeMoney()
@Amirjavadzadee
Copy link

Amirjavadzadee commented Sep 13, 2024

Python

import requests
import time

headers = {
    'Authorization': '$token',
}

def delay(ms):
    time.sleep(ms / 1000)

def make_money():
    for i in range(1, 501):
        try:
            response = requests.post(
                f'https://cats-backend-cxblew-prod.up.railway.app/tasks/{i}/complete',
                headers=headers
            )
            data = response.json()
            print(f"{i}: {response.status_code} {list(data.values())}")
        except Exception as e:
            print(f"Error at task {i}: {e}")
        
        delay(250)

if __name__ == "__main__":
    make_money()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment