Skip to content

Instantly share code, notes, and snippets.

@mhsenpc
Created June 8, 2024 07:42
Show Gist options
  • Save mhsenpc/780940aaa5b36fcc857b45a3b37b7787 to your computer and use it in GitHub Desktop.
Save mhsenpc/780940aaa5b36fcc857b45a3b37b7787 to your computer and use it in GitHub Desktop.
#!/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