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
87f5ec5b
Commit
87f5ec5b
authored
Feb 04, 2017
by
David Kerr
Browse files
Add Accept-Language:en-US to HTTP header as precaution against future multi-lingual FreeDNS pages.
parent
f78b656f
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_freedns.sh
View file @
87f5ec5b
...
@@ -267,6 +267,7 @@ dns_freedns_rm() {
...
@@ -267,6 +267,7 @@ dns_freedns_rm() {
# print string "cookie=value" etc.
# print string "cookie=value" etc.
# returns 0 success
# returns 0 success
_freedns_login
()
{
_freedns_login
()
{
export
_H1
=
"Accept-Language:en-US"
username
=
"
$1
"
username
=
"
$1
"
password
=
"
$2
"
password
=
"
$2
"
url
=
"https://freedns.afraid.org/zc.php?step=2"
url
=
"https://freedns.afraid.org/zc.php?step=2"
...
@@ -298,6 +299,7 @@ _freedns_login() {
...
@@ -298,6 +299,7 @@ _freedns_login() {
# returns 0 success
# returns 0 success
_freedns_retrieve_subdomain_page
()
{
_freedns_retrieve_subdomain_page
()
{
export
_H1
=
"Cookie:
$1
"
export
_H1
=
"Cookie:
$1
"
export
_H2
=
"Accept-Language:en-US"
url
=
"https://freedns.afraid.org/subdomain/"
url
=
"https://freedns.afraid.org/subdomain/"
_debug
"Retrieve subdmoain page from FreeDNS"
_debug
"Retrieve subdmoain page from FreeDNS"
...
@@ -322,6 +324,7 @@ _freedns_retrieve_subdomain_page() {
...
@@ -322,6 +324,7 @@ _freedns_retrieve_subdomain_page() {
# returns 0 success
# returns 0 success
_freedns_add_txt_record
()
{
_freedns_add_txt_record
()
{
export
_H1
=
"Cookie:
$1
"
export
_H1
=
"Cookie:
$1
"
export
_H2
=
"Accept-Language:en-US"
domain_id
=
"
$2
"
domain_id
=
"
$2
"
subdomain
=
"
$3
"
subdomain
=
"
$3
"
value
=
"
$(
printf
'%s'
"
$4
"
| _url_encode
)
"
value
=
"
$(
printf
'%s'
"
$4
"
| _url_encode
)
"
...
@@ -352,6 +355,7 @@ _freedns_add_txt_record() {
...
@@ -352,6 +355,7 @@ _freedns_add_txt_record() {
# returns 0 success
# returns 0 success
_freedns_delete_txt_record
()
{
_freedns_delete_txt_record
()
{
export
_H1
=
"Cookie:
$1
"
export
_H1
=
"Cookie:
$1
"
export
_H2
=
"Accept-Language:en-US"
data_id
=
"
$2
"
data_id
=
"
$2
"
url
=
"https://freedns.afraid.org/subdomain/delete2.php"
url
=
"https://freedns.afraid.org/subdomain/delete2.php"
...
...
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