Questions tagged [dnspython]

DNSPython is a Python package that provides high and low level access to DNS.

DNSPython is a Python package that provides high and low level access to DNS. Find more information here: http://www.dnspython.org/

116 questions
2
votes
0 answers

dnspython and 'Lookup timed out'

I'm using Django, Celery, Eventlet and dnspython to asynchronous parse about 500 rss feeds. Using dnspython causes 'lookup timed out' error when I try to parse more than 20 feeds at the same time. When I uninstall dnspython all works great, but I…
Patrykw
  • 21
  • 2
2
votes
1 answer

How do you map an email address onto a SOA RNAME field?

Is there an existing/standard algorithm for mapping an email address onto a RNAME field of a SOA record (and its inverse)? I'm using the dnspython package but I don't see anything in their source tree to handle this. I ran into the edge case of…
Jason Keene
  • 1,085
  • 3
  • 10
  • 20
1
vote
1 answer

dnspython how to lookup serial of subdomain?

I have a little issue I cannot seem to get my head get around. I am trying to query the serial number of a sub-domain. I keep getting no answer error tho but it will work fine on root domains. Easier if I just show you: import socket,…
Voorhees
  • 11
  • 3
1
vote
1 answer

Why does dnspython module give LifetimeTimeout error?

I am trying to check if a domain name has MX records resolved using dnspython module. I am getting the following error while connecting to the mx record server. Can anyone explain why I am facing this issue? Traceback (most recent call last): File…
Faizan
  • 11
  • 4
1
vote
0 answers

dnspython2- How can I create/edit DNS A record

I am trying to create/edit a DNS record, of type A, with no success. The documentation is terrible, and I could not find any further examples. I wish to create new A record in my DNS server OR editing an existing record(like change its ip address or…
yAm
  • 11
  • 3
1
vote
0 answers

dnspython query hangs indefinetly(Intermittently)

I have been using dnspython to run dig commands and get domain data info. But sometimes, the python script just hangs on calling - dns.query.udp. abstract code: request = dns.message.make_query(domainName, dns.rdatatype.ANY) response =…
codemania23
  • 913
  • 11
  • 19
1
vote
1 answer

dnspython 2.1 xfr zone transfer

I used to use the pieces of code below to obtain the target zone object in the previous dnspython version. name_server = 'oo.abc.com.' dns_zone = 'xx.abc.com' zone = dns.zone.from_xfr(dns.query.xfr(name_server, dns_zone)) But dns.query.xfr() is…
Neil Yuki
  • 11
  • 2
1
vote
1 answer

How to extract the SOA DNS Server from a DNS Python Response

I'm trying to use DNS Python to lookup the SOA for a FQDN. From there, I am trying to isolate and extract the dns server name for the SOA, but I'm unable to find the correct object. This is where I am at in my troubleshooting. I feel like i cam…
nuprap
  • 385
  • 5
  • 22
1
vote
1 answer

dnspython: How can I get response as bytes

What I am trying to do is make a dns query using the dnspython library and get the response in the dns wire format or a string of bytes. Right not the dns.resolver.resolve() method is returning a Is there a way I can…
Josh
  • 75
  • 1
  • 7
1
vote
1 answer

Is that possible to parallel resolve list from two+ dns servers?

I am total new with python, and to be honest, programming at all. I made my first script for resolving list of domains with Google help and some luck I guess. List of domains contains about 100 000 domains, and I have to optimize time for complete…
dalt
  • 13
  • 4
1
vote
1 answer

Can I write a DNS Zone file with $TTL using dnspython?

I use dns.zone.Zone from dnspython to represent DNS zones, and when I use the to_text() method, I get a zone that looks like this: @ 86400 IN SOA dns0.noris.net. hostmaster.noris.net. 1234 86400 1800 2419200 600 @ 86400 IN A 185.199.108.153 @ 86400…
moritz
  • 12,710
  • 1
  • 41
  • 63
1
vote
1 answer

Python: Get the RA flag from DNS

I'm trying to specifically get the Recursion Available (RA) flag from the DNS. According to the RFC 1035, if there's no recursion it should return zero, otherwise non-zero. If a DNS response is blocked by Quad9 DNS service it returns an "NXDOMAIN"…
Andre
  • 598
  • 1
  • 7
  • 18
1
vote
1 answer

dnspython: module not found in pycharm

I'm trying to connect to MongoDB from the pyCharm environment. I'm using python 3.8 and I installed pymongo, dnspython and dnspython3. My settings for the project are: My code is: from pymongo import MongoClient import argparse import dnspython if…
dromalpalli
  • 117
  • 2
  • 10
1
vote
1 answer

How to remove a search domain by name from the resolver in dnspython?

I'm using dnspython to conduct DNS queries. Since my machine is joined to my company's domain, the corporate domain is part of my search domains. However, I NEVER want that domain to be appended when I am doing forward lookups on hostnames. An…
adamz88
  • 319
  • 3
  • 12
1
vote
1 answer

Does DNSpython have a method that automatically performs a forward or reverse lookup depending on the value that it's passed?

I am wondering if there is a way to pass either a host, fqdn, or IP address to DNSPython and have it perform the proper lookup (forward for hosts and fqdns and reverse for ips). Also, I want to know what kind of address (host, fqdn, or ip) was sent…
adamz88
  • 319
  • 3
  • 12