updated dnscommon for NS, PTR, MX records and enhancement for 'AAAA' and 'TXT' records#166
Open
pranavnyu wants to merge 11 commits intoSeattleTestbed:masterfrom
Open
updated dnscommon for NS, PTR, MX records and enhancement for 'AAAA' and 'TXT' records#166pranavnyu wants to merge 11 commits intoSeattleTestbed:masterfrom
pranavnyu wants to merge 11 commits intoSeattleTestbed:masterfrom
Conversation
Author
|
updated dnsquery.r2py and librepy.r2py for DNS measurements. |
Contributor
There was a problem hiding this comment.
Please combine all the answer types that are treated the same way under a single elif branch.
Author
There was a problem hiding this comment.
We should not combine all because when you query for MX or reverse or AAAA etc then you have additional section containing extra data. We don't need that but if we don't separate then packet dictionary will contain mixed details. So by separating, packet dictionary will contain all information with their respective query types.
for eg.
;; QUESTION SECTION:
;google.com. IN MX
;; ANSWER SECTION:
google.com. 600 IN MX 20 alt1.aspmx.l.google.com.
google.com. 600 IN MX 30 alt2.aspmx.l.google.com.
google.com. 600 IN MX 40 alt3.aspmx.l.google.com.
google.com. 600 IN MX 10 aspmx.l.google.com.
google.com. 600 IN MX 50 alt4.aspmx.l.google.com.
;; ADDITIONAL SECTION:
alt1.aspmx.l.google.com. 156 IN A 64.233.186.27
or
;google.com. IN NS
;; ANSWER SECTION:
google.com. 14400 IN NS ns4.google.com.
google.com. 14400 IN NS ns1.google.com.
google.com. 14400 IN NS ns2.google.com.
google.com. 14400 IN NS ns3.google.com.
;; ADDITIONAL SECTION:
ns1.google.com. 13328 IN A 216.239.32.10
ns2.google.com. 13956 IN A 216.239.34.10
ns3.google.com. 2225 IN A 216.239.36.10
ns4.google.com. 2315 IN A 216.239.38.10
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
patch for issue #167 , added code for NS and PTR type of queries separately.
_parse_answer_address was limited to converting answer into address but NS should provide naming servers for NS type of queries and domain name for PTR types.
After this code we have following results for NS and PTR types:
matches with - dig -x '173.252.120.6' (for facebook IP)
matches with - -dig google.com NS (for google's NS)
matches with - dig google.com MX
matches with - dig @8.8.8.8 google.com TXT
matches with - dig facebook.com AAAA