A
A
Alexander2017-10-01 07:51:12
Python
Alexander, 2017-10-01 07:51:12

How to read line C0 C2 D0 20 E2 F5 on snmp request?

Good afternoon.
When querying snmpget for a device name, the output is "C0 C2 D0 20 E2 F5...". Tell me how to translate into a readable line in Cyrillic?
In this case, the pysnmp module was not used, only through subprocess.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
longclaps, 2017-10-01
@pycode

s = "C0 C2 D0 20 E2 F5"
b = bytes(int(c, 16) for c in s.split())
print(b.decode(encoding='windows-1251'))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question