Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
3ae3d9e4
Commit
3ae3d9e4
authored
4 years ago
by
Deucе
Browse files
Options
Downloads
Patches
Plain Diff
Fix TXT record parsing.
parent
a0b12151
No related branches found
No related tags found
1 merge request
!118
Implement support for callback style programming
Pipeline
#1739
passed
4 years ago
Stage: build
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
exec/load/dns.js
+9
-2
9 additions, 2 deletions
exec/load/dns.js
with
9 additions
and
2 deletions
exec/load/dns.js
+
9
−
2
View file @
3ae3d9e4
...
@@ -48,7 +48,7 @@ function DNS(servers) {
...
@@ -48,7 +48,7 @@ function DNS(servers) {
function
get_string
(
resp
,
offset
)
{
function
get_string
(
resp
,
offset
)
{
var
len
=
ascii
(
resp
[
offset
]);
var
len
=
ascii
(
resp
[
offset
]);
return
{
'
len
'
:
len
+
1
,
'
string
'
:
resp
.
substr
(
1
,
len
)};
return
{
'
len
'
:
len
+
1
,
'
string
'
:
resp
.
substr
(
offset
+
1
,
len
)};
}
}
function
get_name
(
resp
,
offset
)
{
function
get_name
(
resp
,
offset
)
{
...
@@ -145,7 +145,14 @@ function DNS(servers) {
...
@@ -145,7 +145,14 @@ function DNS(servers) {
tmp
.
exchange
=
get_name
(
resp
,
offset
+
2
).
name
;
tmp
.
exchange
=
get_name
(
resp
,
offset
+
2
).
name
;
return
tmp
;
return
tmp
;
case
16
:
// TXT
case
16
:
// TXT
return
get_string
(
resp
,
offset
).
string
;
tmp
=
[];
tmp2
=
0
;
do
{
tmp3
=
get_string
(
resp
,
offset
+
tmp2
);
tmp
.
push
(
tmp3
.
string
);
tmp2
+=
tmp3
.
len
;
}
while
(
tmp2
<
len
);
return
tmp
;
case
28
:
case
28
:
return
format
(
"
%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x
"
,
return
format
(
"
%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x
"
,
ascii
(
resp
[
offset
+
0
]),
ascii
(
resp
[
offset
+
1
]),
ascii
(
resp
[
offset
+
0
]),
ascii
(
resp
[
offset
+
1
]),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment