Skip to content
GitLab
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
35e1483e
Commit
35e1483e
authored
Mar 20, 2020
by
Alexandre
Browse files
Harmonize Request var names between DoH and DoT
parent
2a50125d
Changes
1
Hide whitespace changes
Inline
Side-by-side
homer.py
View file @
35e1483e
...
...
@@ -204,27 +204,27 @@ class RequestDoH(Request):
else
:
if
not
self
.
head
:
try
:
self
.
response
=
dns
.
message
.
from_wire
(
self
.
body
)
self
.
response
=
dns
.
message
.
from_wire
(
self
.
response
)
except
dns
.
message
.
TrailingJunk
:
# Not DNS. Should
# not happen for a content type
# application/dns-message but who knows?
self
.
response
=
"ERROR Not proper DNS data, trailing junk
\"
%s
\"
"
%
self
.
body
self
.
response
=
"ERROR Not proper DNS data, trailing junk
\"
%s
\"
"
%
self
.
response
ok
=
False
except
dns
.
name
.
BadLabelType
:
# Not DNS.
self
.
response
=
"ERROR Not proper DNS data (wrong path in the URL?)
\"
%s
\"
"
%
self
.
body
[:
100
]
self
.
response
=
"ERROR Not proper DNS data (wrong path in the URL?)
\"
%s
\"
"
%
self
.
response
[:
100
]
ok
=
False
else
:
if
self
.
body
_size
==
0
:
if
self
.
response
_size
==
0
:
self
.
response
=
"HEAD successful"
else
:
self
.
response
=
"ERROR Body length is not null
\"
%s
\"
"
%
self
.
body
[:
100
]
self
.
response
=
"ERROR Body length is not null
\"
%s
\"
"
%
self
.
response
[:
100
]
ok
=
False
else
:
ok
=
False
if
self
.
body
_size
==
0
:
if
self
.
response
_size
==
0
:
self
.
response
=
"[No details]"
else
:
self
.
response
=
self
.
body
self
.
response
=
self
.
response
return
ok
...
...
@@ -465,8 +465,8 @@ class ConnectionDoH(Connection):
body_size
=
len
(
body
)
http_code
=
self
.
curl
.
getinfo
(
pycurl
.
RESPONSE_CODE
)
content_type
=
self
.
curl
.
getinfo
(
pycurl
.
CONTENT_TYPE
)
request
.
body
=
body
request
.
body
_size
=
body_size
request
.
response
=
body
request
.
response
_size
=
body_size
request
.
rcode
=
http_code
request
.
ctype
=
content_type
self
.
buffer
.
close
()
...
...
@@ -483,7 +483,7 @@ class ConnectionDoH(Connection):
request
.
post
=
post
self
.
send_and_receive
(
request
)
request
.
check_response
()
return
(
request
.
rcode
,
request
.
response
,
request
.
body
_size
)
return
(
request
.
rcode
,
request
.
response
,
request
.
response
_size
)
def
get_next_domain
(
input_file
):
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment