al45tair / asyncdns Goto Github PK
View Code? Open in Web Editor NEWAsynchronous DNS for Python asyncio (pure Python)
License: MIT License
Asynchronous DNS for Python asyncio (pure Python)
License: MIT License
I have tried running this example:
import asyncdns, asyncio
resolver = asyncdns.SmartResolver()
loop = asyncio.get_event_loop()
query = asyncdns.Query('www.example.com', asyncdns.A, asyncdns.IN)
f = resolver.lookup(query)
loop.run_until_complete(f)
print(f.result())
but this results in
;; Query refused ()
; 0 answers:
; 0 authorities:
; 0 additional:
This seems to be a problem in asyncdns.SmartResolver
. Switching to asyncdns.SystemResolver
results in
;; No error (RD, RA)
; 1 answers:
www.example.com 50006 IN A 93.184.216.34
; 0 authorities:
; 0 additional:
I installed asyncdns
through
pip install git+https://github.com/al45tair/asyncdns.git
I use conda
to handle my dependencies. The output of conda list
is:
# Name Version Build Channel
_libgcc_mutex 0.1 main
aiohttp 3.5.4 py37h14c3975_0 conda-forge
async-timeout 3.0.1 py_1000 conda-forge
asyncdns2 0.1.3 pypi_0 pypi
attrs 19.1.0 py_0 conda-forge
bzip2 1.0.6 h14c3975_1002 conda-forge
ca-certificates 2019.6.16 hecc5488_0 conda-forge
certifi 2019.6.16 py37_0 conda-forge
chardet 3.0.4 py37_1003 conda-forge
dnspython 1.15.0 py_0 conda-forge
ecdsa 0.13 py_0 conda-forge
idna 2.8 py37_1000 conda-forge
intel-openmp 2019.4 243
libblas 3.8.0 10_mkl conda-forge
libcblas 3.8.0 10_mkl conda-forge
libffi 3.2.1 he1b5a44_1006 conda-forge
libgcc-ng 9.1.0 hdf63c60_0
liblapack 3.8.0 10_mkl conda-forge
libstdcxx-ng 9.1.0 hdf63c60_0
mkl 2019.4 243
multidict 4.5.2 py37h14c3975_1000 conda-forge
ncurses 6.1 hf484d3e_1002 conda-forge
numpy 1.16.4 py37h95a1406_0 conda-forge
openssl 1.1.1b h14c3975_1 conda-forge
pandas 0.24.2 py37hb3f55d8_0 conda-forge
pip 19.1.1 py37_0 conda-forge
pycrypto 2.6.1 py37h14c3975_1002 conda-forge
python 3.7.3 h33d41f4_1 conda-forge
python-dateutil 2.8.0 py_0 conda-forge
pytz 2019.1 py_0 conda-forge
readline 8.0 hf8c457e_0 conda-forge
setuptools 41.0.1 py37_0 conda-forge
six 1.12.0 py37_1000 conda-forge
sqlite 3.28.0 hcee41ef_1 conda-forge
tk 8.6.9 hed695b0_1002 conda-forge
wheel 0.33.4 py37_0 conda-forge
xz 5.2.4 h14c3975_1001 conda-forge
yarl 1.3.0 py37h14c3975_1000 conda-forge
zlib 1.2.11 h14c3975_1004 conda-forge
I am using python zeroconf for getting the ip address of a local device with a specific mdns/bonjour name.
Something comparable to:
https://github.com/jstasiak/python-zeroconf#how-do-i-use-it
Is this library suited for doing this too ?
We need to add more tests.
Hi there,
I'm trying to use the library to perform massive queries to DNS servers, so customizing the timeout is critical. I had to modify the code and change the TIMEOUT constant in resolver.py, but I was wondering if there is a better way to do it. If not, does it make sense to modify the lookup method to allow an optional timeout parameter? Would you accept a PR with this change?
Hi, I'm looking to use this library in AWS Lambda which does not allow UDP sockets. Is there a way we can force TCP protocol to be used? Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.