Skip to content

Instantly share code, notes, and snippets.

@the-pesar
Last active October 7, 2024 11:34
Show Gist options
  • Save the-pesar/aa7916c1057caac7a95d5fa4f35a543e to your computer and use it in GitHub Desktop.
Save the-pesar/aa7916c1057caac7a95d5fa4f35a543e to your computer and use it in GitHub Desktop.
DUCKS script airdrop
const token = "$token" // replace your token here
const headers = {
"Content-Type": "application/json",
Authorization: token,
}
async function delay(ms) {
return new Promise((reslove) => setTimeout(() => reslove(true), ms))
}
async function makeMoney() {
console.log("Started, please wait...")
for (let i = 1; i <= 1000; i++) {
fetch("https://api.apiduck.xyz/user-partner-mission/claim", {
method: "POST",
headers,
body: JSON.stringify({
partner_mission_id: i,
}),
})
.then(async (res) => {
const data = await res.json()
console.log(`Cecked ${i}: ${res.status} ${data.error_code}`)
})
.catch((err) => {
console.log(err)
})
await delay(250)
}
console.log("End.")
}
makeMoney()
import http.client
import json
import time
import threading
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer $token", # replace your token here $token
}
def delay(ms: int):
time.sleep(ms / 1000)
def make_request(i):
try:
conn = http.client.HTTPSConnection("api.apiduck.xyz")
payload = json.dumps({"partner_mission_id": i})
conn.request("POST", "/user-partner-mission/claim", body=payload, headers=headers)
res = conn.getresponse()
data = res.read().decode("utf-8")
json_data = json.loads(data)
print(f"{i}: {res.status} {json_data.get('error_code', 'No error code')}")
conn.close()
except Exception as e:
print(f"Error at mission {i}: {e}")
def make_money():
threads = []
for i in range(1, 704):
thread = threading.Thread(target=make_request, args=(i,))
threads.append(thread)
thread.start()
delay(1000)
for thread in threads:
thread.join()
make_money()
@mahdimamara
Copy link

تو بعضی از اسکریپت هاتون مثل همین مورد، ارور
Unexpected token ':'
میده

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