gera2ld / async_dns

DNS library based on asyncio
MIT License
70 stars 17 forks source link

Documentation on resolver.query_remote() #5

Closed killswitch-GUI closed 3 years ago

killswitch-GUI commented 6 years ago

Do you have any Docs laying around or API examples for resolver.query_remote()?

Thanks for this 👍 project

gera2ld commented 6 years ago

Sorry, there is no docs yet. resolver.query_remote is a method used internally, you should use resolver.query instead.

Anyway it can be used like this:

fqdn = 'www.google.com'
qtype = types.A
res = DNSMessage()
has_result = await resolver.query_remote(res, fqdn, qtype)
if has_result:
    print(res)
ghost commented 5 years ago

How would this tie in to resolve multiple hosts in a list? I want to use this for generating ASN and IP address lists for lists of hostnames, in a tool that is used by firewalls to generate aliases updated on schedule.

gera2ld commented 3 years ago

Closing since this API is outdated. Basic usage examples are included in README.

Feel free to open a new issue if you have other questions.