Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
8f3b7c17
Commit
8f3b7c17
authored
Sep 12, 2021
by
Christophe B Billheimer
Browse files
put cookies into a format that the 1984 Hosting website expects
parent
ea18c470
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_1984hosting.sh
View file @
8f3b7c17
...
@@ -229,8 +229,7 @@ _get_zone_id() {
...
@@ -229,8 +229,7 @@ _get_zone_id() {
# add extra headers to request
# add extra headers to request
_authget
()
{
_authget
()
{
export
_H1
=
"Cookie:
$One984HOSTING_SESSIONID_COOKIE
"
export
_H1
=
"Cookie:
$One984HOSTING_CSRFTOKEN_COOKIE
;
$One984HOSTING_SESSIONID_COOKIE
"
export
_H2
=
"Cookie:
$One984HOSTING_CSRFTOKEN_COOKIE
"
_response
=
$(
_get
"
$1
"
| _normalizeJson
)
_response
=
$(
_get
"
$1
"
| _normalizeJson
)
_debug2 _response
"
$_response
"
_debug2 _response
"
$_response
"
}
}
...
@@ -238,14 +237,12 @@ _authget() {
...
@@ -238,14 +237,12 @@ _authget() {
# truncate huge HTML response
# truncate huge HTML response
# echo: Argument list too long
# echo: Argument list too long
_htmlget
()
{
_htmlget
()
{
export
_H1
=
"Cookie:
$One984HOSTING_SESSIONID_COOKIE
"
export
_H1
=
"Cookie:
$One984HOSTING_CSRFTOKEN_COOKIE
;
$One984HOSTING_SESSIONID_COOKIE
"
export
_H2
=
"Cookie:
$One984HOSTING_CSRFTOKEN_COOKIE
"
_response
=
$(
_get
"
$1
"
|
grep
"
$2
"
| _head_n 1
)
_response
=
$(
_get
"
$1
"
|
grep
"
$2
"
| _head_n 1
)
}
}
# add extra headers to request
# add extra headers to request
_authpost
()
{
_authpost
()
{
export
_H1
=
"Cookie:
$One984HOSTING_SESSIONID_COOKIE
"
export
_H1
=
"Cookie:
$One984HOSTING_CSRFTOKEN_COOKIE
;
$One984HOSTING_SESSIONID_COOKIE
"
export
_H2
=
"Cookie:
$One984HOSTING_CSRFTOKEN_COOKIE
"
_response
=
$(
_post
"
$1
"
"
$2
"
)
_response
=
$(
_post
"
$1
"
"
$2
"
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment