dig performs DNS lookups and displays records matching the specified IP address or domain name.
Questions tagged [dig]
213 questions
0
votes
0 answers
using dig with python to list all host
I'm very newbie with python and programming and I just can't find the way to do the code I need. So help, please :)
Background:
I'll be checking multiple different (linux) environments so I want to get the nameserver (ns) and domain information from…

sami
- 1
- 3
0
votes
1 answer
How does dig query id work?
How is the dig query id calculated or is it random?
Specifically
$ dig google.co.uk
; <<>> DiG 9.11.0-P3 <<>> google.co.uk
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63375
id: 63375
What's its…

Mark
- 1,337
- 23
- 34
0
votes
1 answer
why dig command in cygwin allways return "Segmentation fault"?
I was installed cygwin on Windows 7 and when I tried to use dig command, cygwin always return "Segmentation fault ('core' generated). I don't know why.
I've installed cygwin with bind-packets too, but it seems don't work.
Is there anything else to…

William Khepri
- 36
- 6
0
votes
0 answers
Python: unreliable results from socket.gethostbyaddr()
I use socket.gethostbyaddr to get the ip of a domain, and it does not give me any results , while ping and dig can return the IP correctly.
>>> import socket
>>> socket.gethostbyaddr('supplychristianlouboutin.com')
Traceback (most recent…

Alex
- 1,914
- 6
- 26
- 47
0
votes
1 answer
Command Line Arguments in DNSlookup
I'm trying to check reverse lookup of IP address and then write the result to txt file. But I don't know how can I get the IP address as command line argument (Linux environment) instead of write the IP inside the script.
My script:
import sys, os,…

OmZ
- 31
- 1
- 7
0
votes
1 answer
Why does DNS resolve www.google.com and google.com returned different result?
I don't know how to ask this question appropriately.Maybe it is a duplicate one, if so, please let me know.
When I use dig to resolve www.google.com and google.com, it gives me different answer.Why? Please refer me to articles relative to…

CharlesLiuChina
- 261
- 1
- 16
0
votes
1 answer
Amazon Route53: `dig +tcp` gets current data, dig (UDP) lags behind
I had a typo in my DNS zone on Amazon Route53. I had an IP starting in 53 when it should have been 52. I have now changed it on Route53, but I'm still getting old data from dig and from other resolver mechanisms that use UDP. If I force TCP, I get…

Ross Presser
- 6,027
- 1
- 34
- 66
0
votes
1 answer
using dig to search for MX hostnames and their ip v4 and v6
the code below used php functions to get me MX hostnames and their just ip version 4:
$results = dns_get_record($domain, DNS_MX);
foreach ($results as $res) {
$hostip = gethostbyname($res['target']);
}
i googled a lot about…

Devilion
- 74
- 8
0
votes
1 answer
Why are multiple queries being made to my DNS Server?
As part of a project I've written a very simplistic DNS server whose only purpose is to resolve queries for the zone it serves, and to store the IP addresses of the server that made the query.
I've noticed that if I use dig, my DNS server gets…

Sander Smith
- 1,371
- 4
- 20
- 30
0
votes
1 answer
Feed Content of a File to a Bash Script
I'm trying to construct a script that will run a command using the contents of two files, and append the results of that command to another file.
My two files:
nameservers - contains the addresses of my DNS.
hostnames - contains hostnames that…

Jon McEye
- 3
- 2
0
votes
0 answers
using dig command with python subprocess.check_output
So I am new to python. I need to use the dig command on my windows machine with this command:
dig +short TXT e462dbee005c11294a39ed8d2e466516.malware.hash.cymru.com
I am having trouble passing this command into the subprocess check output. I think…

Dallas Phillips
- 371
- 2
- 15
0
votes
1 answer
Dig Command returning "SERVFAIL"
I am using aws to host my site and recently I created a new hosted and updated the name servers in the registrars, but when I use the dig command in terminal to see if the change has gone through it gives me the following error:
$dig…

user3324236
- 5
- 1
- 8
0
votes
1 answer
Extract Hash values using Hash#dig
h = {
users: {
u_548912: {
name: "John",
age: 30
},
u_598715: {
name: "Doe",
age: 30
}
}
}
Given a hash like above, say I want to get user John, I can do
h[:users].values.first[:name] # => "John"
In…

sbs
- 4,102
- 5
- 40
- 54
0
votes
1 answer
C using dig in ubuntu DNS
I'm trying to make a DNS in Ubuntu and sometimes I have to use the dig command(I'm using test=system("dig www.google.com")
How can I get the IPv4 from the return of the dig command to them be able to use it?

Joao Diogo
- 3
- 1
0
votes
1 answer
I'm can seem to get the entire DNS reverse ip look up.
I'm trying to get all the domains linked to a record like here
http://viewdns.info/reverseip/?host=23.227.38.68&t=1 but I'm getting no luck with dig 23.227.38.68 or nslookup 23.227.38.68. Any idea what I'm doing wrong?

Milos Bejda
- 425
- 4
- 12