I am working on some software that uses SNMP to get information from
routers and switches. I am using the pysnmp module (v2.0.8) to do the
snmp part. The problem that I am having is that when I query a router
for mac addresses pysnmp returns octetstrings like this:
\000\002\263\25 4\264\351
\010\000 \301F\021
\010\000 \300\303[
\000\002\263\25 4\264\241
what I need though is hex strings like this:
0:e0:7d:de:5:48
0:e0:7d:c8:dc:9 f
8:0:36:4:3b:de
0:80:ad:3a:9e:2 b
Can anyone tell me how to convert the octet strings to hex strings?
Thanks very much
-matthew
routers and switches. I am using the pysnmp module (v2.0.8) to do the
snmp part. The problem that I am having is that when I query a router
for mac addresses pysnmp returns octetstrings like this:
\000\002\263\25 4\264\351
\010\000 \301F\021
\010\000 \300\303[
\000\002\263\25 4\264\241
what I need though is hex strings like this:
0:e0:7d:de:5:48
0:e0:7d:c8:dc:9 f
8:0:36:4:3b:de
0:80:ad:3a:9e:2 b
Can anyone tell me how to convert the octet strings to hex strings?
Thanks very much
-matthew
Comment