Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #3496

Re: Can you advice a Python library to query a lan subnet with SNMP and collect MAC addresses of nodes?

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 <rosuav@gmail.com>
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; 'python,': 0.01; 'subject:Python': 0.04; 'though.': 0.07; 'python': 0.07; 'subject:library': 0.09; 'subject:query': 0.09; 'files.': 0.10; 'output': 0.12; 'am,': 0.14; 'wrote:': 0.14; 'subject:MAC': 0.16; 'subject:addresses': 0.16; 'temporary': 0.19; 'tue,': 0.20; 'header:In-Reply-To:1': 0.22; 'calling': 0.25; 'wrote': 0.25; 'script': 0.26; "i'll": 0.26; 'chris': 0.27; 'message- id:@mail.gmail.com': 0.28; 'installed': 0.29; 'problem': 0.29; 'subject:?': 0.29; 'solved': 0.31; 'to:addr:python-list': 0.32; 'thank': 0.32; "i've": 0.33; 'generally': 0.33; 'using': 0.34; 'file': 0.35; 'follows:': 0.35; 'addresses': 0.36; 'rather': 0.36; 'processing': 0.37; 'received:209.85': 0.37; 'subject:with': 0.37; 'apr': 0.38; 'subject:Can': 0.38; 'received:google.com': 0.38; 'but': 0.38; 'to:addr:python.org': 0.39; 'received:209': 0.39; "it's": 0.40; 'header:Received:5': 0.40; 'exact': 0.60; 'results': 0.61; 'further': 0.62; '2011': 0.62; 'records': 0.66; 'subject:you': 0.78; 'received:209.85.210.174': 0.84; 'received :mail-iy0-f174.google.com': 0.84; 'subject:collect': 0.84; 'filtered': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=jnXakcdczeLmCWLJxMh8YVERXut0Nl0J/ctFXYeNMyU=; b=jj4qoeZ8cOp/dKlgDOVKBflxSGAI2aT3gLh4pBVnex12tgBc2didOkyVprU5ec4PlC 4uyPX+w4stOAAqOr4c0nyFZAkdNhjz2694zYPX8b+etb2ipf847uYjhekTdyog2/yT/+ 2BJEL2/wlqWTd47OvKYUiZMvJXoqtLWsCVJ+E=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=HLCYAtillp8QDm+NTPbc3uujxvdnciNUBJRpFdAnJoALdNPLcXyMNWPAOLu5Czc915 tZ1GX+3/uvm3xlgwDb+J681lw4zaxLkj2xsbi4P3AC+xVQRBCfDOrHaFDaEoEN3SYlhl 1ADaZk7a9xAd63oJZ/yySzn4SRRqJuENwntBI=
MIME-Version 1.0
In-Reply-To <ee43baee-46bd-47d0-a01f-f89dbb4539fc@dn9g2000vbb.googlegroups.com>
References <e2459986-6ae7-48b4-ab83-2c2eec9840b1@dr5g2000vbb.googlegroups.com> <ee43baee-46bd-47d0-a01f-f89dbb4539fc@dn9g2000vbb.googlegroups.com>
Date Tue, 19 Apr 2011 05:13:28 +1000
Subject Re: Can you advice a Python library to query a lan subnet with SNMP and collect MAC addresses of nodes?
From Chris Angelico <rosuav@gmail.com>
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 <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.521.1303154011.9059.python-list@python.org> (permalink)
Lines 18
NNTP-Posting-Host 82.94.164.166
X-Trace 1303154011 news.xs4all.nl 81475 [::ffff:82.94.164.166]:43625
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:3496

Show key headers only | View raw


On Tue, Apr 19, 2011 at 1:23 AM, Aldo Ceccarelli
<ceccarelli.aldo@gmail.com> wrote:
> Hello and thank you All!
> I've solved my problem as follows:
> 1. installed nmap
> 2. wrote a python script calling nmap nmap -sP via os.system and
> redirecting output to a file
> 3. read results file and made a further processing to get exact
> filtered records with MAC addresses I needed

I don't know if it's significant, but if I want to process a command's
output using Python, I'll generally use:

nmap -sP | /path/to/script.py

rather than os.system() and temporary files. YMMV though.

Chris Angelico

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Can you advice a Python library to query a lan subnet with SNMP and collect MAC addresses of nodes? Aldo Ceccarelli <ceccarelli.aldo@gmail.com> - 2011-04-15 02:00 -0700
  Re: Can you advice a Python library to query a lan subnet with SNMP and collect MAC addresses of nodes? frankcui <frankcui24@gmail.com> - 2011-04-15 17:54 +0800
    Re: Can you advice a Python library to query a lan subnet with SNMP and collect MAC addresses of nodes? Aldo Ceccarelli <ceccarelli.aldo@gmail.com> - 2011-04-15 03:22 -0700
      Re: Can you advice a Python library to query a lan subnet with SNMP and collect MAC addresses of nodes? rusi <rustompmody@gmail.com> - 2011-04-16 21:38 -0700
  Re: Can you advice a Python library to query a lan subnet with SNMP and collect MAC addresses of nodes? Aldo Ceccarelli <ceccarelli.aldo@gmail.com> - 2011-04-18 08:23 -0700
    Re: Can you advice a Python library to query a lan subnet with SNMP and collect MAC addresses of nodes? Chris Angelico <rosuav@gmail.com> - 2011-04-19 05:13 +1000
    Re: Can you advice a Python library to query a lan subnet with SNMP and collect MAC addresses of nodes? Daniel Kluev <dan.kluev@gmail.com> - 2011-04-19 07:38 +1100
      Re: Can you advice a Python library to query a lan subnet with SNMP and collect MAC addresses of nodes? Aldo Ceccarelli <ceccarelli.aldo@gmail.com> - 2011-04-18 23:16 -0700

csiph-web