We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 927369b commit cebe558Copy full SHA for cebe558
dnsapi/dns_1984hosting.sh
@@ -140,6 +140,12 @@ _1984hosting_login() {
140
password=$(printf '%s' "$One984HOSTING_Password" | _url_encode)
141
url="https://management.1984hosting.com/accounts/checkuserauth/"
142
143
+ csrf_html=$(_get "https://1984.hosting/accounts/login/" | grep 'csrfmiddlewaretoken')
144
+ csrf_token=$(echo "$csrf_html" | _egrep_o 'value=".*"' | sed 's/value=//' | sed 's/"//g' | _head_n 1)
145
+ _debug2 "csrf_token: $csrf_token"
146
+ export _H1="Cookie: csrftoken=$csrf_token"
147
+ export _H2="X-CSRFToken: $csrf_token"
148
+
149
response="$(_post "username=$username&password=$password&otpkey=" $url)"
150
response="$(echo "$response" | _normalizeJson)"
151
_debug2 response "$response"
0 commit comments