Skip to content

Instantly share code, notes, and snippets.

@codeniko
Created December 20, 2023 20:27
Show Gist options
  • Save codeniko/1dee2fde139b22dabf58364966c75668 to your computer and use it in GitHub Desktop.
Save codeniko/1dee2fde139b22dabf58364966c75668 to your computer and use it in GitHub Desktop.
#!/usr/bin/bash
MAM_ID_FILE=~/mam_id.txt
TIMESTAMP=$(date +%s)000
# URL="https://www.myanonamouse.net/json/bonusBuy.php/?spendtype=upload&amount=1&_=${TIMESTAMP}"
URL="https://www.myanonamouse.net/json/bonusBuy.php/?spendtype=upload&amount=Max%20Affordable%20&_=${TIMESTAMP}"
mamId=`cat ${MAM_ID_FILE}`
echo "$URL"
curl -i "${URL}" \
-H 'authority: www.myanonamouse.net' \
-H 'accept: application/json, text/javascript, */*; q=0.01' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'cache-control: no-cache' \
-H "cookie: uid=213683; mam_id=${mamId}" \
-H 'pragma: no-cache' \
-H 'referer: https://www.myanonamouse.net/store.php' \
-H 'sec-ch-ua: "Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: same-origin' \
-H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' \
--compressed | grep 'mam_id=' | cut -d ' ' -f 2 | sed 's/.$//' | cut -d '=' -f 2 > $MAM_ID_FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment