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
0
votes
1 answer

How to make this email-address-verifying script more accurate?

The given script is not verifying some email addresses correctly. for example himanshu.jain@traveldglobe.com jobbuzz@timesjobs.com are not valid according to my script but I verified these on leopathu.com/verify-email which verifying them…
brainLoop
  • 3,810
  • 2
  • 10
  • 13
0
votes
1 answer

Too much RAM (40GB+) consumption on concurrent DNS queries (Python3 concurrent.futures)

I have a list of 30 million strings, and I want to run a dns query to all of them using python. I do not understand how this operation can get memory intensive. I would assume that the threads would exit after the job is done, and there is also a…
MortyAndFam
  • 159
  • 1
  • 8
0
votes
0 answers

Add nested packages to install requires, setup.py

I'm new to building binaries and am having a problem adding the dnspython module. Dnspython sometimes includes some modules dynamically using __import__ and these modules are nested inside other packages. Therefore the find_packages() does not find…
J.Paravicini
  • 882
  • 12
  • 39
0
votes
2 answers

How to get multiple records in one DNS query

This simple code snippet using dnspython the code resolves the name to IP. In this example, the domain is google.com and the answer for A record. How can I get multiple records (e.g. TXT, CNAME, ..) in one query? from dns.resolver import…
user9371654
  • 2,160
  • 16
  • 45
  • 78
0
votes
1 answer

Python dns.resolver of a NS doesn't work on subdomains?

I'm trying to get the NS of a subdomain, but I get a NoAnswer Exception. I suspect it's because asking for the NS is only working on the root domain, but how can I do then? Is there a way to achieve it using dnspython or do I have to remove each…
Cyril N.
  • 38,875
  • 36
  • 142
  • 243
0
votes
1 answer

Is there any way to update zone in specific views using dnspython?

Just like the title. I was struggling to work with that, but I couldn't find any way to make that work. Is there anyone know how to do that. Please help, thanks!
Derek Kuo
  • 33
  • 6
0
votes
1 answer

Query an array of DNS records with dnspython, and proceed to the next element based on a custom timeout

I'm querying a bunch of DNS records with dnspython, it seems to timeout when no reply is received (dns.exception.Timeout: The DNS operation timed out after 30.0006685256958 seconds). Here's the function: def dnstest(domain): dnsrecords = [] …
rahuL
  • 3,330
  • 11
  • 54
  • 79
0
votes
1 answer

Add PTR record using dnspython

Im trying to add a PTR record with dnspython to bind9 using this code: def send_query(query, server): update = dns.query update.tcp(query, server) def add(name, rdtype, rdata, ttl=300, zone): server = dns.resolver.Resolver() …
Chen Shabi
  • 174
  • 1
  • 9
0
votes
0 answers

DNS.RESOLVER.QUERY gives unexpected output in exe file of the same python script

I am using python 2.7 on Windows 10. Here is a snippet of my code :- import dns myresolver = dns.resolver xyz = myresolver.query(record, "SRV") for rdata in xyz.response.answer: z = str(rdata) print ("after string " + z) list =…
0
votes
0 answers

How to verify an IP address is DNSSEC-ed with dnspython?

I sent recursive DNS queries to root name servers, TLD servers, and authoritive servers for stanford.edu. Root response: TLD response: Authority response: At all 3 levels, I could see that DNSSEC is supported. How could I use dnspython and…
weefwefwqg3
  • 961
  • 10
  • 23
0
votes
1 answer

How to add alias target in zone file using dnspython?

I am generating zone files for the route-53 hosted zones using boto3 and dnspython library.I am succesfully able to generate A/CNAME/MX/TXT Record Sets using dnspython library(1.14.0). However ,since it does not have any implementation of ALIAS…
tom
  • 3,720
  • 5
  • 26
  • 48
0
votes
1 answer

dnspython not updated when changing resolv.conf

This snippet works perfect import dns import dns.resolver default = dns.resolver.get_default_resolver() nameserver = default.nameservers[0] except that if I change /etc/resolv.conf by hand and call again get_default_resolver function it doesn't…
mhanuel
  • 75
  • 1
  • 12
0
votes
0 answers

AttributeError: 'str' object has no attribute 'is_absolute'

I have all the resource record sets and resource types(cname,A,ns,mx). I wanted to create a dns file(BIND format) using easyzone, dnspython, dns libraries in python. But I am getting an error - Attribute Error : 'str' object has no attribute…
tom
  • 3,720
  • 5
  • 26
  • 48
0
votes
1 answer

How to pass inputs from file to dns.resolver.Resolver.query() from file in dns python?

I am writing a code to pass domain name and ip address from file to dns resolver query. But it does not seem to be working import dns.resolver import os import sys d = open(str(sys.argv[1]),'r') #contains the domain name list ip =…
Arpit
  • 23
  • 3
0
votes
0 answers

dns.resolve result into a list

Ive created a simple dns.query function, I am attempting to add the results into a list or potentially a dictionary. However I cant work out how to achieve it, I have tried list.append(subdomain, item), ive tried using the join function and I have…
iNoob
  • 1,375
  • 3
  • 19
  • 47