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
884f70fb
Unverified
Commit
884f70fb
authored
Jan 31, 2017
by
Armando Lüscher
Browse files
Remove square brackets from ranges.
Export curl header variables.
parent
9499a114
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_cyon.sh
View file @
884f70fb
...
...
@@ -74,14 +74,14 @@ _cyon_load_credentials() {
}
_cyon_is_idn
()
{
_idn_temp
=
"
$(
printf
"%s"
"
${
1
}
"
|
tr
-d
"
[
0-9a-zA-Z.,-_
]
"
)
"
_idn_temp
=
"
$(
printf
"%s"
"
${
1
}
"
|
tr
-d
"0-9a-zA-Z.,-_"
)
"
_idn_temp2
=
"
$(
printf
"%s"
"
${
1
}
"
|
grep
-o
"xn--"
)
"
[
"
$_idn_temp
"
]
||
[
"
$_idn_temp2
"
]
}
_cyon_load_parameters
()
{
# Read the required parameters to add the TXT entry.
fulldomain
=
"
$(
printf
"%s"
"
${
1
}
"
|
tr
'[
A-Z
]'
'[
a-z
]'
)
"
fulldomain
=
"
$(
printf
"%s"
"
${
1
}
"
|
tr
"
A-Z
"
"
a-z
"
)
"
fulldomain_idn
=
"
${
fulldomain
}
"
# Special case for IDNs, as cyon needs a domain environment change,
...
...
@@ -105,6 +105,7 @@ _cyon_load_parameters() {
# This header is required for curl calls.
_H1
=
"X-Requested-With: XMLHttpRequest"
export
_H1
}
_cyon_print_header
()
{
...
...
@@ -155,6 +156,8 @@ _cyon_login() {
# NECESSARY!! Load the main page after login, to get the new cookie.
_H2
=
"
$(
_cyon_get_cookie_header
)
"
export
_H2
_get
"https://my.cyon.ch/"
>
/dev/null
# todo: instead of just checking if the env variable is defined, check if we actually need to do a 2FA auth request.
...
...
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