Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'hosts': 0.09; 'ping': 0.09; 'respond.': 0.09; 'second.': 0.09; 'am,': 0.13; 'received:209.85.214.174': 0.13; 'received:mail- iw0-f174.google.com': 0.13; 'wrote:': 0.15; 'dhcp,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:list': 0.16; 'header:In-Reply-To:1': 0.22; 'trying': 0.23; 'ones.': 0.23; 'do,': 0.28; 'received:209.85.214': 0.28; 'message-id:@mail.gmail.com': 0.28; 'server': 0.29; 'shell': 0.29; 'sun,': 0.30; 'subject:?': 0.31; 'list': 0.32; 'to:addr:python- list': 0.34; '17,': 0.35; 'dns': 0.35; 'file': 0.36; 'several': 0.37; 'could': 0.37; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.38; 'problem.': 0.38; 'either': 0.39; "there's": 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.40; "i'd": 0.40; 'hope': 0.60; 'full': 0.63; 'perfect': 0.63 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=cY5CwcH+IC0SnZA5/5QkVLd5Gc/K45yfiIxOzfa71OY=; b=nO0SiCIJf6P7IbAQFb9TDwwURkkkKR6C2/QCG3dMUY8+GzMRIKHVRVwVtzkff1klvb vFL08jNHpczLFcKrTR6ZIS0RA9bDESeljSapVefHNc6AJvwblGFYBppL3M+89QMp+bqn JVx1Z/am2SgxV4tFBG4EKWm/h7QcagQtnudJ4= MIME-Version: 1.0 In-Reply-To: References: Date: Sun, 17 Jul 2011 02:52:14 +1000 Subject: Re: how to get a list of all the hosts on the intranet around my workstation? From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1310835137 news.xs4all.nl 23948 [2001:888:2000:d::a6]:43411 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:9631 On Sun, Jul 17, 2011 at 2:31 AM, Phlip 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