Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
81ba629b
Unverified
Commit
81ba629b
authored
Feb 20, 2019
by
diseq
Committed by
GitHub
Feb 20, 2019
Browse files
allow set-cookie as well as Set-Cookie
parent
0bb746ba
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_one.sh
View file @
81ba629b
...
@@ -41,13 +41,12 @@ dns_one_add() {
...
@@ -41,13 +41,12 @@ dns_one_add() {
postdata
=
"
$postdata
&targetDomain=
$mydomain
"
postdata
=
"
$postdata
&targetDomain=
$mydomain
"
postdata
=
"
$postdata
&password1=
$ONECOM_PASSWORD
"
postdata
=
"
$postdata
&password1=
$ONECOM_PASSWORD
"
postdata
=
"
$postdata
&loginTarget="
postdata
=
"
$postdata
&loginTarget="
#_debug postdata "$postdata"
#_debug postdata "$postdata"
response
=
"
$(
_post
"
$postdata
"
"https://www.one.com/admin/login.do"
""
"POST"
)
"
response
=
"
$(
_post
"
$postdata
"
"https://www.one.com/admin/login.do"
""
"POST"
"application/x-www-form-urlencoded"
)
"
#_debug response "$response"
#_debug response "$response"
JSESSIONID
=
"
$(
grep
"JSESSIONID
=
"
"
$HTTP_HEADER
"
|
grep
"^
Set-C
ookie:"
| _tail_n 1 | _egrep_o
'JSESSIONID=[^;]*;'
|
tr
-d
';'
)
"
JSESSIONID
=
"
$(
grep
"JSESSIONID"
"
$HTTP_HEADER
"
|
grep
"^
[Ss]et-[Cc]
ookie:"
| _tail_n 1 | _egrep_o
'JSESSIONID=[^;]*;'
|
tr
-d
';'
)
"
_debug jsessionid
"
$JSESSIONID
"
_debug jsessionid
"
$JSESSIONID
"
export
_H1
=
"Cookie:
${
JSESSIONID
}
"
export
_H1
=
"Cookie:
${
JSESSIONID
}
"
...
@@ -106,9 +105,10 @@ dns_one_rm() {
...
@@ -106,9 +105,10 @@ dns_one_rm() {
postdata
=
"
$postdata
&password1=
$ONECOM_PASSWORD
"
postdata
=
"
$postdata
&password1=
$ONECOM_PASSWORD
"
postdata
=
"
$postdata
&loginTarget="
postdata
=
"
$postdata
&loginTarget="
response
=
"
$(
_post
"
$postdata
"
"https://www.one.com/admin/login.do"
""
"POST"
)
"
response
=
"
$(
_post
"
$postdata
"
"https://www.one.com/admin/login.do"
""
"POST"
"application/x-www-form-urlencoded"
)
"
#_debug response "$response"
JSESSIONID
=
"
$(
grep
"JSESSIONID
=
"
"
$HTTP_HEADER
"
|
grep
"^
Set-C
ookie:"
| _tail_n 1 | _egrep_o
'JSESSIONID=[^;]*;'
|
tr
-d
';'
)
"
JSESSIONID
=
"
$(
grep
"JSESSIONID"
"
$HTTP_HEADER
"
|
grep
"^
[Ss]et-[Cc]
ookie:"
| _tail_n 1 | _egrep_o
'JSESSIONID=[^;]*;'
|
tr
-d
';'
)
"
_debug jsessionid
"
$JSESSIONID
"
_debug jsessionid
"
$JSESSIONID
"
export
_H1
=
"Cookie:
${
JSESSIONID
}
"
export
_H1
=
"Cookie:
${
JSESSIONID
}
"
...
...
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