관리-도구
편집 파일: message.cpython-39.pyc
a �����M�e����������������������@���s���d�Z�ddlZddlZddlZddlmZmZmZmZm Z m Z �ddlZddl ZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZG�dd��dejj�Z G�dd��dejj�Z!G�dd ��d ejj"�Z#G�d d��dejj�Z$G�dd ��d ejj�Z%G�dd��dejj"�Z&G�dd��dejj"�Z'G�dd��dejj"�Z(G�dd��dejj"�Z)G�dd��dejj"�Z*G�dd��dejj+�Z,G�dd��dej-j.�Z/G�dd��d�Z0dZ1dZ2e e3ej4j5ej6j7ej8j9eej8j9�eej6j7�f�Z:ee:ej;j<f�Z=e e3e>eej;j<�f�Z?G�d d!��d!�Z@G�d"d#��d#�ZAG�d$d%��d%e@�ZBd&d'��ZCd(d)��ZDG�d*d+��d+�ZEdBeFee�eeF�eGeej4j5�ee ejHjIejHjJf��eGeGeGeGeGeGe@d.� d/d0�ZKG�d1d2��d2�ZLdCe>eej4jM�eGeej4j5�eGeej4j5�e@d4�d5d6�ZNdDeeej4jM�eGe@d7�d8d9�ZOej6jPdd-ddddddejQjRdfe ej4j5e>f�e ej8j9e>f�e ej6j7e>f�ee e3eGf��eGee3�ee3�ee3�eeejSjT��eej4jM�ee3�e3e3eBd:�d;d<�ZUdEe@eGe3e3e3ee3�e@d?�d@dA�ZVe/jWZWe/jXZXe/jYZYe/jZZZdS�)FzDNS Messages�����N)�Any�Dict�List�Optional�Tuple�Unionc�������������������@���s���e�Zd�ZdZdS�)�ShortHeaderz2The DNS packet passed to from_wire() is too short.N��__name__� __module__�__qualname__�__doc__��r���r����//usr/lib/python3.9/site-packages/dns/message.pyr���-���s���r���c�������������������@���s���e�Zd�ZdZdS�)�TrailingJunkzEThe DNS packet passed to from_wire() has extra junk at the end of it.Nr ���r���r���r���r���r���1���s���r���c�������������������@���s���e�Zd�ZdZdS�)�UnknownHeaderFieldzVThe header field name was not recognized when converting from text into a message.Nr ���r���r���r���r���r���5���s���r���c�������������������@���s���e�Zd�ZdZdS�)�BadEDNSzLAn OPT record occurred somewhere other than the additional data section.Nr ���r���r���r���r���r���:���s���r���c�������������������@���s���e�Zd�ZdZdS�)�BadTSIGzWA TSIG record occurred somewhere other than the end of the additional data section.Nr ���r���r���r���r���r���?���s���r���c�������������������@���s���e�Zd�ZdZdS�)�UnknownTSIGKeyz(A TSIG with an unknown key was received.Nr ���r���r���r���r���r���D���s���r���c�����������������������s.���e�Zd�ZdZdhZ��fdd�Zdd��Z���ZS�)� TruncatedzThe truncated flag is set.�messagec��������������������s���t���j|i�|���d�S��N)�super�__init__)�self�args�kwargs�� __class__r���r���r���O���s����zTruncated.__init__c�����������������C���s ���|�j�d�S�)zbAs much of the message as could be processed. Returns a ``dns.message.Message``. r���)r����r���r���r���r���r���R���s����zTruncated.message)r ���r���r���r ���Zsupp_kwargsr���r���� __classcell__r���r���r���r���r���H���s���r���c�������������������@���s���e�Zd�ZdZdS�)�NotQueryResponsez%Message is not a response to a query.Nr ���r���r���r���r���r!���Z���s���r!���c�������������������@���s���e�Zd�ZdZdS�)�ChainTooLongzThe CNAME chain is too long.Nr ���r���r���r���r���r"���^���s���r"���c�������������������@���s���e�Zd�ZdZdS�)�AnswerForNXDOMAINz.The rcode is NXDOMAIN but an answer was found.Nr ���r���r���r���r���r#���b���s���r#���c�������������������@���s���e�Zd�ZdZdS�)�NoPreviousNamezNo previous name was known.Nr ���r���r���r���r���r$���f���s���r$���c�������������������@���s,���e�Zd�ZdZdZdZdZdZedd���Z dS�) �MessageSectionzMessage sectionsr���������������c�����������������C���s���dS��Nr(���r���)�clsr���r���r����_maximumr���s����zMessageSection._maximumN) r ���r���r���r ����QUESTION�ANSWER� AUTHORITY� ADDITIONAL�classmethodr+���r���r���r���r���r%���j���s���r%���c�������������������@���s���e�Zd�Zeed�dd�ZdS�)�MessageError�� exception�offsetc�����������������C���s���||�_�||�_d�S�r���r2���)r���r3���r4���r���r���r���r���x���s����zMessageError.__init__N)r ���r���r���� Exception�intr���r���r���r���r���r1���w���s���r1���i�������c�������������������@���sH��e�Zd�ZdZeZdjee�d�dd�Ze e ejj �d�dd��Zejd d���Ze e ejj �d�d d��Zejdd���Ze e ejj �d�d d��Zejdd���Ze e ejj �d�dd��Zejdd���Zdd��Zdd��Zdkeejj�eeeef�ed�dd�Zdd��Zdd��Zd�ed�d d!�Ze ejj �ed"�d#d$�Zee ejj �d%�d&d'�Z ej!j"dd(d(dfe#ejjej$j%ej!j&ej!j&eej$j%�eeeejj'�ejj d)� d*d+�Z(ej!j"dd(d(dfe#ejjej$j%ej!j&ej!j&eej$j%�eeeejj'�eejj �d)� d,d-�Z)e#ed"�d.d/�Z*ed�d0d1�Z+ed�d2d3�Z,dleejj�eeee�eeeeef�e-d5�d6d7�Z.e/d8d9���Z0dd:dd4d;ej1j2feee3ejjef��eee�ee-e3ejjef�dd<�d=d>�Z4e eejj�d�d?d@��Z5e eejj�d�dAdB��Z6e ee-�d�dCdD��Z7e ee�d�dEdF��Z8e ed�dGdH��Z9e/d4e:dfdIdJ��Z;d4d4e:ddd4fee3eef��eeee�ee ej<j=��eddK�dLdM�Z>e ed�dNdO��Z<e ed�dPdQ��Z?e?jdRdQ���Z?e ed�dSdT��Z@e eAd�dUdV��ZBdmeddW�dXdY�ZCejDjEd�dZd[�ZDejDjEdd\�d]d^�ZFejGjHd�d_d`�ZGejGjHdda�dbdc�ZIddde��ZJdfdg��ZKdhdi��ZLdS�)n�MessagezA DNS message.N��idc�����������������C���s|���|d�u�rt�j���|�_n||�_d|�_g�g�g�g�g|�_d�|�_d|�_d|�_d�|�_ d�|�_ d|�_d|�_d�|�_ d�|�_i�|�_g�|�_d|�_d�S�)Nr��������Fg��������)�dnsZentropyZ random_16r:����flags�sections�opt�request_payload�pad�keyring�tsig�request_mac�xfr�origin�tsig_ctx�index�errors�time)r���r:���r���r���r���r�������s"����zMessage.__init__��returnc�����������������C���s ���|�j�d�S�)zThe question section.r����r>���r���r���r���r����question����s����zMessage.questionc�����������������C���s���||�j�d<�d�S��Nr���rM����r����vr���r���r���rN�������s����c�����������������C���s ���|�j�d�S�)zThe answer section.r&���rM���r���r���r���r����answer����s����zMessage.answerc�����������������C���s���||�j�d<�d�S�)Nr&���rM���rP���r���r���r���rR�������s����c�����������������C���s ���|�j�d�S�)zThe authority section.r'���rM���r���r���r���r���� authority����s����zMessage.authorityc�����������������C���s���||�j�d<�d�S�)Nr'���rM���rP���r���r���r���rS�������s����c�����������������C���s ���|�j�d�S�)zThe additional data section.r(���rM���r���r���r���r���� additional����s����zMessage.additionalc�����������������C���s���||�j�d<�d�S�r)���rM���rP���r���r���r���rT�������s����c�����������������C���s���dt�|�j��d�S�)Nz<DNS message, ID �>)�reprr:���r���r���r���r����__repr__����s����zMessage.__repr__c�����������������C���s���|�����S�r���)�to_textr���r���r���r����__str__����s����zMessage.__str__T)rF���� relativize�kwrL���c����������� ������K���s:��t����}|�d|�j���|�dtj�|��������|�dtj�|��������|�dtj�|�j����|�j dkr�|�d|�j ���|�j dkr�|�dtj�|�j ����|�d|�j���|�j D�]}|�d |������q�|�jj���D�]N\}}|�d |��d���|��|�D�](}|�|j||fi�|����|�d��q�q�|���dd ��S�)z�Convert the message to text. The *origin*, *relativize*, and any other keyword arguments are passed to the RRset ``to_wire()`` method. Returns a ``str``. zid %d z opcode %s z rcode %s z flags %s r���zedns %s z eflags %s zpayload %d z option %s �;� N���)�io�StringIO�writer:���r<����opcoderX����rcoder=����edns� ednsflagsZedns_to_text�payload�options� _section_enum�__members__�items�section_from_number�getvalue) r���rF���rZ���r[����sr?����name�which�rrsetr���r���r���rX�������s$���� zMessage.to_textc�����������������C���s����t�|t�sdS�|�j|jkrdS�|�j|jkr.dS�t|�j�D�]F\}}|j|�}|D�]}||vrN��dS�qN|D�]}||vrh��dS�qhq8dS�)z�Two messages are equal if they have the same content in the header, question, answer, and authority sections. Returns a ``bool``. FT)� isinstancer8���r:���r=���� enumerater>���)r����other�i�sectionZ other_section�nr���r���r����__eq__����s���� zMessage.__eq__c�����������������C���s���|���|��S�r���)rw���)r���rs���r���r���r����__ne__��s����zMessage.__ne__)rs���rL���c�����������������C���s����|j�tj�j@�dks:|�j|jks:tj�|�j��tj�|j��kr>dS�|���tjjtjjtjj tjj hv�rtt|j�dkrtdS�tj� |�j��r�dS�|�jD�]}||jvr��dS�q�|jD�]}||�jvr��dS�q�dS�)zuIs *other*, also a ``dns.message.Message``, a response to this message? Returns a ``bool``. r���FT)r=���r<����QRr:���rb���� from_flagsrc���ZFORMERRZSERVFAILZNOTIMPZREFUSED�lenrN���Z is_update)r���rs���rv���r���r���r����is_response��s0����� ��� zMessage.is_response)ru���rL���c�����������������C���s6���t�|�j�D�]\}}||u�r |��|���S�q td��dS�)z�Return the "section number" of the specified section for use in indexing. *section* is one of the section attributes of this message. Raises ``ValueError`` if the section isn't known. Returns an ``int``. zunknown sectionN)rr���r>���rh���� ValueError)r���ru���rt���Zour_sectionr���r���r����section_number5��s����zMessage.section_number)�numberrL���c�����������������C���s���|�j��|�}|�j|�S�)a��Return the section list associated with the specified section number. *number* is a section number `int` or the text form of a section name. Raises ``ValueError`` if the section isn't known. Returns a ``list``. )rh����maker>���)r���r���ru���r���r���r���rk���E��s����zMessage.section_from_numberF) ru���rn����rdclass�rdtype�covers�deleting�create�force_unique� idna_codecrL���c ����������� ������C���s>��t�|t�r|} |��| �}n,t�|t�r<|�j�|�} |��| �}n |��|�} t�|t�r`tjj|| d�}tj j �|�}tjj �|�}tj j �|�}|dur�tjj �|�}| |||||f}|s�|�jdur�|�j�|�}|dur�|S�n$|D�]}|�|||||�r�|��S�q�|�st�tj�|||||�}|�|��|�jdu�r:||�j|<�|S�)a���Find the RRset with the given attributes in the specified section. *section*, an ``int`` section number, a ``str`` section name, or one of the section attributes of this message. This specifies the the section of the message to search. For example:: my_message.find_rrset(my_message.answer, name, rdclass, rdtype) my_message.find_rrset(dns.message.ANSWER, name, rdclass, rdtype) my_message.find_rrset("ANSWER", name, rdclass, rdtype) *name*, a ``dns.name.Name`` or ``str``, the name of the RRset. *rdclass*, an ``int`` or ``str``, the class of the RRset. *rdtype*, an ``int`` or ``str``, the type of the RRset. *covers*, an ``int`` or ``str``, the covers value of the RRset. The default is ``dns.rdatatype.NONE``. *deleting*, an ``int``, ``str``, or ``None``, the deleting value of the RRset. The default is ``None``. *create*, a ``bool``. If ``True``, create the RRset if it is not found. The created RRset is appended to *section*. *force_unique*, a ``bool``. If ``True`` and *create* is also ``True``, create a new RRset regardless of whether a matching RRset exists already. The default is ``False``. This is useful when creating DDNS Update messages, as order matters for them. *idna_codec*, a ``dns.name.IDNACodec``, specifies the IDNA encoder/decoder. If ``None``, the default IDNA 2003 encoder/decoder is used. Raises ``KeyError`` if the RRset was not found and create was ``False``. Returns a ``dns.rrset.RRset object``. �r����N)rq���r6���rk����strrh���� from_textr~���r<���rn���� rdatatype� RdataTyper����� rdataclass� RdataClassrH����getZ full_match�KeyErrorrp����RRset�append) r���ru���rn���r����r����r����r����r����r����r����r~����keyrp���r���r���r���� find_rrsetT��s<����4 zMessage.find_rrsetc �����������������C���s:���z|���||||||||| � } W�n�ty4���d} Y�n0�| S�)aj��Get the RRset with the given attributes in the specified section. If the RRset is not found, None is returned. *section*, an ``int`` section number, a ``str`` section name, or one of the section attributes of this message. This specifies the the section of the message to search. For example:: my_message.get_rrset(my_message.answer, name, rdclass, rdtype) my_message.get_rrset(dns.message.ANSWER, name, rdclass, rdtype) my_message.get_rrset("ANSWER", name, rdclass, rdtype) *name*, a ``dns.name.Name`` or ``str``, the name of the RRset. *rdclass*, an ``int`` or ``str``, the class of the RRset. *rdtype*, an ``int`` or ``str``, the type of the RRset. *covers*, an ``int`` or ``str``, the covers value of the RRset. The default is ``dns.rdatatype.NONE``. *deleting*, an ``int``, ``str``, or ``None``, the deleting value of the RRset. The default is ``None``. *create*, a ``bool``. If ``True``, create the RRset if it is not found. The created RRset is appended to *section*. *force_unique*, a ``bool``. If ``True`` and *create* is also ``True``, create a new RRset regardless of whether a matching RRset exists already. The default is ``False``. This is useful when creating DDNS Update messages, as order matters for them. *idna_codec*, a ``dns.name.IDNACodec``, specifies the IDNA encoder/decoder. If ``None``, the default IDNA 2003 encoder/decoder is used. Returns a ``dns.rrset.RRset object`` or ``None``. N)r����r����)r���ru���rn���r����r����r����r����r����r����r����rp���r���r���r���� get_rrset���s����3� zMessage.get_rrsetc�����������������C���s����t�|t�r|}|��|�}n,t�|t�r<|�j�|�}|��|�}n |��|�}tdd��|D���}|tj kr�|�j durt|d7�}|�jdur�|d7�}|S�)a���Returns the number of records in the specified section. *section*, an ``int`` section number, a ``str`` section name, or one of the section attributes of this message. This specifies the the section of the message to count. For example:: my_message.section_count(my_message.answer) my_message.section_count(dns.message.ANSWER) my_message.section_count("ANSWER") c�����������������s���s���|�]}t�d�t|��V��qdS�)r&���N)�maxr{���)�.0Zrrsr���r���r���� <genexpr>���r;���z(Message.section_count.<locals>.<genexpr>Nr&���)rq���r6���rk���r����rh���r����r~����sumr%���r/���r?���rC���)r���ru���r~����countr���r���r���� section_count���s���� zMessage.section_countc�����������������C���sJ���|�j�s dS�d}|�j�d�jD�]}|���}|t|�d�7�}q|�jrF|d7�}|S�)z:Compute the size required for the OPT RR, padding excludedr�����������)r?���rg����to_wirer{���rA���)r����size�option�wirer���r���r����_compute_opt_reserve��s����zMessage._compute_opt_reservec�����������������C���s*���|�j�s dS�t���}|�j��|��t|����S�)z)Compute the size required for the TSIG RRr���)rC���r_����BytesIOr����r{���rl���)r����fr���r���r����_compute_tsig_reserve��s ����zMessage._compute_tsig_reserver���)rF����max_size�multirG����prepend_length�prefer_truncationr[���rL���c�������������� ���K���s0��|du�r|�j�dur|�j�}|dkr6|�jdkr2|�j}nd}|dk�rDd}n|dkrPd}tj�|�j|�j||�}|����} |�| ��|�� ��} |�| ��z�|�j D�]}|�|j|j |j��q�|�jD�]}|jtjj|fi�|���q�|�jD�]}|jtjj|fi�|���q�|�jD�]}|jtjj|fi�|���q�W�nD�tjj�y^���|�rX|jtjjk��rZ|�jtjjO��_n��Y�n0�|����|�jdu�r�|�|�j|�j| | ��|����|�jdu�r tj� |�!��|�j"|�jd�t#t$�$���|�j%||�\}} |�j�&���|�j�'|��|�tjj|�j��|����|�r | |�_(|�!��}|�r,t)|��*dd�|�}|S�)a���Return a string containing the message in DNS compressed wire format. Additional keyword arguments are passed to the RRset ``to_wire()`` method. *origin*, a ``dns.name.Name`` or ``None``, the origin to be appended to any relative names. If ``None``, and the message has an origin attribute that is not ``None``, then it will be used. *max_size*, an ``int``, the maximum size of the wire format output; default is 0, which means "the message's request payload, if nonzero, or 65535". *multi*, a ``bool``, should be set to ``True`` if this message is part of a multiple message sequence. *tsig_ctx*, a ``dns.tsig.HMACTSig`` or ``dns.tsig.GSSTSig`` object, the ongoing TSIG context, used when signing zone transfers. *prepend_length*, a ``bool``, should be set to ``True`` if the caller wants the message length prepended to the message itself. This is useful for messages sent over TCP, TLS (DoT), or QUIC (DoQ). *prefer_truncation*, a ``bool``, should be set to ``True`` if the caller wants the message to be truncated if it would otherwise exceed the maximum length. If the truncation occurs before the additional section, the TC bit will be set. Raises ``dns.exception.TooBig`` if *max_size* was exceeded. Returns a ``bytes``. Nr���i����i���r'���Zbig)+rF���r@���r<���ZrendererZRendererr:���r=���r����Zreserver����rN���Zadd_questionrn���r����r����rR���Z add_rrsetr-���rS���r.���rT���r/���r3���ZTooBigru����TCZrelease_reservedr?���Zadd_optrA���Zwrite_headerrC����signZget_wirerB���r6���rJ���rD����clear�addrG���r{����to_bytes)r���rF���r����r����rG���r����r����r[����rZopt_reserveZtsig_reserverp���Znew_tsig�ctxr����r���r���r���r����(��sj����, � zMessage.to_wirec����������� ������C���s8���t�jjj�t�jjt�jj|||||||� }t�j�|�d|�S�rO���)r<����rdtypes�ANY�TSIGr����r����rp���� from_rdata) �keyname� algorithmZtime_signed�fudge�mac�original_id�errorrs���rC���r���r���r���� _make_tsig���s���� �zMessage._make_tsig�,��r;���)rB���r����r����r����� tsig_error� other_datar����rL���c����������� ��� ���C���s����t�|tjj�r|}|j}n`t|�r.||�|�}nLt�|t�rDtj�|�}|du�rXtt |��}||�}t�|t �rztj�|||�}||�_|du�r�|�j}|�� ||�jjd|dtjj|�jj��|||�|�_dS�)a���When sending, a TSIG signature using the specified key should be added. *key*, a ``dns.tsig.Key`` is the key to use. If a key is specified, the *keyring* and *algorithm* fields are not used. *keyring*, a ``dict``, ``callable`` or ``dns.tsig.Key``, is either the TSIG keyring or key to use. The format of a keyring dict is a mapping from TSIG key name, as ``dns.name.Name`` to ``dns.tsig.Key`` or a TSIG secret, a ``bytes``. If a ``dict`` *keyring* is specified but a *keyname* is not, the key used will be the first key in the *keyring*. Note that the order of keys in a dictionary is not defined, so applications should supply a keyname when a ``dict`` keyring is used, unless they know the keyring contains only one key. If a ``callable`` keyring is specified, the callable will be called with the message and the keyname, and is expected to return a key. *keyname*, a ``dns.name.Name``, ``str`` or ``None``, the name of this TSIG key to use; defaults to ``None``. If *keyring* is a ``dict``, the key must be defined in it. If *keyring* is a ``dns.tsig.Key``, this is ignored. *fudge*, an ``int``, the TSIG time fudge. *original_id*, an ``int``, the TSIG original id. If ``None``, the message's id is used. *tsig_error*, an ``int``, the TSIG error code. *other_data*, a ``bytes``, the TSIG other data. *algorithm*, a ``dns.name.Name`` or ``str``, the TSIG algorithm to use. This is only used if *keyring* is a ``dict``, and the key entry is a ``bytes``. Nr��������)rq���r<���rC����Keyrn����callabler����r�����next�iter�bytesrB���r:���r����r����Z mac_sizes) r���rB���r����r����r����r����r����r����r����r���r���r����use_tsig���s2����/ �zMessage.use_tsigc�����������������C���s���|�j�r|�j�jS�d�S�d�S�r���)rC���rn���r���r���r���r���r�������s����zMessage.keynamec�����������������C���s���|�j�r|�j�d�jS�d�S�d�S�rO���)rC���r����r���r���r���r����keyalgorithm���s����zMessage.keyalgorithmc�����������������C���s���|�j�r|�j�d�jS�d�S�d�S�rO���)rC���r����r���r���r���r���r�������s����zMessage.macc�����������������C���s���|�j�r|�j�d�jS�d�S�d�S�rO���)rC���r����r���r���r���r���r�������s����zMessage.tsig_errorc�����������������C���s ���t�|�j�S�r���)�boolrC���r���r���r���r����had_tsig��s����zMessage.had_tsigc�����������������C���s4���t�jjj�|t�jj|pd�}t�j�t�jjt |��|�S�)Nr���) r<���r����r�����OPTr����rp���r����rn����rootr6���)r=���rf���rg���r?���r���r���r���� _make_opt��s����zMessage._make_opt)rd���re���rf���r@���rg���rA���rL���c�����������������C���s����|du�s|du�rd}n|du�r"d}|dk�r8d|�_�d|�_nX|dM�}||d>�O�}|du�rXg�}|��|||�|�_�|du�rt|}||�_|dk�r�td��||�_dS�) a'��Configure EDNS behavior. *edns*, an ``int``, is the EDNS level to use. Specifying ``None``, ``False``, or ``-1`` means "do not use EDNS", and in this case the other parameters are ignored. Specifying ``True`` is equivalent to specifying 0, i.e. "use EDNS0". *ednsflags*, an ``int``, the EDNS flag values. *payload*, an ``int``, is the EDNS sender's payload field, which is the maximum size of UDP datagram the sender can handle. I.e. how big a response to this message can be. *request_payload*, an ``int``, is the EDNS payload size to use when sending this message. If not specified, defaults to the value of *payload*. *options*, a list of ``dns.edns.Option`` objects or ``None``, the EDNS options. *pad*, a non-negative ``int``. If 0, the default, do not pad; otherwise add padding bytes to make the message size a multiple of *pad*. Note that if padding is non-zero, an EDNS PADDING option will always be added to the message. NFr^���Tr���l����~�r7���zpad must be non-negative)r?���r@���r����r}���rA���)r���rd���re���rf���r@���rg���rA���r���r���r����use_edns��s$���� zMessage.use_ednsc�����������������C���s���|�j�r|�jd@�d?�S�dS�d�S�)Ni����r7���r^���)r?���re���r���r���r���r���rd���A��s����zMessage.ednsc�����������������C���s���|�j�r|�j�jS�dS�d�S�rO���)r?����ttlr���r���r���r���re���H��s����zMessage.ednsflagsc�����������������C���s$���|�j�r||�j�_n|r |��|�|�_�d�S�r���)r?���r����r����rP���r���r���r���re���O��s���� c�����������������C���s���|�j�r|�j�d�jS�dS�d�S�rO���)r?���rf���r���r���r���r���rf���V��s����zMessage.payloadc�����������������C���s���|�j�r|�j�d�jS�dS�d�S�)Nr���r���)r?���rg���r���r���r���r���rg���]��s����zMessage.options)�wantedrL���c�����������������C���s:���|r|��j�tjjO��_�n|�jr6|��j�ttjj��M��_�dS�)a!��Enable or disable 'DNSSEC desired' flag in requests. *wanted*, a ``bool``. If ``True``, then DNSSEC data is desired in the response, EDNS is enabled if required, and then the DO bit is set. If ``False``, the DO bit is cleared if EDNS is enabled. N)re���r<���r=���ZDOr?���r6���)r���r����r���r���r����want_dnssecd��s���� zMessage.want_dnssecc�����������������C���s���t�j�t|�j�t|�j��S�)zBReturn the rcode. Returns a ``dns.rcode.Rcode``. )r<���rc���rz���r6���r=���re���r���r���r���r���rc���r��s����z Message.rcode)rc���rL���c�����������������C���sL���t�j�|�\}}|��jdM��_|��j|O��_|��jdM��_|��j|O��_dS�)zUSet the rcode. *rcode*, a ``dns.rcode.Rcode``, is the rcode to set. i���i����N)r<���rc����to_flagsr=���re���)r���rc����valueZevaluer���r���r���� set_rcodey��s ����zMessage.set_rcodec�����������������C���s���t�j�t|�j��S�)zEReturn the opcode. Returns a ``dns.opcode.Opcode``. )r<���rb���rz���r6���r=���r���r���r���r���rb������s����zMessage.opcode)rb���rL���c�����������������C���s(���|��j�dM��_�|��j�tj�|�O��_�dS�)zZSet the opcode. *opcode*, a ``dns.opcode.Opcode``, is the opcode to set. i����N)r=���r<���rb���r����)r���rb���r���r���r���� set_opcode���s����zMessage.set_opcodec�����������������C���s���|S�r���r���)r���r����r���r���r����_get_one_rr_per_rrset���s����zMessage._get_one_rr_per_rrsetc�����������������C���s���||d�dfS�)NFr���)r���ru���rn���r����r����r���r���r����_parse_rr_header���s����zMessage._parse_rr_headerc�����������������C���sl���|t�jjkr.|tjks(|�js(|t�jjkr`t�n2|t�jj kr`|tjks\|t�jj ks\||d�kr`t�||d�dfS�)Nr&���F)r<���r����r����r%���r/���r?���rn���r����r���r����r����r���)r���ru���r����Zpositionrn���r����r����r���r���r����_parse_special_rr_header���s"������ �� � �z Message._parse_special_rr_header)N)NT)Nr���FNFF)T)Mr ���r���r���r ���r%���rh���r���r6���r����propertyr���r<���rp���r����rN����setterrR���rS���rT���rW���rY���rn����Namer����r���r����r���rX���rw���rx���r|���r~���rk���r�����NONE�SectionTyper����r����r����� IDNACodecr����r����r����r����r����r����r�����staticmethodr����rC���Zdefault_algorithmr���r����r����r����r����r����r�����DEFAULT_EDNS_PAYLOADr����rd����Optionr����re���rf���r���rg���r����rc���ZRcoder����rb���ZOpcoder����r����r����r����r���r���r���r���r8�������s,�� ��� �&&� �[� �C������� �d ��J��5 r8���c�������������������@���s8���e�Zd�ZdZejjeejj �e eejj �d�dd�ZdS�)�ChainingResulta���The result of a call to dns.message.QueryMessage.resolve_chaining(). The ``answer`` attribute is the answer RRSet, or ``None`` if it doesn't exist. The ``canonical_name`` attribute is the canonical name after all chaining has been applied (this is the same name as ``rrset.name`` in cases where rrset is not ``None``). The ``minimum_ttl`` attribute is the minimum TTL, i.e. the TTL to use if caching the data. It is the smallest of all the CNAME TTLs and either the answer TTL if it exists or the SOA TTL and SOA minimum values for negative answers. The ``cnames`` attribute is a list of all the CNAME RRSets followed to get to the canonical name. ��canonical_namerR����minimum_ttl�cnamesc�����������������C���s���||�_�||�_||�_||�_d�S�r���r����)r���r����rR���r����r����r���r���r���r������s����zChainingResult.__init__N) r ���r���r���r ���r<���rn���r����r���rp���r����r6���r���r���r���r���r���r���r�������s��� �r����c�������������������@���s,���e�Zd�Zed�dd�Zejjd�dd�ZdS�)�QueryMessagerK���c�����������������C���s���|�j�tj�j@�dkrt�t|�j�dkr,tjj�|�jd�}|j}tj j }d}d}g�}|tk��r(z,|��|�j ||j|j�}t||j �}W��q(W�qP�t�y$���|jtjjk�rzT|��|�j ||jtjj�}|�|��t||j �}|D�]}|j}�q�q�|d7�}W�Y�qPW�n�t�y���Y�Y��q(Y�n0�nY��q(Y�qP0�qP|tk�r6t�|����tjjk�rV|du�rVt�|du��r�|} z6|��|�j| |jtjj�} t|| j | d�j�}W��q�W�nB�t�y����z| ���} W�n �tjj�y����Y�Y��q�Y�n0�Y�n0��qdt||||�S�)a���Follow the CNAME chain in the response to determine the answer RRset. Raises ``dns.message.NotQueryResponse`` if the message is not a response. Raises ``dns.message.ChainTooLong`` if the CNAME chain is too long. Raises ``dns.message.AnswerForNXDOMAIN`` if the rcode is NXDOMAIN but an answer was found. Raises ``dns.exception.FormError`` if the question count is not 1. Returns a ChainingResult object. r���r&���N) r=���r<���ry���r!���r{���rN���r3���� FormErrorrn���r����ZMAX_TTL� MAX_CHAINr����rR���r����r�����minr����r����ZCNAMEr�����targetr"���rc���ZNXDOMAINr#���rS����SOAZminimum�parentZNoParentr����)r���rN����qnameZmin_ttlrR���r����r����Zcrrset�rdZaunameZsrrsetr���r���r����resolve_chaining���sf���� � � � zQueryMessage.resolve_chainingc�����������������C���s ���|�����jS�)a���Return the canonical name of the first name in the question section. Raises ``dns.message.NotQueryResponse`` if the message is not a response. Raises ``dns.message.ChainTooLong`` if the CNAME chain is too long. Raises ``dns.message.AnswerForNXDOMAIN`` if the rcode is NXDOMAIN but an answer was found. Raises ``dns.exception.FormError`` if the question count is not 1. )r����r����r���r���r���r���r������s����zQueryMessage.canonical_nameN) r ���r���r���r����r����r<���rn���r����r����r���r���r���r���r�������s���Kr����c������������������C���s���dd�l�}�d�S�rO���)Z dns.update)r<���r���r���r����_maybe_import_update-��s����r����c�����������������C���s2���|�t�jjkrtS�|�t�jjkr*t���t�jjS�tS�d�S�r���) r<���rb����QUERYr����ZUPDATEr�����updateZ UpdateMessager8���)rb���r���r���r����_message_factory_from_opcode6��s����r����c�������������������@���s:���e�Zd�ZdZddd�Zdd��Zdd ��Zd d��Zdd ��ZdS�)�_WireReaderai��Wire format reader. parser: the binary parser message: The message object being built initialize_message: Callback to set message parsing options question_only: Are we only reading the question? one_rr_per_rrset: Put each RR into its own RRset? keyring: TSIG keyring ignore_trailing: Ignore trailing junk at end of request? multi: Is this message part of a multi-message sequence? DNS dynamic updates. continue_on_error: try to extract as much information as possible from the message, accumulating MessageErrors in the *errors* attribute instead of raising them. FNc ����������� ������C���sH���t�j�|�|�_d�|�_||�_||�_||�_||�_||�_ ||�_ ||�_g�|�_d�S�r���) r<���r����ZParser�parserr����initialize_message� question_only�one_rr_per_rrset�ignore_trailingrB���r�����continue_on_errorrI���) r���r����r����r����r����r����rB���r����r����r���r���r���r���Q��s����z_WireReader.__init__c�������������� ���C���s~���|�j�dusJ��|�j�j|�}t|�D�]V}|�j�|�j�j�}|�j�d�\}}|�j��||||�\}}}}|�j�j||||ddd��q"dS�)zhRead the next *qcount* records from the wire data and add them to the question section. Nz!HHT�r����r����) r���r>����ranger�����get_namerF���� get_structr����r����)r���r~����qcountru����_r����r����r����r���r���r���� _get_questiong��s������z_WireReader._get_questionc�����������������C���s���|�j��t||�jj���d�S�r���)rI���r����r1���r�����current)r����er���r���r���� _add_errorw��s����z_WireReader._add_errorc�����������������C���s���|�j�dusJ��|�j�j|�}|�j}t|�D��]�}|�jj}|�j���}|�j�jdur\|�|�j�j�}n|}|�j� d�\} } }}| t jjt jj fv�r�|�j��||||| | �\} } } }n|�j��||| | �\} } } }|�jj}�z�|r�|dkr�t jj�d}t jj}nN|�j�|��(�t j�| | |�j|�j�j�}W�d����n1��s,0����Y��|���}|�j�j�rZ| t jjk�rZd}| t jjk�r�t j�|||�|�j�_�n&| t jj k�rh|�jdu��r�td��t|�jt��r�|�j� |�}t|t!��r�t j"�#|||j$�}n"t%|�j��r�|��|�j�|�}n|�j}|du��rtd|���||�j�_t j"�&|�jj'|||t(t)�)���|�j�j*||�j�j+|�j,� |�j�_+t j�|d|�|�j�_"n>|�j��-||| | || d|�}|du�r�|dk�r�d}|�.||��W�q(�t/�y��}�z2|�j0�r�|��1|��|�j�2||���n��W�Y�d}~q(d}~0�0�q(dS�)z�Read the next I{count} records from the wire data and add them to the specified section. section_number: the section of the message to which to add records count: the number of records to read Nz!HHIHr���Tz"got signed message without keyringzkey '%s' unknowni���)3r���r>���r����r����r����r��r����rF���rZ���r����r<���r����r����r����r����r����r3���r����r����Zrestrict_to�rdataZfrom_wire_parserr����rE���r����rp���r����r?���rB���r���rq����dictr����r����rC���r����r����r����Zvalidater����r6���rJ���rD���rG���r����r����r����r5���r����r���seek)r���r~���r����ru���r����rt���Zrr_startZ absolute_namern���r����r����r����Zrdlenr�����emptyZrdata_startr����r����r����rp���r��r���r���r����_get_sectionz��s����� ��� � �$ �� z_WireReader._get_sectionc����������� ��� ���C���s@��|�j����dk�rt�|�j��d�\}}}}}}ttj�|��}||d�|�_tj � |�|�j_ |��|�j��|�j�|�j �|�_ z�|��tj|��|�jr�|�jW�S�|��tj|��|��tj|��|��tj|��|�js�|�j����dkr�t�|�jr�|�jjr�|�jjs�|�jj�|�j�j��W�n<�t�y8�}�z"|�j�r"|��|��n��W�Y�d}~n d}~0�0�|�jS�)zNRead a wire format DNS message and build a dns.message.Message object.����z!HHHHHHr9���r���N) r����Z remainingr���r����r����r<���rb���rz���r���r=����Flagr����r����r����r���r%���r,���r����r��r-���r.���r/���r����r���r����rG���r����r����r����r5���r����r��) r���r:���r=���r����ZancountZaucountZadcount�factoryr��r���r���r����read���s8������z_WireReader.read)FFFNFF) r ���r���r���r ���r���r���r��r��r��r���r���r���r���r����@��s���������� `r����r;���F) r����rB���rD���rE���rF���rG���r����r����r����r�����raise_on_truncationr����rL���c�������������� ������s�����du�rd������fdd�}t�|�|||| |||�} z| ���}W�n@�tjjy����| jrz| jjtjj@�rz| rzt| jd��n��Y�n0�|jtjj@�r�| r�t|d��|r�| j |_ |S�)a���Convert a DNS wire format message into a message object. *keyring*, a ``dns.tsig.Key`` or ``dict``, the key or keyring to use if the message is signed. *request_mac*, a ``bytes`` or ``None``. If the message is a response to a TSIG-signed request, *request_mac* should be set to the MAC of that request. *xfr*, a ``bool``, should be set to ``True`` if this message is part of a zone transfer. *origin*, a ``dns.name.Name`` or ``None``. If the message is part of a zone transfer, *origin* should be the origin name of the zone. If not ``None``, names will be relativized to the origin. *tsig_ctx*, a ``dns.tsig.HMACTSig`` or ``dns.tsig.GSSTSig`` object, the ongoing TSIG context, used when validating zone transfers. *multi*, a ``bool``, should be set to ``True`` if this message is part of a multiple message sequence. *question_only*, a ``bool``. If ``True``, read only up to the end of the question section. *one_rr_per_rrset*, a ``bool``. If ``True``, put each RR into its own RRset. *ignore_trailing*, a ``bool``. If ``True``, ignore trailing junk at end of the message. *raise_on_truncation*, a ``bool``. If ``True``, raise an exception if the TC bit is set. *continue_on_error*, a ``bool``. If ``True``, try to continue parsing even if errors occur. Erroneous rdata will be ignored. Errors will be accumulated as a list of MessageError objects in the message's ``errors`` attribute. This option is recommended only for DNS analysis tools, or for use in a server as part of an error handling path. The default is ``False``. Raises ``dns.message.ShortHeader`` if the message is less than 12 octets long. Raises ``dns.message.TrailingJunk`` if there were octets in the message past the end of the proper DNS message, and *ignore_trailing* is ``False``. Raises ``dns.message.BadEDNS`` if an OPT record was in the wrong section, or occurred more than once. Raises ``dns.message.BadTSIG`` if a TSIG record was not the last record of the additional data section. Raises ``dns.message.Truncated`` if the TC flag is set and *raise_on_truncation* is ``True``. Returns a ``dns.message.Message``. Nr;���c��������������������s����|�_��|�_��|�_�|�_d�S�r���)rD���rE���rF���rG����r����rF���rD���rG���rE���r���r���r����F��s����z%from_wire.<locals>.initialize_messager��) r����r��r<���r3���r����r���r=���r����r���rI���)r����rB���rD���rE���rF���rG���r����r����r����r����r ��r����r�����reader�mr���r��r���� from_wire���s:����F� ��� r��c�������������������@���sB���e�Zd�ZdZddd�Zdd��Zd d ��Zdd��Zd d��Zdd��Z dS�)�_TextReaderat��Text format reader. tok: the tokenizer. message: The message object being built. DNS dynamic updates. last_name: The most recently read name when building a message object. one_rr_per_rrset: Put each RR into its own RRset? origin: The origin for relative names relativize: relativize names? relativize_to: the origin to relativize to. FNTc�����������������C���sh���d�|�_�tjj||d�|�_d�|�_||�_||�_||�_||�_ d�|�_ d|�_d|�_t |�_d�|�_tjj|�_d|�_d�S�)Nr����r^���r���)r���r<���Z tokenizer� Tokenizer�tok� last_namer����rF���rZ���� relativize_tor:���rd���re���r����rf���rc���rb���r����r=���)r����textr����r����rF���rZ���r��r���r���r���r���x��s���� z_TextReader.__init__c�����������������C���s���|�j����}|j}|dkr(|�j����|�_�nJ|dkrl|�j����}|���sP|�j��|��qh|�jtj� |j�B�|�_q0�n|dkr�|�j����|�_ |�j|�j d>�B�|�_n�|dkr�|�j dk�r�d|�_ |�j����}|���s�|�j��|��q�|�jtj�|j�B�|�_q�n�|dk�r|�j����|�_ |�j dk��rrd|�_ nb|dk�rJ|�j����}tj� |�|�_|�jtj�|�j�B�|�_n(|d k�rn|�j����}tj� |�|�_nt�|�j�����d S�)z5Process one line from the text format header section.r:���r=���rd���r7���Zeflagsr���rf���rb���rc���N)r��r����r����Zget_intr:���� is_identifier�ungetr=���r<���r����rd���re���Zedns_from_textrf���Z get_stringrb���r����rc���r����get_eol)r���r�����tokenZwhatr��r���r���r����_header_line���sD���� z_TextReader._header_linec�����������������C���s��|�j�j|�}|�jjdd�}|���s>|�j�||�j�j|�j|�j�|�_ |�j }|du�rPt �|�j���}|���sjtj j�z,tj�|j�}|�j���}|���s�tj j�W�n6�tj jy����tj j�Y�n�ty����tjj}Y�n0�tj�|j�}|�j��||||�\}}}}|�j�j||||ddd��|�j����dS�)z7Process one line from the text format question section.T�Zwant_leadingNr����)r���r>���r��r����� is_whitespace�as_namerF���rZ���r��r��r$���r��r<���r3����SyntaxErrorr����r����r����r5����INr����r����r����r��)r���r~���ru���r��rn���r����r����r����r���r���r����_question_line���s:����� ��z_TextReader._question_linec����������� ��� ���C���s��|�j�j|�}|�jjdd�}|���s>|�j�||�j�j|�j|�j�|�_ |�j }|du�rPt �|�j���}|���sjtj j�z*t|jd�}|�j���}|���s�tj j�W�n2�tj jy����tj j�Y�n�ty����d}Y�n0�z,tj�|j�}|�j���}|���s�tj j�W�n:�tj j�y���tj j�Y�n�t�y.���tjj}Y�n0�tj�|j�}|�j��||||�\}}}} |�j���}| �rz|����sztj j�| �s�|����r�tj j�|����s�|�j�|��tj�|||�j|�j�j|�j|�j�} | ���}nd} tjj}|�j��||||||d|�j�}| du�r|�| |��dS�)zfProcess one line from the text format answer, authority, or additional data sections. Tr��Nr���) r���r>���r��r����r��r ��rF���rZ���r��r��r$���r��r<���r3���r!��r6���r����r5���r����r����r"��r����r����� is_eol_or_eofZ UnexpectedEndr��r��r����r����r����r����r����) r���r~���ru���r��rn���r����r����r����r����r��r����r����rp���r���r���r����_rr_line���s������ � � � z_TextReader._rr_linec�����������������C���s`���t�|�j�}||�jd�}|�j|_|�jdkr<|�|�j|�j|�j��|�jrN|� |�j��|�j r\|�j |_ |S�)Nr9���r���)r����rb���r:���r=���rd���r����re���rf���rc���r����rF���)r���r��r���r���r���r���� _make_message'��s���� z_TextReader._make_messagec�����������������C���s����|�j�}d}|�j�dd�}|���r"q�|���r�|j���}|dkrB|�j�}|�jrP|�j}n|����}zB|j � |�}|�js�||�_|�|�j�|�_|t jkr�|�j}n|�j}W�n�ty����Y�n0�|�j����q |�j�|��||��q |�js�|����|�_|�jS�)zNRead a text format DNS message and build a dns.message.Message object.NTZHEADER)r��r��r����r$��Z is_commentr�����upperr���r&��rh���r����r����r����r%���r,���r#��r%��r5���r��r��)r���Zline_methodr~���r���ur���r���r���r���r��3��s>���� � z_TextReader.read)FNTN) r ���r���r���r ���r���r��r#��r%��r&��r��r���r���r���r���r��k��s�������� )#Kr��T)r��r����r����rF���rZ���r��rL���c�����������������C���s���t�|�|||||�}|���S�)a��Convert the text format message into a message object. The reader stops after reading the first blank line in the input to facilitate reading multiple messages from a single file with ``dns.message.from_file()``. *text*, a ``str``, the text format message. *idna_codec*, a ``dns.name.IDNACodec``, specifies the IDNA encoder/decoder. If ``None``, the default IDNA 2003 encoder/decoder is used. *one_rr_per_rrset*, a ``bool``. If ``True``, then each RR is put into its own rrset. The default is ``False``. *origin*, a ``dns.name.Name`` (or ``None``), the origin to use for relative names. *relativize*, a ``bool``. If true, name will be relativized. *relativize_to*, a ``dns.name.Name`` (or ``None``), the origin to use when relativizing names. If not set, the *origin* value will be used. Raises ``dns.message.UnknownHeaderField`` if a header is unknown. Raises ``dns.exception.SyntaxError`` if the text is badly formed. Returns a ``dns.message.Message object`` )r��r��)r��r����r����rF���rZ���r��r��r���r���r���r����a��s����*�r����)r����r����r����rL���c�����������������C���sZ���t�|�t�rt|��}n t�|��}|�}�t|�||�W��d����S�1�sD0����Y��dsVJ��dS�)a���Read the next text format message from the specified file. Message blocks are separated by a single blank line. *f*, a ``file`` or ``str``. If *f* is text, it is treated as the pathname of a file to open. *idna_codec*, a ``dns.name.IDNACodec``, specifies the IDNA encoder/decoder. If ``None``, the default IDNA 2003 encoder/decoder is used. *one_rr_per_rrset*, a ``bool``. If ``True``, then each RR is put into its own rrset. The default is ``False``. Raises ``dns.message.UnknownHeaderField`` if a header is unknown. Raises ``dns.exception.SyntaxError`` if the text is badly formed. Returns a ``dns.message.Message object`` NF)rq���r�����open� contextlib�nullcontextr����)r����r����r�����cmr���r���r���� from_file���s���� *r-��)r����r����r����r����r����re���rf���r@���rg���r����r:���r=���rA���rL���c �����������������C���s����t�|�t�rtjj|�| d�}�tjj�|�}tjj �|�}t | d�} tj�|�| _| j | j|�||ddd��i�}|durz||d<�|dur�||d<�|dur�||d<�|dur�||d <�|r�|du�r�d }||d<�||d<�| jf�i�|���| �|��| S�) a���Make a query message. The query name, type, and class may all be specified either as objects of the appropriate type, or as strings. The query will have a randomly chosen query id, and its DNS flags will be set to dns.flags.RD. qname, a ``dns.name.Name`` or ``str``, the query name. *rdtype*, an ``int`` or ``str``, the desired rdata type. *rdclass*, an ``int`` or ``str``, the desired rdata class; the default is class IN. *use_edns*, an ``int``, ``bool`` or ``None``. The EDNS level to use; the default is ``None``. If ``None``, EDNS will be enabled only if other parameters (*ednsflags*, *payload*, *request_payload*, or *options*) are set. See the description of dns.message.Message.use_edns() for the possible values for use_edns and their meanings. *want_dnssec*, a ``bool``. If ``True``, DNSSEC data is desired. *ednsflags*, an ``int``, the EDNS flag values. *payload*, an ``int``, is the EDNS sender's payload field, which is the maximum size of UDP datagram the sender can handle. I.e. how big a response to this message can be. *request_payload*, an ``int``, is the EDNS payload size to use when sending this message. If not specified, defaults to the value of *payload*. *options*, a list of ``dns.edns.Option`` objects or ``None``, the EDNS options. *idna_codec*, a ``dns.name.IDNACodec``, specifies the IDNA encoder/decoder. If ``None``, the default IDNA 2003 encoder/decoder is used. *id*, an ``int`` or ``None``, the desired query id. The default is ``None``, which generates a random query id. *flags*, an ``int``, the desired query flags. The default is ``dns.flags.RD``. *pad*, a non-negative ``int``. If 0, the default, do not pad; otherwise add padding bytes to make the message size a multiple of *pad*. Note that if padding is non-zero, an EDNS PADDING option will always be added to the message. Returns a ``dns.message.QueryMessage`` r����r9���Tr����Nre���rf���r@���rg���r���rd���rA���)rq���r����r<���rn���r����r����r����r����r����r����r����r=���r ��r����rN���r����r����)r����r����r����r����r����re���rf���r@���rg���r����r:���r=���rA���r��r���r���r���r���� make_query���s.����F r.���� ��r����)�query�recursion_available�our_payloadr����r����rA���rL���c����������� ��� ���C���s����|�j�tj�j@�rtj�d��t|�����}||�jd�}tj�j|�j�tj�j@�B�|_�|r`|�j�tj�j O��_�|� |������t|�j�|_|�j dkr�|du�r�d}|�jD�]}|jtj jjkr�d}q�|jdd||�j|d��|�jr�|�|�j|�j|d|d|�j��|�j|_|S�)a���Make a message which is a response for the specified query. The message returned is really a response skeleton; it has all of the infrastructure required of a response, but none of the content. The response's question section is a shallow copy of the query's question section, so the query's question RRsets should not be changed. *query*, a ``dns.message.Message``, the query to respond to. *recursion_available*, a ``bool``, should RA be set in the response? *our_payload*, an ``int``, the payload size to advertise in EDNS responses. *fudge*, an ``int``, the TSIG time fudge. *tsig_error*, an ``int``, the TSIG error. *pad*, a non-negative ``int`` or ``None``. If 0, the default, do not pad; otherwise if not ``None`` add padding bytes to make the message size a multiple of *pad*. Note that if padding is non-zero, an EDNS PADDING option will always be added to the message. If ``None``, add padding following RFC 8467, namely if the request is padded, pad the response to 468 otherwise do not pad. Returns a ``dns.message.Message`` object whose specific class is appropriate for the query. For example, if query is a ``dns.update.UpdateMessage``, response will be too. z&specified query message is not a queryr9���r���Ni���)rA���r;���)r=���r<���ry���r3���r����r����rb���r:����RDZRAr�����listrN���rd���rg���ZotypeZ OptionTypeZPADDINGr����rf���r����r����rB���r����r����r����rD���) r0��r1��r2��r����r����rA���r��Zresponser����r���r���r���� make_response��s8����$ � r5��)Nr;���FNNFFFFFF)NFNTN)NF)Fr/��r����r���N)[r ���r*��r_���rJ����typingr���r���r���r���r���r���Zdns.ednsr<���Zdns.entropyZdns.enumZ dns.exceptionZ dns.flagsZdns.nameZ dns.opcodeZ dns.rcodeZ dns.rdataZdns.rdataclassZ dns.rdatatypeZdns.rdtypes.ANY.OPTZdns.rdtypes.ANY.TSIGZdns.rendererZ dns.rrsetZdns.tsigZdns.ttlZdns.wirer3���r����r���r���ZDNSExceptionr���r���r���r���r���r!���r"���r#���r!��r$����enum�IntEnumr%���r1���r����r����r6���rn���r����r����r����r����r����ZIndexKeyTyperp���r����Z IndexTyper����r����r8���r����r����r����r����r����r����r����rC���ZHMACTSigZGSSTSigr��r��r����r����r-��r"��r=���r3��rd���r����r.��r5��r,���r-���r.���r/���r���r���r���r����<module>���s8�� ��������* ] �@������������ �n�y������ �2��� �&� �d�������E