Python Forum
anyway to get the domain name from the ip ??
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
anyway to get the domain name from the ip ??
#7
>>> print(socket.gethostbyaddr('63.245.208.212'))
('redirects.public.mdc1.mozilla.com', ['cleopatra.io'], ['63.245.208.212'])
>>>
I guess you changed the ptr. Changing NS-Records takes time until they are everywhere (nameserver/resolver) updated.
To check the answer, you could do following on Linux:
andre@DESKTOP-F29NT09:~$ dig @1.1.1.1 63.245.208.212.in-addr.arpa ptr

; <<>> DiG 9.11.3-1ubuntu1.7-Ubuntu <<>> @1.1.1.1 63.245.208.212.in-addr.arpa ptr
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15931
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1452
;; QUESTION SECTION:
;63.245.208.212.in-addr.arpa.   IN      PTR

;; ANSWER SECTION:
63.245.208.212.in-addr.arpa. 86400 IN   PTR     coquide-cambrai-gw.gw1.lil1.fr.uu.net.

;; Query time: 35 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Fri Aug 09 12:57:47 CEST 2019
;; MSG SIZE  rcvd: 107
In this case the amazon-nameserver is used to query the PTR record.
The format is ip-address.in-addr.arpa
This will resolve the PTR record in a domain-name.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Messages In This Thread
RE: anyway to get the domain name from the ip ?? - by DeaD_EyE - Aug-09-2019, 11:01 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  unix domain sockets Skaperen 8 4,999 Sep-02-2018, 07:02 PM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020