Browse Source

get subdomain page with acme.sh _get() rather than using curl

pull/557/head
David Kerr 8 years ago
parent
commit
abe287528e
  1. 11
      dnsapi/dns_freedns.sh

11
dnsapi/dns_freedns.sh

@ -277,15 +277,12 @@ _freedns_login() {
# echo page retrieved (html) # echo page retrieved (html)
# returns 0 success # returns 0 success
_freedns_retrieve_subdomain_page() { _freedns_retrieve_subdomain_page() {
cookies=$1
_H1="Cookie: $1"
url="https://freedns.afraid.org/subdomain/" url="https://freedns.afraid.org/subdomain/"
_debug "Retrieve subdmoain page from FreeDNS" _debug "Retrieve subdmoain page from FreeDNS"
#TODO Not using acme.sh _get() function becuase I need to pass in the cookies.
htmlpage="$(curl --silent \
--user-agent "$USER_AGENT" \
--cookie "$cookies" \
$url )"
htmlpage="$(_get "$url")"
if [ $? != 0 ]; then if [ $? != 0 ]; then
_err "FreeDNS retrieve subdomins failed bad RC from cURL: $?" _err "FreeDNS retrieve subdomins failed bad RC from cURL: $?"
@ -299,7 +296,7 @@ _freedns_retrieve_subdomain_page() {
_debug2 "$htmlpage" _debug2 "$htmlpage"
echo "$htmlpage"
printf "%s" "$htmlpage"
return 0 return 0
} }

Loading…
Cancel
Save