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?

References <e2459986-6ae7-48b4-ab83-2c2eec9840b1@dr5g2000vbb.googlegroups.com> <ee43baee-46bd-47d0-a01f-f89dbb4539fc@dn9g2000vbb.googlegroups.com>
Date 2011-04-19 05:13 +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>
Newsgroups comp.lang.python
Message-ID <mailman.521.1303154011.9059.python-list@python.org> (permalink)

Show all headers | 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