Convert outfile files from json to zonefile.
Scrape latest DNS records / scheduled (push) Successful in 8s
Scrape latest DNS records / scheduled (push) Successful in 8s
This commit is contained in:
@@ -17,6 +17,6 @@ curl -s "${CLOUDFLARE_API}/zones" "${HEADERS[@]}" | \
|
||||
jq -r '.result.name')
|
||||
|
||||
echo "Fetching DNS records for: ${zone_name}"
|
||||
curl -s "${CLOUDFLARE_API}/zones/${zone_id}/dns_records" "${HEADERS[@]}" | \
|
||||
jq . > "out/${zone_name}.json"
|
||||
curl -s "${CLOUDFLARE_API}/zones/${zone_id}/dns_records/export" "${HEADERS[@]}" \
|
||||
> "out/${zone_name}.txt" && sed -i '/^;; Exported:/d' "out/${zone_name}.txt"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user