Question

Short Version:
What does this (hex?) code found in onesixtyone mean?

char object[] = "\x30\x0e\x30\x0c\x06\x08\x2b\x06\x01\x02\x01\x01\x01\x0\x05\x00";

Long Version:
Onesixtyone is search tool to find snmp enabled devices. It is hard coded to return the sysDescr.0 value. As a side project, I'm trying to understand and/or modify it to return any snmp OID value. I come from a PHP background, but I have used PHP to write linux daemons. I have limited knowledge of hex

My question: I'm repeatedly hung up by the build_snmp_reg method. My understanding is that it specifies the TCP packet being sent, but I cannot understand where the sysDescr.0 is found.

Was it helpful?

Solution

You're looking at some pretty low-level SNMP data there. You shouldn't have to do that with all of the SNMP tools around that will deal with that for you.

This hex that you're looking at is the SNMP PDU BER bytes. It's hard to answer your question, but maybe a website that explains SNMP PDU BER might help.

Net-SNMP and LibSMI are what you should probably be looking at as well. Look around for whatever language and OS you're programming in and find SNMP tools and libraries for your project.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top