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
c9cab9ab
Unverified
Commit
c9cab9ab
authored
Jul 30, 2022
by
neil
Committed by
GitHub
Jul 30, 2022
Browse files
Merge pull request #4212 from msys0843/master
Update dns_mydnsjp.sh
parents
bd78120b
0de3bf0a
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_mydnsjp.sh
View file @
c9cab9ab
...
...
@@ -150,7 +150,7 @@ _get_root() {
_mydnsjp_retrieve_domain
()
{
_debug
"Login to MyDNS.JP"
response
=
"
$(
_post
"masterid=
$MYDNSJP_MasterID
&masterpwd=
$MYDNSJP_Password
"
"
$MYDNSJP_API
/
?MENU=100
"
)
"
response
=
"
$(
_post
"
MENU=100&
masterid=
$MYDNSJP_MasterID
&masterpwd=
$MYDNSJP_Password
"
"
$MYDNSJP_API
/
members/
"
)
"
cookie
=
"
$(
grep
-i
'^set-cookie:'
"
$HTTP_HEADER
"
| _head_n 1 |
cut
-d
" "
-f
2
)
"
# If cookies is not empty then logon successful
...
...
@@ -159,22 +159,8 @@ _mydnsjp_retrieve_domain() {
return
1
fi
_debug
"Retrieve DOMAIN INFO page"
export
_H1
=
"Cookie:
${
cookie
}
"
response
=
"
$(
_get
"
$MYDNSJP_API
/?MENU=300"
)
"
if
[
"
$?
"
!=
"0"
]
;
then
_err
"Fail to retrieve DOMAIN INFO."
return
1
fi
_root_domain
=
$(
echo
"
$response
"
|
grep
"DNSINFO
\[
domainname
\]
"
|
sed
's/^.*value="\([^"]*\)".*/\1/'
)
# Logout
response
=
"
$(
_get
"
$MYDNSJP_API
/?MENU=090"
)
"
_debug _root_domain
"
$_root_domain
"
if
[
-z
"
$_root_domain
"
]
;
then
...
...
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