how to get a list of all the hosts on the intranet around my workstation?

Chris Angelico rosuav at gmail.com
Sat Jul 16 12:52:14 EDT 2011


On Sun, Jul 17, 2011 at 2:31 AM, Phlip <phlip2005 at gmail.com> wrote:
> pydhcplib? Shell to a DHCP utility? Ping every server in a range
> around my own?
>

I'd say there's several imperfect options, and no perfect ones.

1) DHCP, which hosts may or may not be using.
2) DNS - look up a list of the hosts within a (sub)domain.
3) Send out a broadcast ping and hope they all respond.

If you have full control, I would recommend the second. You could even
cheat by reading a file from /etc/bind or similar.

Depending on what you're trying to do, this could either be wholly
impractical, or an easy solution to an otherwise-difficult problem.

ChrisA



More information about the Python-list mailing list