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
dcf8457f
Commit
dcf8457f
authored
Dec 03, 2017
by
neilpang
Browse files
fix format
parent
534a5ad6
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_freedns.sh
View file @
dcf8457f
...
@@ -73,7 +73,7 @@ dns_freedns_add() {
...
@@ -73,7 +73,7 @@ dns_freedns_add() {
fi
fi
_debug2 htmlpage
"
$htmlpage
"
_debug2 htmlpage
"
$htmlpage
"
subdomain_csv
=
"
$(
echo
"
$htmlpage
"
|
tr
-d
"
\n\r
"
| _egrep_o
'<form .*</form>'
|
sed
's/<tr>/@<tr>/g'
|
tr
'@'
'\n'
|
grep
edit.php |
grep
$top_domain
)
"
subdomain_csv
=
"
$(
echo
"
$htmlpage
"
|
tr
-d
"
\n\r
"
| _egrep_o
'<form .*</form>'
|
sed
's/<tr>/@<tr>/g'
|
tr
'@'
'\n'
|
grep
edit.php |
grep
"
$top_domain
"
)
"
_debug2 subdomain_csv
"
$subdomain_csv
"
_debug2 subdomain_csv
"
$subdomain_csv
"
# The above beauty ends with striping out rows that do not have an
# The above beauty ends with striping out rows that do not have an
...
@@ -87,7 +87,7 @@ dns_freedns_add() {
...
@@ -87,7 +87,7 @@ dns_freedns_add() {
found
=
0
found
=
0
while
[
"
$i
"
-lt
"
$lines
"
]
;
do
while
[
"
$i
"
-lt
"
$lines
"
]
;
do
i
=
"
$(
_math
"
$i
"
+ 1
)
"
i
=
"
$(
_math
"
$i
"
+ 1
)
"
line
=
"
$(
echo
"
$subdomain_csv
"
|
sed
-n
${
i
}
p
)
"
line
=
"
$(
echo
"
$subdomain_csv
"
|
sed
-n
"
${
i
}
p
"
)
"
_debug2 line
"
$line
"
_debug2 line
"
$line
"
if
[
$found
=
0
]
&&
_contains
"
$line
"
"<td>
$top_domain
</td>"
;
then
if
[
$found
=
0
]
&&
_contains
"
$line
"
"<td>
$top_domain
</td>"
;
then
# this line will contain DNSdomainid for the top_domain
# this line will contain DNSdomainid for the top_domain
...
@@ -204,7 +204,7 @@ dns_freedns_rm() {
...
@@ -204,7 +204,7 @@ dns_freedns_rm() {
return
1
return
1
fi
fi
subdomain_csv
=
"
$(
echo
"
$htmlpage
"
|
tr
-d
"
\n\r
"
| _egrep_o
'<form .*</form>'
|
sed
's/<tr>/@<tr>/g'
|
tr
'@'
'\n'
|
grep
edit.php |
grep
$fulldomain
)
"
subdomain_csv
=
"
$(
echo
"
$htmlpage
"
|
tr
-d
"
\n\r
"
| _egrep_o
'<form .*</form>'
|
sed
's/<tr>/@<tr>/g'
|
tr
'@'
'\n'
|
grep
edit.php |
grep
"
$fulldomain
"
)
"
_debug2 subdomain_csv
"
$subdomain_csv
"
_debug2 subdomain_csv
"
$subdomain_csv
"
# The above beauty ends with striping out rows that do not have an
# The above beauty ends with striping out rows that do not have an
...
@@ -218,7 +218,7 @@ dns_freedns_rm() {
...
@@ -218,7 +218,7 @@ dns_freedns_rm() {
found
=
0
found
=
0
while
[
"
$i
"
-lt
"
$lines
"
]
;
do
while
[
"
$i
"
-lt
"
$lines
"
]
;
do
i
=
"
$(
_math
"
$i
"
+ 1
)
"
i
=
"
$(
_math
"
$i
"
+ 1
)
"
line
=
"
$(
echo
"
$subdomain_csv
"
|
sed
-n
${
i
}
p
)
"
line
=
"
$(
echo
"
$subdomain_csv
"
|
sed
-n
"
${
i
}
p
"
)
"
_debug2 line
"
$line
"
_debug2 line
"
$line
"
DNSname
=
"
$(
echo
"
$line
"
| _egrep_o
'edit.php.*</a>'
|
cut
-d
'>'
-f
2 |
cut
-d
'<'
-f
1
)
"
DNSname
=
"
$(
echo
"
$line
"
| _egrep_o
'edit.php.*</a>'
|
cut
-d
'>'
-f
2 |
cut
-d
'<'
-f
1
)
"
_debug2 DNSname
"
$DNSname
"
_debug2 DNSname
"
$DNSname
"
...
...
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