This is a simple ASN.1 BER parser based on the following resources:
• https://luca.ntop.org/Teaching/Appunti/asn1.html
• https://www.oss.com/asn1/resources/asn1-made-simple/asn1-quick-reference/basic-encoding-rules.html
Most importantly, this parser implements high-form tags, long-form lengths, and indefinite lengths, which were missing from the parser in the "Firewall" challenge.
This is a rough recreation of the parser that the "Firewall" challenge used for retrieving the PDU type of an SNMP packet.
It only reads one byte when retrieving a tag or length, meaning it does not consider multi-byte structures (high-form tags, long-form lengths, or indefinite lengths). This is the differential that could be used to bypass the PDU type filter.