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 do i send a non-recursive query to a dns server in dnspython/python in general?

I can't seem to figure out how to do this or if it is even doable, any help would be appreciated. I have not tried much due to the lack of answers i can find on google.
0
votes
0 answers

Dnspython- How to create a PTR dns crecord?

Is there any way to create PTR record with python(dnspython)? I want the record to locate in Reverse Lookup Zone in the appropriate X.Y.Z.in-addr.arpa zone. I have tried the following but it did not work for me: record =…
yAm
  • 11
  • 3
0
votes
1 answer

Reverse DNS look up in python

I am trying to do a reverse lookup in python, what I did was, give input as www.fastly.com test = dns.resolver.resolve('www.fastly.com.','CNAME', raise_on_no_answer=False) print (test.rrset) which gives output as, www.fastly.com. 3600 IN CNAME…
user13024918
0
votes
0 answers

problem with script verifying RRSIGs using DNSPython

Im writing a script to verify rrsigs using dnspython but something is wrong with my code. The following is a snippet and its accompanying error message: domain = 'iana.org' server = '8.8.8.8' qname = dns.name.from_text(domain) # get…
Mnemosyne
  • 1,162
  • 4
  • 13
  • 45
0
votes
1 answer

Missing "dnspython" error for django + gninx + gunicorn app, even after installing it to the correct virtual environment

Getting the following Error: The "dnspython" module must be installed to use mongodb+srv:// URIs Exception location: ../python3.7/site-packages/pymongo/uri_parser.py, line 428, in parse_uri When trying to use pymongo with django app. I tried to…
david
  • 117
  • 1
  • 5
0
votes
2 answers

Using Pymongo in my Python script through NodeJs

I'm "spawning" a python script from my NodeJs server code using var spawn = require('child_process').spawn; var python_process = spawn('python', ['server/matcher/matcher.py']) My python code is supposed to process some data fetched from my MongoDB…
Bassam
  • 57
  • 8
0
votes
1 answer

dnspython Set the DNS server for DDNS updates?

In dnspython you can set the server for queries via dns.resolver.nameservers. Is there an equivalent statement to set the dns server for DDNS updates via dnspython?
0
votes
1 answer

mock a dnspython dns query during testing

I have the following code that does a lookup of a domain's nameservers, using dnspython, and then looping over that list gets the IPv4 and IPv6 addresses for each server. I am able to mock the results for resolver_list. However, I am unsure how, or…
bmeyer71
  • 362
  • 3
  • 10
  • 23
0
votes
1 answer

server name reachability in dnspython

I am currently trying to find a way to check whether or not the name servers can respond to either TCP or UDP packets. My idea behind that was, to get all the name servers from a website (for example google.com), store them in a list, and then try…
user12713780
0
votes
1 answer

facing issue NXDOMAIN: None of DNS query names exist: in dnspython

I am using dnspython library and not able to verify domain for gmail because of below error import dns domain = 'gmail.com' answers = dns.resolver.query(domain,'MX') for server in answers: print(server.target) raise…
0
votes
0 answers

Where are DNS resolvers pulled from with dnspython?

I am trying to develop a python script using dnspython to do forward lookups by hostname only instead of FQDN. This obviously has a dependency on DHCP Option 15(connection specific DNS Suffix). When I do: from dns import resolver servs =…
adamz88
  • 319
  • 3
  • 12
0
votes
1 answer

dnspython aws lambda function returning "dns.resolver.Answer object at 0x7fb830c2a450"

I originally had this script working using the socket module, which is why x is defined the way it is. However, I ended up needing to specify the DNS server being used. This script is currently running successfully in AWS Lambda, however instead of…
Kevlar_Axis
  • 65
  • 1
  • 9
0
votes
0 answers

Python Script to Produce Difference Between Files and Resolve DNS Query for the Output

I wanted to write a python script that gives me the difference between two txt files that contain list of domains. Below is my script that I was able to create. import difflib file1 = open("2.txt").readlines() file2 =…
Data Shark
  • 91
  • 1
  • 1
  • 7
0
votes
2 answers

Get all FQDN for an IP address in Python

I've the following problem : I'm actually making a script for an ovirt server to automatically delete virtual machine which include unregister them from the DNS. But for some very specific virtual machine there is multiple FQDN for an IP address…
Brice Harismendy
  • 113
  • 1
  • 12
0
votes
1 answer

Dynamic DNS updates using Python's dns.update returning rcode REFUSED

I am trying to make a simple DNS update using Python's dns.update. However, every-time i run the script i get "rcode REFUSED". I tried a series of different permutations but cant seem to figure where i am going wrong. I am able to directly use this…
sdhir
  • 41
  • 7