python socket dns query will get the correct result while the dig will not.

Hongyi Zhao hongyi.zhao at gmail.com
Wed Oct 2 00:27:14 EDT 2019


Hi,

See my following test:

With ipython:

In [1]: import 
socket                                                           

In [2]: socket.gethostbyname
('www.vpngate.net')                                 
Out[2]: '130.158.75.44'


With dig:

$ dig www.vpngate.net @114.114.114.114 +short
31.13.65.1
$ dig www.vpngate.net @8.8.8.8 +short
46.82.174.68

Any hints?



More information about the Python-list mailing list