32 lines
592 B
Bash
Executable file
32 lines
592 B
Bash
Executable file
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
declare -A ZONES
|
|
ZONES=(
|
|
['autkin.net']=1110808
|
|
['x.autkin.net']=1054887
|
|
['decent.im']=984397
|
|
)
|
|
|
|
#COOKIE=$1
|
|
COOKIE_JAR=$1
|
|
|
|
ZONE_NAME=$2
|
|
ZONE_ID=${ZONES[$ZONE_NAME]}
|
|
|
|
# --cookie "$COOKIE" \
|
|
# -H 'Pragma: no-cache' \
|
|
# -H 'Cache-Control: no-cache' \
|
|
curl \
|
|
-v \
|
|
--fail \
|
|
--trace zone.trace \
|
|
"https://dns.he.net/?hosted_dns_zoneid=$ZONE_ID&menu=edit_zone&hosted_dns_editzone" \
|
|
--cookie-jar "$COOKIE_JAR" \
|
|
\
|
|
| tee ./this.zone.html \
|
|
| htmlq --text '#raw_zone > div:nth-child(1) > pre:nth-child(3)' > ./this.zone
|
|
|
|
[[ -s ./this.zone ]]
|
|
|
|
cat ./this.zone
|