Last active
October 10, 2024 16:51
-
-
Save the-pesar/1c43d581fd613d79493f25388a9c5df1 to your computer and use it in GitHub Desktop.
GOAT airdrop script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const headers = { | |
Authorization: "$token", // replace your token here | |
} | |
async function delay(ms) { | |
return new Promise((reslove) => setTimeout(() => reslove(true), ms)) | |
} | |
async function getMissions() { | |
const res = await fetch("https://api-mission.goatsbot.xyz/missions/user", { | |
headers, | |
}) | |
const data = await res.json() | |
return Object.values(data).flat(1) | |
} | |
async function completeAllOfMissions(missions) { | |
for (let i = 0; i < missions.length; i++) { | |
const res = await fetch( | |
`https://dev-api.goatsbot.xyz/missions/action/${missions[i]._id}`, | |
{ | |
method: "POST", | |
headers, | |
} | |
) | |
console.log(i, res.status) | |
await delay(500) | |
} | |
} | |
async function viewAdv() { | |
const res = await fetch( | |
"https://dev-api.goatsbot.xyz/missions/action/66db47e2ff88e4527783327e", | |
{ method: "POST", headers } | |
) | |
const data = await res.json() | |
console.log("adv -", data.status ?? data.message) | |
} | |
async function makeMoney() { | |
const missions = await getMissions() | |
await completeAllOfMissions(missions) | |
await viewAdv() | |
setInterval(viewAdv, 60000) | |
} | |
makeMoney() | |
console.log("excuted: started...") |
erfann33
commented
Oct 10, 2024
via email
شما؟
…On Thu, Oct 10, 2024, 7:46 PM mmdbara ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
import asyncio
import aiohttp
import json
headers = {
"Authorization": "$token" # replace your token here
}
async def delay(ms):
await asyncio.sleep(ms / 1000)
async def get_missions():
async with aiohttp.ClientSession() as session:
async with session.get("https://api-mission.goatsbot.xyz/missions/user",
headers=headers) as response:
data = await response.json()
return [item for sublist in data.values() for item in sublist]
async def complete_all_of_missions(missions):
async with aiohttp.ClientSession() as session:
for i, mission in enumerate(missions):
async with session.post(f"
https://dev-api.goatsbot.xyz/missions/action/{mission['_id']}",
headers=headers) as response:
print(i, response.status)
await delay(500)
async def view_adv():
async with aiohttp.ClientSession() as session:
async with session.post("
https://dev-api.goatsbot.xyz/missions/action/66db47e2ff88e4527783327e",
headers=headers) as response:
data = await response.json()
print("adv -", data.get("status") or data.get("message"))
async def make_money():
missions = await get_missions()
await complete_all_of_missions(missions)
await view_adv()
while True:
await asyncio.sleep(60)
await view_adv()
async def main():
print("executed: started...")
await make_money()
asyncio.run(main())
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/the-pesar/1c43d581fd613d79493f25388a9c5df1#gistcomment-5227984>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BLWSAIQ4YWS6KBPXLV7TWKDZ22R7JBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVEYTGMRWGU2DCMRVU52HE2LHM5SXFJTDOJSWC5DF>
.
You are receiving this email because you are subscribed to this thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment