Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
DNS testing tools
Remoh
Commits
f3c80073
Commit
f3c80073
authored
Dec 16, 2019
by
Stephane Bortzmeyer
Browse files
Tests the message ID. Closes #17
parent
639d2e15
Changes
1
Hide whitespace changes
Inline
Side-by-side
homer.py
View file @
f3c80073
...
...
@@ -303,11 +303,14 @@ def do_test(connection, qname, qtype=rtype):
if
connection
.
dot
:
messagew
=
message
.
to_wire
()
length
=
len
(
messagew
)
id
=
message
.
id
n
=
connection
.
session
.
send
(
length
.
to_bytes
(
2
,
byteorder
=
'big'
)
+
messagew
)
buf
=
connection
.
session
.
recv
(
2
)
received
=
int
.
from_bytes
(
buf
,
byteorder
=
'big'
)
buf
=
connection
.
session
.
recv
(
received
)
response
=
dns
.
message
.
from_wire
(
buf
)
response
=
dns
.
message
.
from_wire
(
buf
)
if
response
.
id
!=
message
.
id
:
raise
Exception
(
"The ID in the answer does not match the one in the query"
)
return
(
True
,
response
,
received
)
else
:
# DoH
message
.
id
=
0
# DoH requests that
...
...
Write
Preview
Supports
Markdown
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