OwlCyberSecurity - MANAGER
Edit File: opcode.cpython-36.pyc
3 �b�W� ������������������@���s����d�Z�ddlZdZdZdZdZdZeeeeed�Ze dd ��ej ��D���ZG�d d��dejj �Zdd ��Zdd��Zdd��Zdd��Zdd��ZdS�)zDNS Opcodes.�����N����������������)�QUERY�IQUERY�STATUS�NOTIFY�UPDATEc�������������c���s���|�]\}}||fV��qd�S�)N��)�.0�x�yr���r����/usr/lib/python3.6/opcode.py� <genexpr>&���s����r���c���������������@���s���e�Zd�ZdZdS�)� UnknownOpcodezAn DNS opcode is unknown.N)�__name__� __module__�__qualname__�__doc__r���r���r���r���r���)���s���r���c�������������C���sB���|�j���r$t|��}|dkr$|dkr$|S�tj|�j���}|dkr>t�|S�)z�Convert text into an opcode. @param text: the textual opcode @type text: string @raises UnknownOpcode: the opcode is unknown @rtype: int r�������N)�isdigit�int�_by_text�get�upperr���)�text�valuer���r���r���� from_text.���s���� r���c�������������C���s���|�d@�d?�S�)zUExtract an opcode from DNS message flags. @param flags: int @rtype: int i�x������r���)�flagsr���r���r���� from_flagsA���s����r!���c�������������C���s���|�d>�d@�S�)z`Convert an opcode to a value suitable for ORing into DNS message flags. @rtype: int r���i�x��r���)r���r���r���r����to_flagsK���s����r"���c�������������C���s���t�j|��}|dkrt|��}|S�)z�Convert an opcode to text. @param value: the opcdoe @type value: int @raises UnknownOpcode: the opcode is unknown @rtype: string N)� _by_valuer����str)r���r���r���r���r����to_textT���s���� r%���c�������������C���s���t�|��tkS�)znTrue if the opcode in flags is UPDATE. @param flags: DNS flags @type flags: int @rtype: bool )r!���r ���)r ���r���r���r���� is_updatec���s����r&���)r���Z dns.exceptionZdnsr���r���r���r ���r ���r����dict�itemsr#���Z exceptionZDNSExceptionr���r���r!���r"���r%���r&���r���r���r���r����<module>���s$���