开发者

Multithread DNS Query against specific DNS, domain and recordtype supporting Library

开发者 https://www.devze.com 2023-01-18 17:16 出处:网络
Resolved, used adns with python bindings... I hav开发者_Go百科e a scenario in which i have to do the following:

Resolved, used adns with python bindings...

I hav开发者_Go百科e a scenario in which i have to do the following:

  • Load a domain
  • Load what record type is to be queried
  • Load list of DNS
  • Perform query, fetch results and display them.

I have tried this but its not multi threaded and even a single query takes about 3 seconds. I looked at ADNS, its python binding and http://www.catonmat.net/blog/asynchronous-dns-resolution , its much much faster than any other way but i still haven't found a way with ADNS Python bindings to query a specific DNS server instead of the ones used in resolv.conf.

What do you think? Is there a solution? Or should i launched each ADNS query in a chrooted environment with resolv.conf created the fly?

Oh and i would prefer it to be PHP/Python to easily include it in an appiication.


If you do go with PHP for the client side and feed it with domains to query, you should consider stream_select for working with many streams (each one a dns query) in a non-blocking way. Wez Furlong explains it well.

0

精彩评论

暂无评论...
验证码 换一张
取 消