git.net

[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.


On Wed, 2 Oct 2019 04:27:14 +0000 (UTC)
Hongyi Zhao <hongyi.zhao at gmail.com> wrote:

> Hi,
> 
> See my following test:
> 
> With ipython:
> 
> In [1]: import 
> socket                                                           
> 
> In [2]: socket.gethostbyname
> ('www.vpngate.net')                                 
> Out[2]: '130.158.75.44'
> 

I get '130.158.75.39' which is ok.


> 
> With dig:
> 
> $ dig www.vpngate.net @114.114.114.114 +short

This gives here:

130.158.75.48
130.158.75.42
130.158.75.35
130.158.75.36
130.158.75.44
130.158.75.40
130.158.75.39
130.158.75.38


-- 
Manfred