disable_ech.sh
· 589 B · Bash
Неформатований
#!/bin/bash
# Made by Dade Murphy (https://geeknest.ru)
# Related: https://habr.com/ru/articles/856602/
read -p "Enter Zone ID (can be found in domain overview): " ID_ZONE
read -p "Enter Global API Key (from Cloudflare profile): " GLOBAL_API_KEY
read -p "Enter Cloudflare account email: " ACCOUNT_EMAIL
echo "Sending request to Cloudflare API..."
curl -X PATCH "https://api.cloudflare.com/client/v4/zones/$ID_ZONE/settings/ech" \
-H "X-Auth-Email: $ACCOUNT_EMAIL" \
-H "X-Auth-Key: $GLOBAL_API_KEY" \
-H "Content-Type:application/json" --data '{"id":"ech","value":"off"}'
| 1 | #!/bin/bash |
| 2 | |
| 3 | # Made by Dade Murphy (https://geeknest.ru) |
| 4 | # Related: https://habr.com/ru/articles/856602/ |
| 5 | |
| 6 | read -p "Enter Zone ID (can be found in domain overview): " ID_ZONE |
| 7 | read -p "Enter Global API Key (from Cloudflare profile): " GLOBAL_API_KEY |
| 8 | read -p "Enter Cloudflare account email: " ACCOUNT_EMAIL |
| 9 | |
| 10 | echo "Sending request to Cloudflare API..." |
| 11 | curl -X PATCH "https://api.cloudflare.com/client/v4/zones/$ID_ZONE/settings/ech" \ |
| 12 | -H "X-Auth-Email: $ACCOUNT_EMAIL" \ |
| 13 | -H "X-Auth-Key: $GLOBAL_API_KEY" \ |
| 14 | -H "Content-Type:application/json" --data '{"id":"ech","value":"off"}' |