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

Emile van Sebille emile at fenx.com
Sat Jul 16 20:04:14 CEST 2011


On 7/16/2011 9:52 AM Chris Angelico said...
> 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.

Or try nmap and parse it's results.

Emile


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