Can you advice a Python library to query a lan subnet with SNMP and collect MAC addresses of nodes?
rosuav at gmail.com
Mon Apr 18 21:13:28 CEST 2011
On Tue, Apr 19, 2011 at 1:23 AM, Aldo Ceccarelli
<ceccarelli.aldo at 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.
More information about the Python-list