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

Hongyi Zhao hongyi.zhao at gmail.com
Wed Oct 2 02:36:58 EDT 2019


On 2019年10月02日 16:28:40 +1000, Chris Angelico wrote:
> When you ask dig, you are always asking for a DNS lookup. But
> gethostbyname does a lot of other things too. 

What other things, could you please give more detailed hints?
> My guess is that your
> /etc/hosts has an entry for that domain.

No.
> It's also possible that your
> DNS resolver is misconfigured, especially since the authoritative
> servers for that domain disagree with your dig results.

As you can see, I use the public dns servers for the dig, and I cannot do 
any config on these dns resolvers.
>> ChrisA



More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /