verdec.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:PyQYT 作者: collinsctk 项目源码 文件源码
def decodeMessageVersion(wholeMsg):
    try:
        seq, wholeMsg = decoder.decode(
            wholeMsg, asn1Spec=univ.Sequence(), recursiveFlag=0
        )
        ver, wholeMsg = decoder.decode(
            wholeMsg, asn1Spec=univ.Integer(), recursiveFlag=0
        )
        if eoo.endOfOctets.isSameTypeWith(ver):
            raise ProtocolError('EOO at SNMP version component')
        return ver
    except PyAsn1Error:
        raise ProtocolError('Invalid BER at SNMP version component')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号