2.6.7: Does socket.gethostbyaddr truncate?

Chris Angelico rosuav at gmail.com
Sun Feb 4 09:09:44 EST 2018


On Tue, Jan 30, 2018 at 11:05 PM, Antoon Pardon <antoon.pardon at vub.be> wrote:
> I am using python 2.6.7 to do a little network programming, but it seems I don't
> get all the results.
>
> When I call socket.gethostbyaddr(IP) entry [1] of the result is a list of 34 addresses.
>
> However when I use: dig -x IP I get a list of 46 addresses.
>
> Am I using the wrong function? Is this a bug? If the latter, is there a work around?
>

Can you post the full output of dig? Maybe it's switched to TCP.

ChrisA



More information about the Python-list mailing list