mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-04-30 05:42:43 +00:00
Merge c5ae2eb28ab0fbdab6865698a5c309ed39c09ea4 into b0535d8b40a30f9fd2b26b3ea2a49469dcb4d0a8
This commit is contained in:
commit
2f4f652224
@ -128,7 +128,7 @@ _1984hosting_login() {
|
|||||||
|
|
||||||
_get "https://1984.hosting/accounts/login/" | grep "csrfmiddlewaretoken"
|
_get "https://1984.hosting/accounts/login/" | grep "csrfmiddlewaretoken"
|
||||||
csrftoken="$(grep -i '^set-cookie:' "$HTTP_HEADER" | _egrep_o 'csrftoken=[^;]*;' | tr -d ';')"
|
csrftoken="$(grep -i '^set-cookie:' "$HTTP_HEADER" | _egrep_o 'csrftoken=[^;]*;' | tr -d ';')"
|
||||||
sessionid="$(grep -i '^set-cookie:' "$HTTP_HEADER" | _egrep_o 'sessionid=[^;]*;' | tr -d ';')"
|
sessionid="$(grep -i '^set-cookie:' "$HTTP_HEADER" | _egrep_o 'cookie1984nammnamm=[^;]*;' | tr -d ';')"
|
||||||
|
|
||||||
if [ -z "$csrftoken" ] || [ -z "$sessionid" ]; then
|
if [ -z "$csrftoken" ] || [ -z "$sessionid" ]; then
|
||||||
_err "One or more cookies are empty: '$csrftoken', '$sessionid'."
|
_err "One or more cookies are empty: '$csrftoken', '$sessionid'."
|
||||||
@ -145,7 +145,7 @@ _1984hosting_login() {
|
|||||||
_debug2 response "$response"
|
_debug2 response "$response"
|
||||||
|
|
||||||
if _contains "$response" '"loggedin": true'; then
|
if _contains "$response" '"loggedin": true'; then
|
||||||
One984HOSTING_SESSIONID_COOKIE="$(grep -i '^set-cookie:' "$HTTP_HEADER" | _egrep_o 'sessionid=[^;]*;' | tr -d ';')"
|
One984HOSTING_SESSIONID_COOKIE="$(grep -i '^set-cookie:' "$HTTP_HEADER" | _egrep_o 'cookie1984nammnamm=[^;]*;' | tr -d ';')"
|
||||||
One984HOSTING_CSRFTOKEN_COOKIE="$(grep -i '^set-cookie:' "$HTTP_HEADER" | _egrep_o 'csrftoken=[^;]*;' | tr -d ';')"
|
One984HOSTING_CSRFTOKEN_COOKIE="$(grep -i '^set-cookie:' "$HTTP_HEADER" | _egrep_o 'csrftoken=[^;]*;' | tr -d ';')"
|
||||||
export One984HOSTING_SESSIONID_COOKIE
|
export One984HOSTING_SESSIONID_COOKIE
|
||||||
export One984HOSTING_CSRFTOKEN_COOKIE
|
export One984HOSTING_CSRFTOKEN_COOKIE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user