Giter Site home page Giter Site logo

asyncdns's People

Contributors

al45tair avatar rdrey avatar sander76 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

asyncdns's Issues

Example does not work

Description

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:

System Info

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

Allow forced TCP

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.

Customize connection timeout

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.