Created
June 8, 2024 07:42
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
#!/bin/bash | |
# URL | |
url="http://api.hamsterkombat.io/clicker/tap" | |
# Header | |
auth_token="1717800404694ETA7Ad7uD6O1zNDxDEbaDyHdsferwrlIIVzx0b3232s1jBmOvH0zgnC43CzVat0115139439" | |
header="Authorization: Bearer $auth_token" | |
# Loop to send POST request once per second | |
while true; do | |
echo "do a tap"; | |
echo "" | |
# Generate the current timestamp | |
timestamp=$(date +%s) | |
# Payload with the real timestamp | |
payload="{\"count\":8,\"availableTaps\":200,\"timestamp\":$timestamp}" | |
# Send POST request | |
curl -X POST "$url" -H "Content-Type: application/json" -H "$header" -d "$payload" | |
# Wait for 1 second | |
sleep 1 | |
echo "" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment