Closed mutax closed 4 years ago
I am trying to do reverse lookups and during checking out how this might work I found async_dns making thousands of queries with this code:
import asyncio from async_dns import types from async_dns.resolver import ProxyResolver loop = asyncio.get_event_loop() resolver = ProxyResolver(proxies=['127.0.0.1',]) print(loop.run_until_complete(resolver.query('9.9.9.9.', types.PTR)))
executing yields:
# LOGLEVEL=DEBUG python3 testptr.py 2>&1 | grep -c 'get_remote' 12155
wireshark shows for the query:
Domain Name System (query) Transaction ID: 0x0001 Flags: 0x0100 Standard query Questions: 1 Answer RRs: 0 Authority RRs: 0 Additional RRs: 0 Queries 9.9.9.9: type Unused, class Unknown Name: 9.9.9.9 [Name Length: 7] [Label Count: 4] Type: Unused (0) Class: Unknown (0x0c00) [Response In: 6]
and for the answer:
Domain Name System (response) Transaction ID: 0x0001 Flags: 0x8105 Standard query response, Refused Questions: 1 Answer RRs: 0 Authority RRs: 0 Additional RRs: 0 Queries 9.9.9.9: type Unused, class Unknown Name: 9.9.9.9 [Name Length: 7] [Label Count: 4] Type: Unused (0) Class: Unknown (0x0c00) [Request In: 5] [Time: 0.000119773 seconds]
fixed in 36d1eff4fbe841f7ecd793ea9e42ef16b9ed7db0
I am trying to do reverse lookups and during checking out how this might work I found async_dns making thousands of queries with this code:
executing yields:
wireshark shows for the query:
and for the answer: