Skip to content

Instantly share code, notes, and snippets.

@thanhson1085
Created May 3, 2020 05:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thanhson1085/03edd90cac3b4bbfdbfb4dc3ba1df616 to your computer and use it in GitHub Desktop.
Save thanhson1085/03edd90cac3b4bbfdbfb4dc3ba1df616 to your computer and use it in GitHub Desktop.
#!/bin/bash
for i in {004..005}
do
A='{"type":"A","name":"'
B='","content":"xxxx","ttl":120,"priority":10,"proxied":true}'
DATA="${A}${i}${B}"
curl -X POST "https://api.cloudflare.com/client/v4/zones/xxx/dns_records" \
-H "X-Auth-Email: admin@tomochain.com" \
-H "X-Auth-Key: xxx" \
-H "Content-Type: application/json" \
--data $DATA
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment