-
Notifications
You must be signed in to change notification settings - Fork 20
dnscommon.r2py cannot parse replies containing NS, PTR types of queries #167
Copy link
Copy link
Open
Description
- dnscommon.r2py replies with KeyError when query is of type NS
for e.g. present code returns this:
User traceback:
"dylink.r2py", line 546, in <module>
"dylink.r2py", line 407, in dylink_dispatch
"dylink.r2py", line 520, in evaluate
"librepy.r2py", line 153, in <module>
"dylink.r2py", line 446, in _dylink_dispatch
"dylink.r2py", line 407, in dylink_dispatch
"dylink.r2py", line 520, in evaluate
"ut_dnsquery_namingserver.r2py", line 11, in <module>
"ut_dnsquery_namingserver.r2py", line 8, in test_namingServer
"dnsquery.r2py", line 222, in namingServer
"dnsquery.r2py", line 140, in dns_connection
"dnscommon.r2py", line 406, in convert_packet_to_dictionary
"dnscommon.r2py", line 459, in _read_answer_section
"dnscommon.r2py", line 504, in _read_single_answer
Exception (with type 'exceptions.KeyError'): 49164
- Wrong output when query is of type PTR because of https://github.com/SeattleTestbed/seattlelib_v2/blob/master/dnscommon.r2py#L569 function and limit ot IPv4 addresses only,. Basically, dnscommon is not able to create dictionary from reply packet received from DNS.
Testing module: dnsquery
Running: ut_dnsquery_reverselookup.r2py [ FAIL ]
--------------------------------------------------------------------------------
Standard out :
..............................Produced..............................
('173.252.120.6', {'address': '21.101.100.103'})
rather output should be domain name for the respective IP address
We need to create a patch for the same in https://github.com/SeattleTestbed/seattlelib_v2/blob/master/dnscommon.r2py#L464 in _read_single_answer function.
-> https://github.com/SeattleTestbed/seattlelib_v2/blob/master/dnscommon.r2py#L522 should be edited and code should be added for different types like already done for type 'SOA'.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels