osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


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?