§
    þÊíjÀ  ã            !       ó.  — d Z ddlmZmZmZmZmZ ddlZddlZddl	Z	ddl
Z
ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZ	 ddlZddl m!Z! ddl"m#Z# dZ$n# e%$ r dZ$Y nw xY wdZ&dZ'	 ddl(Z(dZ&	  e(j)        d¬¦  «        5  dZ'ddd¦  «         n# 1 swxY w Y   n# e*$ r Y nw xY wn# e%$ r Y nw xY we$pe&Z+	 ddl,Z,n# e%$ r  G d	„ d
¦  «        Z,Y nw xY wej        Z- G d„ dej.        j/        ¦  «        Z0 G d„ dej.        j1        ¦  «        Z2 G d„ dej.        j/        ¦  «        Z3 G d„ dej.        j/        ¦  «        Z4ej5        j6        Z6d„ Z7d„ Z8d„ Z9 e:ed¦  «        rej;        a<nej=        a<d„ Z>d„ Z?d„ Z@d„ ZA	 d]d„ZBd^d„ZC	 	 	 	 	 	 	 	 	 	 	 d_dejD        jE        d eFd!eeG         d"eHd#eeF         d$eHd%eId&eId'ee         d(eFd)eId*eeF         d+eeIeFf         d,ejD        jE        fd-„ZJd.„ ZKd/„ ZL	 d`d0ed1eejD        jE        eMf         d2ed3eeG         d,eeHeGf         f
d4„ZN	 	 	 	 	 	 	 	 dad0ed2ee         d3eeG         d6eId%eId7eeejO        jP        ejQ        jR        f                  d8eeM         d&eId9eId,efd:„ZS	 	 	 	 	 	 	 	 	 dbdejD        jE        d eFd!eeG         d"eHd#eeF         d$eHd6eId%eId&eId9eId0ee         d,ejD        jE        fd<„ZT	 	 	 	 	 	 	 	 	 dcdejD        jE        d eFd!eeG         d"eHd#eeF         d$eHd6eId%eId&eId=ee         d>ee         d,eejD        jE        eIf         fd?„ZUd@„ ZVdA„ ZW	 d`d0ed1eejD        jE        eMf         d3eeG         d,eeHeGf         fdB„ZX	 	 	 	 	 ddd0ed3eeG         d%eId7eeejO        jP        ejQ        jR        f                  d8eeM         d&eId,eejD        jE        eGf         fdC„ZYdD„ ZZ	 	 	 	 	 	 	 dedejD        jE        d eFd!eeG         d"eHd#eeF         d$eHd%eId&eId0ee         d,ejD        jE        fdE„Z[dF„ Z\	 	 	 	 	 	 	 	 	 dfdejD        jE        d eFd!eeG         d"eHd#eeF         d$eHd%eId&eId0ee,j]                 dHee,j^                 dIeeF         d,ejD        jE        fdJ„Z_	 	 	 	 	 	 	 	 dgdejD        jE        d eFd!eeG         d"eHd#eeF         d$eHd%eId&eIdKeej`        ja                 d+eeIeFf         d,ejD        jE        fdL„Z`ejb        jc        ejd        je        dd;ddddddddejQ        jf        fd eFdMeejO        jP        eFf         dNeejb        jg        eFf         dOeejd        jh        eFf         d!eeG         d"eHd7eeejO        jP        ejQ        jR        f                  dPeeejO        jP        eFf                  dQeIdReeG         d#eeF         d$eHdSeHdTeIdUeejO        jP        eFf         d,ef dV„Z5 G dW„ dXe	ji        ¦  «        Zjdd;ddddejjk        fd eFdYejl        jm        dZeejD        jE                 d"eHd!eeG         dReeG         d#eeF         d$eHd[ejd,dfd\„ZndS )hzTalk to a DNS server.é    )ÚAnyÚDictÚOptionalÚTupleÚUnionN)ÚSourceAddressAdapter)ÚHostHeaderSSLAdapterTF)Úhttp2c                   ó�   — e Zd Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ d¦  «        Z G d„ d¦  «        Zed	„ ¦   «         Z	d
S )Ússlc                   ó   — e Zd ZdS )ússl.WantReadExceptionN©Ú__name__Ú
__module__Ú__qualname__© ó    ú+/usr/lib/python3/dist-packages/dns/query.pyÚWantReadExceptionr   M   ó   € € € € € ØˆDr   r   c                   ó   — e Zd ZdS )ússl.WantWriteExceptionNr   r   r   r   ÚWantWriteExceptionr   P   r   r   r   c                   ó   — e Zd ZdS )ússl.SSLContextNr   r   r   r   Ú
SSLContextr   S   r   r   r   c                   ó   — e Zd ZdS )ússl.SSLSocketNr   r   r   r   Ú	SSLSocketr   V   r   r   r    c                 ó    — t          d¦  «        ‚)Nzno ssl support)Ú	Exception)ÚclsÚargsÚkwargss      r   Úcreate_default_contextzssl.create_default_contextY   s   € åÐ,Ñ-Ô-Ð-r   N)
r   r   r   r"   r   r   r   r    Úclassmethodr&   r   r   r   r   r   L   sÓ   € € € € € ð	ð 	ð 	ð 	ð 	 	ñ 	ô 	ð 	ð	ð 	ð 	ð 	ð 	 ñ 	ô 	ð 	ð	ð 	ð 	ð 	ð 	ñ 	ô 	ð 	ð	ð 	ð 	ð 	ð 	ñ 	ô 	ð 	ð 
ð	.ð 	.ñ 
Œð	.ð 	.ð 	.r   r   c                   ó   — e Zd ZdZdS )ÚUnexpectedSourcez=A DNS query response came from an unexpected address or port.N©r   r   r   Ú__doc__r   r   r   r)   r)   c   s   € € € € € ØGÐGÐGÐGr   r)   c                   ó   — e Zd ZdZdS )ÚBadResponsez<A DNS query response does not respond to the question asked.Nr*   r   r   r   r-   r-   g   s   € € € € € ØFÐFÐFÐFr   r-   c                   ó   — e Zd ZdZdS )ÚNoDOHzPDNS over HTTPS (DOH) was requested but the requests module is not
    available.Nr*   r   r   r   r/   r/   k   ó   € € € € € ðð ð ð r   r/   c                   ó   — e Zd ZdZdS )ÚNoDOQzNDNS over QUIC (DOQ) was requested but the aioquic module is not
    available.Nr*   r   r   r   r2   r2   p   r0   r   r2   c                 óB   — t          j         ¦   «         }| €|d fS ||| z   fS ©N)Útime)ÚtimeoutÚnows     r   Ú_compute_timesr8   y   s+   € Ý
Œ)‰+Œ+€CØ€Ø�Tˆ{Ðà�S˜7‘]Ð#Ð#r   c                 ó¶  — |r4t          | t          j        ¦  «        r|                      ¦   «         dk    rdS t	          ¦   «         }d}|r|t
          j        z  }|r|t
          j        z  }|r|                     | |¦  «         |€d }n-|t          j	        ¦   «         z
  }|dk    rt          j        j        ‚|                     |¦  «        st          j        j        ‚d S )Nr   Tç        )Ú
isinstancer   r    ÚpendingÚ_selector_classÚ	selectorsÚ
EVENT_READÚEVENT_WRITEÚregisterr5   ÚdnsÚ	exceptionÚTimeoutÚselect)ÚfdÚreadableÚwritableÚ_Ú
expirationÚselÚeventsr6   s           r   Ú	_wait_forrM   �   sæ   € ð ð •J˜r¥3¤=Ñ1Ô1ð °b·j²j±l´lÀQÒ6FÐ6FØˆtÝ
Ñ
Ô
€CØ€FØð 'Ø•)Ô&Ñ&ˆØð (Ø•)Ô'Ñ'ˆØð !Ø�Š�R˜Ñ Ô Ð ØÐØˆˆà�tœy™{œ{Ñ*ˆØ�cŠ>ˆ>Ý”-Ô'Ð'Ø�:Š:�gÑÔð $ÝŒmÔ#Ð#ð$ð $r   c                 ó
   — | a d S r4   )r=   )Úselector_classs    r   Ú_set_selector_classrP   �   s   € ð
 %€O€O€Or   ÚPollSelectorc                 ó,   — t          | ddd|¦  «         d S )NTF©rM   ©ÚsrJ   s     r   Ú_wait_for_readablerV   ±   s   € Ýˆa��u˜d JÑ/Ô/Ð/Ð/Ð/r   c                 ó,   — t          | ddd|¦  «         d S )NFTrS   rT   s     r   Ú_wait_for_writablerX   µ   s   € Ýˆa�˜˜d JÑ/Ô/Ð/Ð/Ð/r   c                 ó  — 	 t           j                             | |d         ¦  «        }t           j                             | |d         ¦  «        }n# t           j        j        $ r Y dS w xY w||k    o|dd …         |dd …         k    S )Nr   Fé   )rB   ÚinetÚ	inet_ptonrC   ÚSyntaxError)ÚafÚa1Úa2Ún1Ún2s        r   Ú_addresses_equalrc   ¹   sŠ   € ðÝŒX×Ò  B q¤EÑ*Ô*ˆÝŒX×Ò  B q¤EÑ*Ô*ˆˆøÝŒ=Ô$ð ð ð Øˆuˆuðøøøà�Š8Ð(˜˜1˜2˜2œ " Q R R¤&Ò(Ð(s   ‚AA ÁA'Á&A'c                 óØ   — |sdS t          | ||¦  «        s;t          j                             |d         ¦  «        r|dd …         |dd …         k    rdS |rdS t	          d|› d|› �¦  «        ‚)NTr   rZ   Fzgot a response from z instead of )rc   rB   r[   Úis_multicastr)   )r^   Úfrom_addressÚdestinationÚignore_unexpecteds       r   Ú_matches_destinationri   Å   s—   € ð ð ØˆtÝ˜˜L¨+Ñ6Ô6ð ÝŒ×Ò˜k¨!œnÑ-Ô-ðØ2>¸q¸r¸rÔ2BÀkÐRSÐRTÐRTÄoÒ2UÐ2UàˆtØ	ð ØˆuÝ
ØJ˜|ÐJÐJ¸[ÐJÐJñô ð r   c                 óø  — d }d }	 t           j                             | ¦  «        }| }n# t          $ r |r‚ Y nw xY w|r9t           j                             |¦  «        }|r||k    rt	          d¦  «        ‚n|}|r7|s5|t
          j        k    rd}n"|t
          j        k    rd}nt	          d¦  «        ‚|r"t           j                             ||f|¦  «        }|r"t           j                             ||f|¦  «        }|||fS )Nz5different address families for source and destinationz0.0.0.0z::z3source_port specified but address family is unknown)	rB   r[   Úaf_for_addressr"   Ú
ValueErrorÚsocketÚAF_INETÚAF_INET6Úlow_level_address_tuple)ÚwhereÚportÚsourceÚsource_portÚwhere_must_be_addressr^   rg   Úsafs           r   Ú_destination_and_sourcerw   Õ   sS  € ð
 
€BØ€KðÝŒX×$Ò$ UÑ+Ô+ˆØˆˆøÝð ð ð Ø ð 	Øð	ð 	ðøøøð ð ÝŒh×%Ò% fÑ-Ô-ˆØð 		à�bŠyˆyÝ ØPñô ð ð ð ˆBØð 	T˜6ð 	Tð •”ÒÐØˆFˆFØ•6”?Ò"Ð"ØˆFˆFåÐRÑSÔSÐSð ð PÝ”h×6Ò6¸ÀTÐ7JÈBÑOÔOˆØð MÝ”×1Ò1°6¸;Ð2GÈÑLÔLˆØ�˜VÐ$Ð$s   †!( ¨8·8c                 óú   — t          | |¦  «        }	 |                     d¦  «         |�|                     |¦  «         |r|                     |d|¬¦  «        S |S # t          $ r |                     ¦   «          ‚ w xY w)NF)Údo_handshake_on_connectÚserver_hostname)Úsocket_factoryÚsetblockingÚbindÚwrap_socketr"   Úclose)r^   Útypers   Ússl_contextrz   rU   s         r   Ú_make_socketr‚     s�   € Ý�r˜4Ñ Ô €AðØ	�Š�eÑÔÐØÐØ�FŠF�6‰NŒNˆNØð 	à×*Ò*ØØ(-Ø /ð +ñ ô ð ð ˆHøÝð ð ð Ø	�Š‰	Œ	ˆ	Øðøøøs   ’AA ÁA Á A:é»  ú
/dns-queryÚqrq   r6   rr   rs   rt   Úone_rr_per_rrsetÚignore_trailingÚsessionÚpathÚpostÚbootstrap_addressÚverifyÚreturnc           	      óš  — t           st          d¦  «        ‚t          }|                      ¦   «         }t	          ||||d¦  «        \  }}}d}d}ddi}|�P|t
          j        k    rd                     |||	¦  «        }nž|t
          j        k    rd                     |||	¦  «        }nv|�rd}t          j
                             |¦  «        }|j        €t          d¦  «        ‚|j        |d	<   |                     |j        |¦  «        }t          rt!          ¦   «         }n|}|�Bt          r%|d
k    rt#          j        |d
         |¬¦  «        }nd}t          rt'          |¦  «        }|r8t          rt)          |t"          j        ¦  «        }nd}|r|st          d¦  «        ‚n|}|st          st          d¦  «        ‚|rt-          j        |¦  «        }n>|rt#          j        dt0          ||¬¦  «        }nt2          j                             ¦   «         }|5 }|r|s|                     ||¦  «         |
ri|                     dt=          t?          |¦  «        ¦  «        dœ¦  «         |r|                      ||||¬¦  «        }n�|                      |||||¬¦  «        }nutC          j"        |¦  «         #                    d¦  «        }|r0| $                    ¦   «         }| %                    |||d|i¬¦  «        }n| %                    ||||d|i¬¦  «        }ddd¦  «         n# 1 swxY w Y   |j&        dk     s|j&        dk    r.t          d                     ||j&        |j'        ¦  «        ¦  «        ‚tP          j)         *                    |j'        | j+        | j,        ||¬¦  «        }|j-         .                    ¦   «         |_/        |  0                    |¦  «        stb          ‚|S )aÒ  Return the response obtained after sending a query via DNS-over-HTTPS.

    *q*, a ``dns.message.Message``, the query to send.

    *where*, a ``str``, the nameserver IP address or the full URL. If an IP address is
    given, the URL will be constructed using the following schema:
    https://<IP-address>:<port>/<path>.

    *timeout*, a ``float`` or ``None``, the number of seconds to wait before the query
    times out. If ``None``, the default, wait forever.

    *port*, a ``int``, the port to send the query to. The default is 443.

    *source*, a ``str`` containing an IPv4 or IPv6 address, specifying the source
    address.  The default is the wildcard address.

    *source_port*, an ``int``, the port from which to send the message. The default is
    0.

    *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
    received message.

    *session*, an ``httpx.Client`` or ``requests.session.Session``.  If provided, the
    client/session to use to send the queries.

    *path*, a ``str``. If *where* is an IP address, then *path* will be used to
    construct the URL to send the DNS query to.

    *post*, a ``bool``. If ``True``, the default, POST method will be used.

    *bootstrap_address*, a ``str``, the IP address to use to bypass the system's DNS
    resolver.

    *verify*, a ``bool`` or ``str``.  If a ``True``, then TLS certificate verification
    of the server is done using the default CA bundle; if ``False``, then no
    verification is done; if a `str` then it specifies the path to a certificate file or
    directory which will be used for verification.

    Returns a ``dns.message.Message``.
    z(Neither httpx nor requests is available.FNÚacceptzapplication/dns-messagezhttps://{}:{}{}zhttps://[{}]:{}{}zDoH URL has no hostnameÚHostr   )Úlocal_addressrŒ   zGSession is httpx, but httpx cannot be used for the requested operation.zCCannot use httpx for this operation, and requests is not available.T)Úhttp1r
   rŒ   Ú	transport)zcontent-typezcontent-length)ÚheadersÚcontentr6   )r”   Údatar6   rŒ   ó   =rB   )r”   r6   Úparams)r”   r6   rŒ   r˜   éÈ   i+  z2{} responded with status code {}
Response body: {}©ÚkeyringÚrequest_macr†   r‡   )2Úhave_dohr/   Ú_have_httpxÚto_wirerw   rm   rn   Úformatro   ÚurllibÚparseÚurlsplitÚhostnamerl   ÚreplaceÚ_have_requestsr	   ÚhttpxÚHTTPTransportr   r;   ÚClientÚ
contextlibÚnullcontextÚ_have_http2ÚrequestsÚsessionsÚSessionÚmountÚupdateÚstrÚlenrŠ   Úbase64Úurlsafe_b64encodeÚrstripÚdecodeÚgetÚstatus_coder•   rB   ÚmessageÚ	from_wirer›   rœ   ÚelapsedÚtotal_secondsr5   Úis_responser-   )r…   rq   r6   rr   rs   rt   r†   r‡   rˆ   r‰   rŠ   r‹   rŒ   Ú	_httpx_okÚwirer^   rI   Útransport_adapterr“   r”   ÚurlÚ	split_urlÚ	_is_httpxÚcmÚresponseÚtwireÚrs                              r   ÚhttpsrÉ     s—  € õt ð @ÝÐ>Ñ?Ô?Ð?å€Ià�9Š9‰;Œ;€DÝ-¨e°T¸6À;ÐPUÑVÔV�O€RˆˆFØÐØ€IØÐ2Ð3€GØ	€~Ø•”ÒÐØ#×*Ò*¨5°$¸Ñ=Ô=ˆCˆCØ•6”?Ò"Ð"Ø%×,Ò,¨U°D¸$Ñ?Ô?ˆCøØ	Ð	&Øˆ	Ý”L×)Ò)¨%Ñ0Ô0ˆ	ØÔÐ%ÝÐ6Ñ7Ô7Ð7Ø#Ô,ˆ�‰Ø�mŠm˜IÔ.Ð0AÑBÔBˆÝð 	7Ý 4Ñ 6Ô 6ÐøàˆØÐåð 	"Ø˜aÒÐÝ!Ô/¸fÀQ¼iÐPVÐWÑWÔW�	�	à!�	Ýð 	=Ý 4°VÑ <Ô <Ðàð Ýð 	Ý" 7­E¬LÑ9Ô9ˆIˆIàˆIØð 	˜Yð 	Ýð+ñô ð øð
 ˆ	àð 
�^ð 
ÝØQñ
ô 
ð 	
ð ð )Ý0:Ô0FÀwÑ0OÔ0OˆˆØ	ð )ÝŒ\Ø�k°&ÀIð
ñ 
ô 
ˆˆõ Ô×&Ò&Ñ(Ô(ˆØ	ð #ˆwØð 	2 Yð 	2Ø�MŠM˜#Ð0Ñ1Ô1Ð1ð ð 	Ø�NŠNà$=Ý&)­#¨d©)¬)¡n¤nðð ñô ð ð ð Ø"Ÿ<š<Ø °$Àð (ñ ô ��ð #Ÿ<š<Ø ¨t¸WÈVð (ñ ô ��õ Ô+¨DÑ1Ô1×8Ò8¸Ñ>Ô>ˆDØð ØŸš™œ�Ø"Ÿ;š;Ø °'À5È%À.ð 'ñ ô ��ð #Ÿ;š;ØØ#Ø#Ø!Ø! 4˜=ð 'ñ ô �ð;#ð #ð #ñ #ô #ð #ð #ð #ð #ð #ð #øøøð #ð #ð #ð #ðN Ô˜cÒ!Ð! XÔ%9¸CÒ%?Ð%?Ýð"ß"(¢&¨°Ô0DÀhÔFVÑ"WÔ"Wñ
ô 
ð 	
õ 	Œ×ÒØÔØ”	Ø”MØ)Ø'ð 	ñ 	ô 	€Að Ô×+Ò+Ñ-Ô-€A„FØ�=Š=˜ÑÔð ÝÐØ€Hs   ÈC;LÌLÌLc                 ór   — 	 	 |                       |¦  «        S # t          $ r t          | |¦  «         Y nw xY wŒ7)z‹Reads a datagram from the socket.
    A Timeout exception will be raised if the operation is not completed
    by the expiration time.
    )ÚrecvfromÚBlockingIOErrorrV   )ÚsockÚmax_sizerJ   s      r   Ú	_udp_recvrÏ   Ç  sT   € ð
1ð	1Ø—=’= Ñ*Ô*Ð*øÝð 	1ð 	1ð 	1Ý˜t ZÑ0Ô0Ð0Ð0Ð0ð	1øøøð1s   ƒ ˜5´5c                 ó¢   — 	 	 |r|                       ||¦  «        S |                      |¦  «        S # t          $ r t          | |¦  «         Y nw xY wŒO)z¦Sends the specified datagram to destination over the socket.
    A Timeout exception will be raised if the operation is not completed
    by the expiration time.
    )ÚsendtoÚsendrÌ   rX   )rÍ   r–   rg   rJ   s       r   Ú	_udp_sendrÓ   Ó  sn   € ð
1ð	1Øð 'Ø—{’{ 4¨Ñ5Ô5Ð5à—y’y ‘”Ð&øÝð 	1ð 	1ð 	1Ý˜t ZÑ0Ô0Ð0Ð0Ð0ð	1øøøð1s   ƒ0 ›0 °AÁArÍ   Úwhatrg   rJ   c                 óº   — t          |t          j        j        ¦  «        r|                     ¦   «         }t          j        ¦   «         }t          | |||¦  «        }||fS )aý  Send a DNS message to the specified UDP socket.

    *sock*, a ``socket``.

    *what*, a ``bytes`` or ``dns.message.Message``, the message to send.

    *destination*, a destination tuple appropriate for the address family
    of the socket, specifying where to send the query.

    *expiration*, a ``float`` or ``None``, the absolute time at which
    a timeout exception should be raised.  If ``None``, no timeout will
    occur.

    Returns an ``(int, float)`` tuple of bytes sent and the sent time.
    )r;   rB   rº   ÚMessagerŸ   r5   rÓ   )rÍ   rÔ   rg   rJ   Ú	sent_timeÚns         r   Úsend_udprÙ   â  sP   € õ, �$�œÔ+Ñ,Ô,ð Ø�|Š|‰~Œ~ˆÝ”	‘”€IÝ�$˜˜k¨:Ñ6Ô6€AØˆyˆ>Ðr   r   rh   r›   rœ   Úraise_on_truncationc	                 óè   — d}		 t          | d|¦  «        \  }	}
t          | j        |
||¦  «        rnŒ-t          j        ¦   «         }t          j                             |	|||||¬¦  «        }|r||fS |||
fS )aŠ  Read a DNS message from a UDP socket.

    *sock*, a ``socket``.

    *destination*, a destination tuple appropriate for the address family
    of the socket, specifying where the message is expected to arrive from.
    When receiving a response, this would be where the associated query was
    sent.

    *expiration*, a ``float`` or ``None``, the absolute time at which
    a timeout exception should be raised.  If ``None``, no timeout will
    occur.

    *ignore_unexpected*, a ``bool``.  If ``True``, ignore responses from
    unexpected sources.

    *one_rr_per_rrset*, a ``bool``.  If ``True``, put each RR into its own
    RRset.

    *keyring*, a ``dict``, the keyring to use for TSIG.

    *request_mac*, a ``bytes`` or ``None``, the MAC of the request (for TSIG).

    *ignore_trailing*, a ``bool``.  If ``True``, ignore trailing
    junk at end of the received message.

    *raise_on_truncation*, a ``bool``.  If ``True``, raise an exception if
    the TC bit is set.

    Raises if the message is malformed, if network errors occur, of if
    there is a timeout.

    If *destination* is not ``None``, returns a ``(dns.message.Message, float)``
    tuple of the received message and the received time.

    If *destination* is ``None``, returns a
    ``(dns.message.Message, float, tuple)``
    tuple of the received message, the received time, and the address where
    the message arrived from.
    r   Téÿÿ  )r›   rœ   r†   r‡   rÚ   )rÏ   ri   Úfamilyr5   rB   rº   r»   )rÍ   rg   rJ   rh   r†   r›   rœ   r‡   rÚ   rÀ   rf   Úreceived_timerÈ   s                r   Úreceive_udprß   ÿ  sª   € ðh €DðÝ(¨¨u°jÑAÔAÑˆˆ|ÝØŒK˜ {Ð4Eñ
ô 
ð 	ð ðõ ”I‘K”K€MÝŒ×ÒØØØØ)Ø'Ø/ð 	ñ 	ô 	€Að ð 0Ø�=Ð!Ð!à�= ,Ð/Ð/r   é5   c                 óÔ  — |                       ¦   «         }t          ||||¦  «        \  }}}t          |¦  «        \  }}|
rt          j        |
¦  «        }nt          |t          j        |¦  «        }|5 }t          ||||¦  «         t          |||||| j
        | j        ||	¦	  «	        \  }}||z
  |_        |                      |¦  «        st          ‚|cddd¦  «         S # 1 swxY w Y   	 J ‚)aL  Return the response obtained after sending a query via UDP.

    *q*, a ``dns.message.Message``, the query to send

    *where*, a ``str`` containing an IPv4 or IPv6 address,  where
    to send the message.

    *timeout*, a ``float`` or ``None``, the number of seconds to wait before the
    query times out.  If ``None``, the default, wait forever.

    *port*, an ``int``, the port send the message to.  The default is 53.

    *source*, a ``str`` containing an IPv4 or IPv6 address, specifying
    the source address.  The default is the wildcard address.

    *source_port*, an ``int``, the port from which to send the message.
    The default is 0.

    *ignore_unexpected*, a ``bool``.  If ``True``, ignore responses from
    unexpected sources.

    *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 received message.

    *raise_on_truncation*, a ``bool``.  If ``True``, raise an exception if
    the TC bit is set.

    *sock*, a ``socket.socket``, or ``None``, the socket to use for the
    query.  If ``None``, the default, a socket is created.  Note that
    if a socket is provided, it must be a nonblocking datagram socket,
    and the *source* and *source_port* are ignored.

    Returns a ``dns.message.Message``.
    N)rŸ   rw   r8   rª   r«   r‚   rm   Ú
SOCK_DGRAMrÙ   rß   r›   Úmacr5   r¾   r-   )r…   rq   r6   rr   rs   rt   rh   r†   r‡   rÚ   rÍ   rÀ   r^   rg   Ú
begin_timerJ   rÅ   rU   rÈ   rÞ   s                       r   Úudprå   I  sQ  € ðf �9Š9‰;Œ;€DÝ 7Øˆt�V˜[ñ!ô !Ñ€Rˆ�fõ  .¨gÑ6Ô6Ñ€Z�Øð 9Ý0:Ô0FÀtÑ0LÔ0Lˆˆå˜"�fÔ/°Ñ8Ô8ˆØ	ð ˆqÝ��D˜+ zÑ2Ô2Ð2Ý(ØØØØØØŒIØŒEØØñ

ô 

ÑˆˆMð  Ñ+ˆŒØ�}Š}˜QÑÔð 	ÝÐØð!ð ð ð ñ ô ð ð ð ð ð ð øøøð ð ð ð ð$ 	ðð s   Á1ACÃC Ã#C Úudp_sockÚtcp_sockc                 ó¨   — 	 t          | ||||||||d|	¦  «        }|dfS # t          j        j        $ r t	          | ||||||||
¦	  «	        }|dfcY S w xY w)aÀ  Return the response to the query, trying UDP first and falling back
    to TCP if UDP results in a truncated response.

    *q*, a ``dns.message.Message``, the query to send

    *where*, a ``str`` containing an IPv4 or IPv6 address,  where
    to send the message.

    *timeout*, a ``float`` or ``None``, the number of seconds to wait before the
    query times out.  If ``None``, the default, wait forever.

    *port*, an ``int``, the port send the message to.  The default is 53.

    *source*, a ``str`` containing an IPv4 or IPv6 address, specifying
    the source address.  The default is the wildcard address.

    *source_port*, an ``int``, the port from which to send the message.
    The default is 0.

    *ignore_unexpected*, a ``bool``.  If ``True``, ignore responses from
    unexpected sources.

    *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 received message.

    *udp_sock*, a ``socket.socket``, or ``None``, the socket to use for the
    UDP query.  If ``None``, the default, a socket is created.  Note that
    if a socket is provided, it must be a nonblocking datagram socket,
    and the *source* and *source_port* are ignored for the UDP query.

    *tcp_sock*, a ``socket.socket``, or ``None``, the connected socket to use for the
    TCP query.  If ``None``, the default, a socket is created.  Note that
    if a socket is provided, it must be a nonblocking connected stream
    socket, and *where*, *source* and *source_port* are ignored for the TCP
    query.

    Returns a (``dns.message.Message``, tcp) tuple where tcp is ``True``
    if and only if TCP was used.
    TF)rå   rB   rº   Ú	TruncatedÚtcp)r…   rq   r6   rr   rs   rt   rh   r†   r‡   ræ   rç   rÆ   s               r   Úudp_with_fallbackrë   ›  s¢   € ðn ÝØØØØØØØØØØØñ
ô 
ˆð ˜%Ð Ð øÝŒ;Ô ð  ð  ð  ÝØØØØØØØØØñ

ô 

ˆð ˜$ÐÐÐÐð øøøs   ‚ Ÿ/AÁAc                 ó0  — d}|dk    r�	 |                       |¦  «        }|dk    rt          ‚|t          |¦  «        z  }||z  }nL# t          t          j        f$ r t          | |¦  «         Y n$t          j        $ r t          | |¦  «         Y nw xY w|dk    °�|S )zßRead the specified number of bytes from sock.  Keep trying until we
    either get the desired amount, or we hit EOF.
    A Timeout exception will be raised if the operation is not completed
    by the expiration time.
    r   r   )	ÚrecvÚEOFErrorr³   rÌ   r   ÚSSLWantReadErrorrV   ÚSSLWantWriteErrorrX   )rÍ   ÚcountrJ   rU   rØ   s        r   Ú	_net_readrò   ð  sÆ   € ð 	€AØ
�!Š)ˆ)ð		1Ø—	’	˜%Ñ Ô ˆAØ�CŠxˆxÝ�Ø•S˜‘V”V‰OˆEØ�‰FˆAˆAøÝ¥Ô!5Ð6ð 	1ð 	1ð 	1Ý˜t ZÑ0Ô0Ð0Ð0Ð0ÝÔ$ð 	1ð 	1ð 	1Ý˜t ZÑ0Ô0Ð0Ð0Ð0ð	1øøøð �!Š)ˆ)ð €Hs   Š9A Á&BÁ,BÂBc                 ó   — d}t          |¦  «        }||k     rv	 ||                      ||d…         ¦  «        z  }nL# t          t          j        f$ r t          | |¦  «         Y n$t          j        $ r t          | |¦  «         Y nw xY w||k     °tdS dS )z‘Write the specified data to the socket.
    A Timeout exception will be raised if the operation is not completed
    by the expiration time.
    r   N)r³   rÒ   rÌ   r   rð   rX   rï   rV   )rÍ   r–   rJ   ÚcurrentÚls        r   Ú
_net_writerö     s¹   € ð
 €GÝˆD‰	Œ	€AØ
�AŠ+ˆ+ð	1Ø�t—y’y  g h h¤Ñ0Ô0Ñ0ˆGˆGøÝ¥Ô!6Ð7ð 	1ð 	1ð 	1Ý˜t ZÑ0Ô0Ð0Ð0Ð0ÝÔ#ð 	1ð 	1ð 	1Ý˜t ZÑ0Ô0Ð0Ð0Ð0ð	1øøøð �AŠ+ˆ+ˆ+ˆ+ˆ+ˆ+s   ™ : º&BÁ"BÂBc                 ó&  — t          |t          j        j        ¦  «        r|                     ¦   «         }n|}t          |¦  «        }t          j        d|¦  «        |z   }t          j        ¦   «         }t          | ||¦  «         t          |¦  «        |fS )a{  Send a DNS message to the specified TCP socket.

    *sock*, a ``socket``.

    *what*, a ``bytes`` or ``dns.message.Message``, the message to send.

    *expiration*, a ``float`` or ``None``, the absolute time at which
    a timeout exception should be raised.  If ``None``, no timeout will
    occur.

    Returns an ``(int, float)`` tuple of bytes sent and the sent time.
    ú!H)
r;   rB   rº   rÖ   rŸ   r³   ÚstructÚpackr5   rö   )rÍ   rÔ   rJ   rÀ   rõ   Útcpmsgr×   s          r   Úsend_tcprü     s€   € õ$ �$�œÔ+Ñ,Ô,ð Ø�|Š|‰~Œ~ˆˆàˆÝˆD‰	Œ	€Aõ Œ[˜˜qÑ!Ô! DÑ(€FÝ”	‘”€IÝˆt�V˜ZÑ(Ô(Ð(Ý�‰KŒK˜Ð#Ð#r   c                 óê   — t          | d|¦  «        }t          j        d|¦  «        \  }t          | ||¦  «        }t          j        ¦   «         }	t          j                             |||||¬¦  «        }
|
|	fS )aó  Read a DNS message from a TCP socket.

    *sock*, a ``socket``.

    *expiration*, a ``float`` or ``None``, the absolute time at which
    a timeout exception should be raised.  If ``None``, no timeout will
    occur.

    *one_rr_per_rrset*, a ``bool``.  If ``True``, put each RR into its own
    RRset.

    *keyring*, a ``dict``, the keyring to use for TSIG.

    *request_mac*, a ``bytes`` or ``None``, the MAC of the request (for TSIG).

    *ignore_trailing*, a ``bool``.  If ``True``, ignore trailing
    junk at end of the received message.

    Raises if the message is malformed, if network errors occur, of if
    there is a timeout.

    Returns a ``(dns.message.Message, float)`` tuple of the received message
    and the received time.
    é   rø   rš   )rò   rù   Úunpackr5   rB   rº   r»   )rÍ   rJ   r†   r›   rœ   r‡   Úldatarõ   rÀ   rÞ   rÈ   s              r   Úreceive_tcpr  5  s}   € õB �d˜A˜zÑ*Ô*€EÝŒ=˜˜uÑ%Ô%�D€QÝ�T˜1˜jÑ)Ô)€DÝ”I‘K”K€MÝŒ×ÒØØØØ)Ø'ð 	ñ 	ô 	€Að ˆ}ÐÐr   c                 óN  — |                       |¦  «        }|dk    rd S |t          j        t          j        t          j        fv r:t          | |¦  «         |                      t          j        t          j	        ¦  «        }|dk    r"t          |t          j        |¦  «        ¦  «        ‚d S )Nr   )Ú
connect_exÚerrnoÚEINPROGRESSÚEWOULDBLOCKÚEALREADYrX   Ú
getsockoptrm   Ú
SOL_SOCKETÚSO_ERRORÚOSErrorÚosÚstrerror)rU   ÚaddressrJ   Úerrs       r   Ú_connectr  d  s�   € Ø
�,Š,�wÑ
Ô
€CØ
ˆa‚x€xØˆØ
�uÔ ¥%Ô"3µU´^ÐDÐDÐDÝ˜1˜jÑ)Ô)Ð)Ø�lŠl�6Ô,­f¬oÑ>Ô>ˆØ
ˆa‚x€xÝ�c�2œ; sÑ+Ô+Ñ,Ô,Ð,ð €xr   c	           	      óò  — |                       ¦   «         }	t          |¦  «        \  }
}|rt          j        |¦  «        }n1t	          ||||¦  «        \  }}}t          |t          j        |¦  «        }|5 }|st          |||¦  «         t          ||	|¦  «         t          |||| j        | j        |¦  «        \  }}||
z
  |_        |                      |¦  «        st          ‚|cddd¦  «         S # 1 swxY w Y   	 J ‚)a¥  Return the response obtained after sending a query via TCP.

    *q*, a ``dns.message.Message``, the query to send

    *where*, a ``str`` containing an IPv4 or IPv6 address, where
    to send the message.

    *timeout*, a ``float`` or ``None``, the number of seconds to wait before the
    query times out.  If ``None``, the default, wait forever.

    *port*, an ``int``, the port send the message to.  The default is 53.

    *source*, a ``str`` containing an IPv4 or IPv6 address, specifying
    the source address.  The default is the wildcard address.

    *source_port*, an ``int``, the port from which to send the message.
    The default is 0.

    *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 received message.

    *sock*, a ``socket.socket``, or ``None``, the connected socket to use for the
    query.  If ``None``, the default, a socket is created.  Note that
    if a socket is provided, it must be a nonblocking connected stream
    socket, and *where*, *port*, *source* and *source_port* are ignored.

    Returns a ``dns.message.Message``.
    N)rŸ   r8   rª   r«   rw   r‚   rm   ÚSOCK_STREAMr  rü   r  r›   rã   r5   r¾   r-   )r…   rq   r6   rr   rs   rt   r†   r‡   rÍ   rÀ   rä   rJ   rÅ   r^   rg   rU   rÈ   rÞ   s                     r   rê   rê   o  s\  € ðV �9Š9‰;Œ;€DÝ-¨gÑ6Ô6Ñ€Z�Øð :Ý0:Ô0FÀtÑ0LÔ0Lˆˆå$;Ø�4˜ ñ%
ô %
Ñ!ˆˆ[˜&õ ˜"�fÔ0°&Ñ9Ô9ˆØ	ð 
ˆqØð 	1Ý�Q˜ ZÑ0Ô0Ð0Ý��D˜*Ñ%Ô%Ð%Ý(ØˆzÐ+¨Q¬Y¸¼¸ñ
ô 
ÑˆˆMð  Ñ+ˆŒØ�}Š}˜QÑÔð 	ÝÐØð
ð 
ð 
ð 
ñ 
ô 
ð 
ð 
ð 
ð 
ð 
ð 
øøøð 
ð 
ð 
ð 
ð 	ðð s   Á1A-C+Ã+C/Ã2C/c                 ó¾   — 	 	 |                       ¦   «          d S # t          j        $ r t          | |¦  «         Y n$t          j        $ r t          | |¦  «         Y nw xY wŒ]r4   )Údo_handshaker   rï   rV   rð   rX   rT   s     r   Ú_tls_handshaker  ³  s…   € ð.ð	.Ø�NŠNÑÔÐØˆFøÝÔ#ð 	.ð 	.ð 	.Ý˜q *Ñ-Ô-Ð-Ð-Ð-ÝÔ$ð 	.ð 	.ð 	.Ý˜q *Ñ-Ô-Ð-Ð-Ð-ð	.øøøð.s   ƒ ™AºAÁAéU  r�   rz   c                 ó€  — |rt          | ||||||||¦	  «	        S |                      ¦   «         }t          |¦  «        \  }}t          ||||¦  «        \  }}}|	€4|s2t	          j        ¦   «         }	t          j        j        |	_        |
€d|	_	        t          |t          j        ||	|
¬¦  «        5 }t          |||¦  «         t          ||¦  «         t          |||¦  «         t!          |||| j        | j        |¦  «        \  }}||z
  |_        |                      |¦  «        st*          ‚|cddd¦  «         S # 1 swxY w Y   	 J ‚)a:  Return the response obtained after sending a query via TLS.

    *q*, a ``dns.message.Message``, the query to send

    *where*, a ``str`` containing an IPv4 or IPv6 address,  where
    to send the message.

    *timeout*, a ``float`` or ``None``, the number of seconds to wait before the
    query times out.  If ``None``, the default, wait forever.

    *port*, an ``int``, the port send the message to.  The default is 853.

    *source*, a ``str`` containing an IPv4 or IPv6 address, specifying
    the source address.  The default is the wildcard address.

    *source_port*, an ``int``, the port from which to send the message.
    The default is 0.

    *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 received message.

    *sock*, an ``ssl.SSLSocket``, or ``None``, the socket to use for
    the query.  If ``None``, the default, a socket is created.  Note
    that if a socket is provided, it must be a nonblocking connected
    SSL stream socket, and *where*, *port*, *source*, *source_port*,
    and *ssl_context* are ignored.

    *ssl_context*, an ``ssl.SSLContext``, the context to use when establishing
    a TLS connection. If ``None``, the default, creates one with the default
    configuration.

    *server_hostname*, a ``str`` containing the server's hostname.  The
    default is ``None``, which means that no hostname is known, and if an
    SSL context is created, hostname checking will be disabled.

    Returns a ``dns.message.Message``.

    NF)r�   rz   )rê   rŸ   r8   rw   r   r&   Ú
TLSVersionÚTLSv1_2Úminimum_versionÚcheck_hostnamer‚   rm   r  r  r  rü   r  r›   rã   r5   r¾   r-   )r…   rq   r6   rr   rs   rt   r†   r‡   rÍ   r�   rz   rÀ   rä   rJ   r^   rg   rU   rÈ   rÞ   s                      r   Útlsr  ¾  sÇ  € ðn ð 
õ ØØØØØØØØØñ

ô 

ð 
	
ð �9Š9‰;Œ;€DÝ-¨gÑ6Ô6Ñ€Z�Ý 7Øˆt�V˜[ñ!ô !Ñ€Rˆ�fð Ð 4ÐÝÔ0Ñ2Ô2ˆÝ&)¤nÔ&<ˆÔ#ØÐ"Ø).ˆKÔ&å	Ø
ÝÔØØØ'ð
ñ 
ô 
ð ð 
Ý��K Ñ,Ô,Ð,Ý�q˜*Ñ%Ô%Ð%Ý��D˜*Ñ%Ô%Ð%Ý(ØˆzÐ+¨Q¬Y¸¼¸ñ
ô 
ÑˆˆMð  Ñ+ˆŒØ�}Š}˜QÑÔð 	ÝÐØð!ð ð ð ñ ô ð ð ð ð ð ð øøøð ð ð ð ð$ 	ðð s   Â*A;D2Ä2D6Ä9D6Ú
connectionc
                 ó  — t           j        j        st          d¦  «        ‚d| _        |                      ¦   «         }
|rt          j        d¦  «        }|}n"t           j                             |	¬¦  «        }|}|5  |s| 	                    ||||¦  «        }t          j
        ¦   «         }|                     ¦   «         5 }|                     |
d¦  «         |                     |¦  «        }
ddd¦  «         n# 1 swxY w Y   t          j
        ¦   «         }ddd¦  «         n# 1 swxY w Y   t           j                             |
| j        | j        ||¬¦  «        }t%          ||z
  d¦  «        |_
        |                      |¦  «        st(          ‚|S )aû  Return the response obtained after sending a query via DNS-over-QUIC.

    *q*, a ``dns.message.Message``, the query to send.

    *where*, a ``str``, the nameserver IP address.

    *timeout*, a ``float`` or ``None``, the number of seconds to wait before the query
    times out. If ``None``, the default, wait forever.

    *port*, a ``int``, the port to send the query to. The default is 853.

    *source*, a ``str`` containing an IPv4 or IPv6 address, specifying the source
    address.  The default is the wildcard address.

    *source_port*, an ``int``, the port from which to send the message. The default is
    0.

    *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
    received message.

    *connection*, a ``dns.quic.SyncQuicConnection``.  If provided, the
    connection to use to send the query.

    *verify*, a ``bool`` or ``str``.  If a ``True``, then TLS certificate verification
    of the server is done using the default CA bundle; if ``False``, then no
    verification is done; if a `str` then it specifies the path to a certificate file or
    directory which will be used for verification.

    Returns a ``dns.message.Message``.
    zDNS-over-QUIC is not available.r   N)Úverify_modeTrš   r:   )rB   ÚquicÚ	have_quicr2   ÚidrŸ   rª   r«   ÚSyncQuicManagerÚconnectr5   Úmake_streamrÒ   Úreceiverº   r»   r›   rœ   Úmaxr¾   r-   )r…   rq   r6   rr   rs   rt   r†   r‡   r  rŒ   rÀ   ÚmanagerÚthe_connectionÚthe_managerÚstartÚstreamÚfinishrÈ   s                     r   r   r   &  sø  € õZ Œ8Ôð 7ÝÐ5Ñ6Ô6Ð6à€A„DØ�9Š9‰;Œ;€Dð ð Ý5?Ô5KÈDÑ5QÔ5QˆØ#ˆˆå”(×*Ò*°vÐ*Ñ>Ô>ˆØˆà	ð ð Øð 	SØ(×0Ò0°¸¸fÀkÑRÔRˆNÝ”	‘”ˆØ×'Ò'Ñ)Ô)ð 	+¨VØ�KŠK˜˜dÑ#Ô#Ð#Ø—>’> 'Ñ*Ô*ˆDð	+ð 	+ð 	+ñ 	+ô 	+ð 	+ð 	+ð 	+ð 	+ð 	+ð 	+øøøð 	+ð 	+ð 	+ð 	+õ ”‘”ˆðð ð ñ ô ð ð ð ð ð ð øøøð ð ð ð õ 	Œ×ÒØØ”	Ø”MØ)Ø'ð 	ñ 	ô 	€Aõ �˜%‘ Ñ%Ô%€A„FØ�=Š=˜ÑÔð ÝÐØ€Hs7   Á9ADÂ;,C3Ã'DÃ3C7	Ã7DÃ:C7	Ã;DÄD!Ä$D!ÚzoneÚrdtypeÚrdclassÚkeynameÚ
relativizeÚlifetimeÚserialÚuse_udpÚkeyalgorithmc              #   ó(
  K  — t          |t          ¦  «        rt          j                             |¦  «        }t          j        j                             |¦  «        }t          j         	                    |||¦  «        }|t          j        j
        k    r@t          j                             |dddd|z  ¦  «        }|j                             |¦  «         |�|                     |||¬¦  «         |                     ¦   «         }t!          | ||
|¦  «        \  }}}
|r$|t          j        j
        k    rt#          d¦  «        ‚|rt$          j        nt$          j        }t+          |||
¦  «        5 }t-          |	¦  «        \  }}t/          |||¦  «         t1          |¦  «        }|rt3          ||d|¦  «         n)t5          j        d|¦  «        |z   }t9          |||¦  «         d	}d
}d	}d}|r|}t          j        j        }nd}|}d} |�süt-          |¦  «        \  }}!|!�|�|!|k    r|}!|rt=          |d|!¦  «        \  }}n9t?          |d|!¦  «        }"t5          j         d|"¦  «        \  }t?          |||!¦  «        }|t          j        j
        k    }#t          j         !                    ||j"        |j#        d
|| d
|#¬¦  «        }$|$ $                    ¦   «         }%|%t          j$        j%        k    rtM          |%¦  «        ‚|$j'        } d}&|€à|$j(        r|$j(        d         j        |k    rt          j)         *                    d¦  «        ‚|$j(        d         }|j+        t          j        j,        k    rt          j)         *                    d¦  «        ‚d}&| -                    ¦   «         }|t          j        j
        k    r3t          j.         /                    |d         j.        ¦  «        |k    rd
}nd
}|$j(        |&d…         D ]ß}|rt          j)         *                    d¦  «        ‚|j+        t          j        j,        k    r�|j        |k    r‚|r3|d         j.        |k    rt          j)         *                    d¦  «        ‚d	}n|t          j        j
        k    r| }||k    r.|t          j        j0        k    s|t          j        j
        k    r|rd
}ŒÊ|rt          j        j0        }d	}Œà|r-|j"        r&|$j1        st          j)         *                    d¦  «        ‚|$V — |�¯üddd¦  «         dS # 1 swxY w Y   dS )a³  Return a generator for the responses to a zone transfer.

    *where*, a ``str`` containing an IPv4 or IPv6 address,  where
    to send the message.

    *zone*, a ``dns.name.Name`` or ``str``, the name of the zone to transfer.

    *rdtype*, an ``int`` or ``str``, the type of zone transfer.  The
    default is ``dns.rdatatype.AXFR``.  ``dns.rdatatype.IXFR`` can be
    used to do an incremental transfer instead.

    *rdclass*, an ``int`` or ``str``, the class of the zone transfer.
    The default is ``dns.rdataclass.IN``.

    *timeout*, a ``float``, the number of seconds to wait for each
    response message.  If None, the default, wait forever.

    *port*, an ``int``, the port send the message to.  The default is 53.

    *keyring*, a ``dict``, the keyring to use for TSIG.

    *keyname*, a ``dns.name.Name`` or ``str``, the name of the TSIG
    key to use.

    *relativize*, a ``bool``.  If ``True``, all names in the zone will be
    relativized to the zone origin.  It is essential that the
    relativize setting matches the one specified to
    ``dns.zone.from_xfr()`` if using this generator to make a zone.

    *lifetime*, a ``float``, the total number of seconds to spend
    doing the transfer.  If ``None``, the default, then there is no
    limit on the time the transfer may take.

    *source*, a ``str`` containing an IPv4 or IPv6 address, specifying
    the source address.  The default is the wildcard address.

    *source_port*, an ``int``, the port from which to send the message.
    The default is 0.

    *serial*, an ``int``, the SOA serial number to use as the base for
    an IXFR diff sequence (only meaningful if *rdtype* is
    ``dns.rdatatype.IXFR``).

    *use_udp*, a ``bool``.  If ``True``, use UDP (only meaningful for IXFR).

    *keyalgorithm*, a ``dns.name.Name`` or ``str``, the TSIG algorithm to use.

    Raises on errors, and so does the generator.

    Returns a generator of ``dns.message.Message`` objects.
    r   ÚINÚSOAz. . %u 0 0 0 0N)Ú	algorithmzcannot do a UDP AXFRrø   FTrÜ   rþ   ©r›   rœ   ÚxfrÚoriginÚtsig_ctxÚmultir†   z No answer or RRset not for qnamezfirst RRset is not an SOArZ   zanswers after final SOAzIXFR base serial mismatchúmissing TSIG)2r;   r²   rB   ÚnameÚ	from_textÚ	rdatatypeÚ	RdataTypeÚmakerº   Ú
make_queryÚIXFRÚrrsetÚ	authorityÚappendÚuse_tsigrŸ   rw   rl   rm   râ   r  r‚   r8   r  r³   rÓ   rù   rú   rö   ÚemptyrÏ   rò   rÿ   r»   r›   rã   ÚrcodeÚNOERRORÚTransferErrorr>  ÚanswerrC   Ú	FormErrorr/  r9  Úcopyr4  ÚSerialÚAXFRÚhad_tsig)'rq   r.  r/  r0  r6   rr   r›   r1  r2  r3  rs   rt   r4  r5  r6  r…   rH  rÀ   r^   rg   Ú	sock_typerU   rI   rJ   rõ   rû   ÚdoneÚdelete_modeÚexpecting_SOAÚ	soa_rrsetr=  Úonamer>  Úmexpirationr   Úis_ixfrrÈ   rM  Úanswer_indexs'                                          r   r<  r<  v  sq  è è € õJ �$�ÑÔð (ÝŒx×!Ò! $Ñ'Ô'ˆÝŒ]Ô$×)Ò)¨&Ñ1Ô1€FÝŒ×Ò˜t V¨WÑ5Ô5€AØ•”Ô#Ò#Ð#Ý”	×#Ò# D¨!¨T°5Ð:JÈVÑ:SÑTÔTˆØ	Œ×Ò˜5Ñ!Ô!Ð!ØÐØ	�
Š
�7˜G¨|ˆ
Ñ<Ô<Ð<Ø�9Š9‰;Œ;€DÝ 7Øˆt�V˜[ñ!ô !Ñ€Rˆ�fð ð 1�6�Sœ]Ô/Ò/Ð/ÝÐ/Ñ0Ô0Ð0Ø%,ÐD•Ô!Ð!µ&Ô2D€IÝ	�b˜) VÑ	,Ô	,ð b°Ý(¨Ñ2Ô2‰ˆˆJÝ��K Ñ,Ô,Ð,Ý�‰IŒIˆØð 	.Ý�a˜˜t ZÑ0Ô0Ð0Ð0å”[  qÑ)Ô)¨DÑ0ˆFÝ�q˜& *Ñ-Ô-Ð-ØˆØˆØˆØˆ	Øð 	ØˆFÝ”H”NˆEˆEàˆFØˆEØˆØñ N	Ý-¨gÑ6Ô6ÑˆQ�ØÐ"ØÐ&¨;¸Ò+CÐ+Cà(�Øð 4Ý% a¨°Ñ<Ô<‘	��q�qå! ! Q¨Ñ4Ô4�Ý”} T¨5Ñ1Ô1‘�Ý   A {Ñ3Ô3�Ø¥¤Ô 2Ò2ˆGÝ”×%Ò%ØØœ	ØœEØØØ!ØØ!(ð &ñ 	ô 	ˆAð —G’G‘I”IˆEØ�œ	Ô)Ò)Ð)Ý# EÑ*Ô*Ð*Ø”zˆHØˆLØÐ Ø”xð V 1¤8¨A¤;Ô#3°uÒ#<Ð#<Ýœ-×1Ò1Ð2TÑUÔUÐUØœ œ�Ø”<¥3¤=Ô#4Ò4Ð4Ýœ-×1Ò1Ð2MÑNÔNÐNØ �Ø!ŸJšJ™LœL�	Ø�Sœ]Ô/Ò/Ð/Ý”z×(Ò(¨°1¬Ô)<Ñ=Ô=ÀÒGÐGð  $˜˜à(,˜ð
 œ , - -Ô0ð *ð *�Øð MÝœ-×1Ò1Ð2KÑLÔLÐLØ”<¥3¤=Ô#4Ò4Ð4¸¼ÀuÒ9LÐ9LØ$ð 6Ø  œ8œ?¨fÒ4Ð4Ý"%¤-×"9Ò"9Ð:UÑ"VÔ"VÐVØ(-˜˜Ø¥3¤=Ô#5Ò5Ð5Ø*5 o˜ð  	Ò)Ð)Ø¥#¤-Ô"4Ò4Ð4Ø"¥c¤mÔ&8Ò8Ð8¸[Ð8à#˜øØ"ð *õ !œ]Ô/�FØ$)�MøØð >˜œ	ð >¨!¬*ð >Ý”m×-Ò-¨nÑ=Ô=Ð=ØˆGˆGˆGð] ñ N	ð)bð bð bñ bô bð bð bð bð bð bð bð bøøøð bð bð bð bð bð bs   Å&NTÔTÔTc                   ó   — e Zd ZdZdZdZdZdS )ÚUDPModea  How should UDP be used in an IXFR from :py:func:`inbound_xfr()`?

    NEVER means "never use UDP; always use TCP"
    TRY_FIRST means "try to use UDP but fall back to TCP if needed"
    ONLY means "raise ``dns.xfr.UseTCP`` if trying UDP does not succeed"
    r   rZ   rþ   N)r   r   r   r+   ÚNEVERÚ	TRY_FIRSTÚONLYr   r   r   r`  r`  0  s)   € € € € € ðð ð €EØ€IØ€D€D€Dr   r`  Útxn_managerÚqueryÚudp_modec	                 óØ  — |€#t           j                             |¦  «        \  }}	nt           j                             |¦  «        }	|j        d         j        }
|
t           j        j        k    }|                     ¦   «         }| 	                    ¦   «         }t          | |||¦  «        \  }}}t          |¦  «        \  }}d}|�r)d}|r|t          j        k    rt          j        }d}nt          j        }d}t#          |||¦  «        5 }t%          |||¦  «         |rt'          ||d|¦  «         n6t)          j        dt-          |¦  «        ¦  «        |z   }t/          |||¦  «         t           j                             ||
|	|¦  «        5 }d}d}|sÿt          |¦  «        \  }}|�|�||k    r|}|rt3          |d|¦  «        \  }}n9t5          |d|¦  «        }t)          j        d|¦  «        \  }t5          |||¦  «        }t           j                             ||j        |j        d||| |¬¦  «        }	 |                      |¦  «        }n?# t           j        j!        $ r( |sJ ‚|t          j"        k    r‚ d}d}t          j        }Y Œôw xY w|j#        }|¯ÿ|s-|j        r&|j$        st           j%         &                    d	¦  «        ‚ddd¦  «         n# 1 swxY w Y   ddd¦  «         n# 1 swxY w Y   |�°'dS dS )
aŸ  Conduct an inbound transfer and apply it via a transaction from the
    txn_manager.

    *where*, a ``str`` containing an IPv4 or IPv6 address,  where
    to send the message.

    *txn_manager*, a ``dns.transaction.TransactionManager``, the txn_manager
    for this transfer (typically a ``dns.zone.Zone``).

    *query*, the query to send.  If not supplied, a default query is
    constructed using information from the *txn_manager*.

    *port*, an ``int``, the port send the message to.  The default is 53.

    *timeout*, a ``float``, the number of seconds to wait for each
    response message.  If None, the default, wait forever.

    *lifetime*, a ``float``, the total number of seconds to spend
    doing the transfer.  If ``None``, the default, then there is no
    limit on the time the transfer may take.

    *source*, a ``str`` containing an IPv4 or IPv6 address, specifying
    the source address.  The default is the wildcard address.

    *source_port*, an ``int``, the port from which to send the message.
    The default is 0.

    *udp_mode*, a ``dns.query.UDPMode``, determines how UDP is used
    for IXFRs.  The default is ``dns.UDPMode.NEVER``, i.e. only use
    TCP.  Other possibilities are ``dns.UDPMode.TRY_FIRST``, which
    means "try UDP but fallback to TCP if needed", and
    ``dns.UDPMode.ONLY``, which means "try UDP and raise
    ``dns.xfr.UseTCP`` if it does not succeed.

    Raises on errors.
    Nr   TFrø   rÜ   rþ   r;  r@  )'rB   r<  rF  Úextract_serial_from_queryÚquestionr/  rC  rG  Úfrom_wire_originrŸ   rw   r8   r`  ra  rm   râ   r  r‚   r  rÓ   rù   rú   r³   rö   ÚInboundrÏ   rò   rÿ   rº   r»   r›   rã   Úprocess_messageÚUseTCPrc  r>  rU  rC   rQ  )rq   rd  re  rr   r6   r3  rs   rt   rf  r4  r/  r]  r=  rÀ   r^   rg   rI   rJ   ÚretryrV  Úis_udprU   rû   ÚinboundrW  r>  r\  Úrwirer   rõ   rÈ   s                                  r   Úinbound_xfrrr  =  sÝ  € ð^ €}Ýœ'×,Ò,¨[Ñ9Ô9‰ˆ��å”×2Ò2°5Ñ9Ô9ˆØŒ^˜AÔÔ%€FØ�œÔ*Ò*€GØ×)Ò)Ñ+Ô+€FØ�=Š=‰?Œ?€DÝ 7Øˆt�V˜[ñ!ô !Ñ€Rˆ�fõ % XÑ.Ô.�O€Qˆ
Ø€EØ
ñ 4BØˆØð 	�x¥7¤=Ò0Ð0ÝÔ)ˆIØˆFˆFåÔ*ˆIØˆFÝ˜"˜i¨Ñ0Ô0ð ,	B°AÝ�Q˜ ZÑ0Ô0Ð0Øð 2Ý˜!˜T 4¨Ñ4Ô4Ð4Ð4åœ T­3¨t©9¬9Ñ5Ô5¸Ñ<�Ý˜1˜f jÑ1Ô1Ð1Ý”—’ ¨f°f¸fÑEÔEð %BÈØ�Ø�Øð  *Ý'5°gÑ'>Ô'>Ñ$�Q˜Ø"Ð*Ø"Ð.°;ÀÒ3KÐ3Kà&0˜Øð =Ý%.¨q°%¸Ñ%EÔ%E™
˜  å )¨!¨Q°Ñ <Ô <˜Ý%œ}¨T°5Ñ9Ô9™˜Ý )¨!¨Q°Ñ <Ô <˜Ýœ×-Ò-ØØ %¤Ø$)¤IØ Ø%Ø!)Ø#)˜zØ)0ð .ñ 	ô 	�Að	!Ø&×6Ò6°qÑ9Ô9˜˜øÝœ7œ>ð !ð !ð !Ø%˜˜˜Ø#¥w¤|Ò3Ð3Ø!Ø#˜Ø $˜Ý#*¤=˜Ø ˜ð!øøøð  !œz�HðA ð  *ðB ð B ¤ð B°q´zð BÝœ-×1Ò1°.ÑAÔAÐAðK%Bð %Bð %Bñ %Bô %Bð %Bð %Bð %Bð %Bð %Bð %Bøøøð %Bð %Bð %Bð %Bð,	Bð ,	Bð ,	Bñ ,	Bô ,	Bð ,	Bð ,	Bð ,	Bð ,	Bð ,	Bð ,	Bøøøð ,	Bð ,	Bð ,	Bð ,	Bð ñ 4Bð 4Bð 4Bð 4Bð 4Bs\   ÄA?KÆB'KÈ*I È?KÉ 9I<É9KÉ;I<É<;KÊ7KËK	ËKË
K	ËKËKË!K)T)NN)Nrƒ   Nr   FFNr„   TNTr4   )NNFFNr   FF)	Nrà   Nr   FFFFN)	Nrà   Nr   FFFNN)NFNr   F)Nrà   Nr   FFN)	Nr  Nr   FFNNN)Nr  Nr   FFNT)or+   Útypingr   r   r   r   r   r´   rª   Úenumr  r  r>   rm   rù   r5   Úurllib.parser¡   Údns.exceptionrB   Údns.inetÚdns.nameÚdns.messageÚdns.quicÚ	dns.rcodeÚdns.rdataclassÚdns.rdatatypeÚ
dns.serialÚdns.transactionÚdns.tsigÚdns.xfrr­   Ú!requests_toolbelt.adapters.sourcer   Ú*requests_toolbelt.adapters.host_header_sslr	   r¦   ÚImportErrorrž   r¬   r§   r©   r"   r�   r   r{   rC   ÚDNSExceptionr)   rQ  r-   r/   r2   r<  rO  r8   rM   rP   ÚhasattrrQ   r=   ÚSelectSelectorrV   rX   rc   ri   rw   r‚   rº   rÖ   r²   ÚfloatÚintÚboolrÉ   rÏ   rÓ   ÚbytesrÙ   rA  ÚNameÚtsigÚKeyrß   rå   rë   rò   rö   rü   r  r  rê   r  r    r   r  r   ÚSyncQuicConnectionrC  rT  Ú
rdataclassr8  Údefault_algorithmrD  Ú
RdataClassÚIntEnumr`  ra  ÚtransactionÚTransactionManagerrr  r   r   r   ú<module>r–     si  ðð$ Ð à 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4à €€€Ø Ð Ð Ð Ø €€€Ø €€€Ø 	€	€	€	Ø Ð Ð Ð Ø €€€Ø €€€Ø €€€Ø Ð Ð Ð à Ð Ð Ð Ø €€€Ø €€€Ø Ð Ð Ð Ø €€€Ø Ð Ð Ð Ø Ð Ð Ð Ø Ð Ð Ð Ø Ð Ð Ð Ø Ð Ð Ð Ø €€€Ø €€€ðØ€O€O€OØFÐFÐFÐFÐFÐFØOÐOÐOÐOÐOÐOà€N€NøØð ð ð Ø€N€N€Nðøøøð €Ø€ð	Ø€L€L€Là€KðàˆUŒ\ Ð%Ñ%Ô%ð 	ð 	ØˆKð	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	øøàð ð ð Øˆðøøøøøàð 	ð 	ð 	Ø€Dð	øøøð Ð(˜[€ð.Ø€J€J€J€JøØð .ð .ð .ð.ð .ð .ð .ð .ñ .ô .ð .ð .ð .ð.øøøð, ”€ðHð Hð Hð Hð H�s”}Ô1ñ Hô Hð HðGð Gð Gð Gð G�#”-Ô)ñ Gô Gð Gðð ð ð ð ˆCŒMÔ&ñ ô ð ð
ð ð ð ð ˆCŒMÔ&ñ ô ð ð ”Ô%€ð$ð $ð $ð$ð $ð $ð8%ð %ð %ð €7ˆ9�nÑ%Ô%ð 	/ð  Ô,€O€OàÔ.€Oð0ð 0ð 0ð0ð 0ð 0ð	)ð 	)ð 	)ðð ð ð" =Að*%ð *%ð *%ð *%ðZð ð ð ð.  $ØØ ØØ"Ø!Ø!ØØØ'+Ø#ðnð nØ
„{Ôðnàðnð �eŒ_ðnð ð	nð
 �SŒMðnð ðnð ðnð ðnð �cŒ]ðnð ðnð ðnð   ”}ðnð �$˜�)Ôðnð 	„[Ôðnð nð nð nðb	1ð 	1ð 	1ð1ð 1ð 1ð& #'ð	ð Ø
ðà
�”Ô# UÐ*Ô
+ðð ðð ˜”ð	ð
 ˆ3�ˆ:Ôðð ð ð ð> "&Ø"&Ø#Ø"Ø;?Ø#&Ø!Ø %ðG0ð G0Ø
ðG0à˜#”ðG0ð ˜”ðG0ð ð	G0ð
 ðG0ð �d˜3œ8œ=¨#¬(¬,Ð6Ô7Ô8ðG0ð ˜%”ðG0ð ðG0ð ðG0ð 	ðG0ð G0ð G0ð G0ðZ  $ØØ ØØ#Ø"Ø!Ø %ØðOð OØ
„{ÔðOàðOð �eŒ_ðOð ð	Oð
 �SŒMðOð ðOð ðOð ðOð ðOð ðOð �3Œ-ðOð 	„[ÔðOð Oð Oð Oðj  $ØØ ØØ#Ø"Ø!Ø"Ø"ðR ð R Ø
„{ÔðR àðR ð �eŒ_ðR ð ð	R ð
 �SŒMðR ð ðR ð ðR ð ðR ð ðR ð �sŒmðR ð �sŒmðR ð ˆ3Œ;Ô Ð$Ô%ðR ð R ð R ð R ðjð ð ð*1ð 1ð 1ð& #'ð$ð $Ø
ð$à
�”Ô# UÐ*Ô
+ð$ð ˜”ð$ð ˆ3�ˆ:Ôð	$ð $ð $ð $ðD #'Ø"Ø;?Ø#&Ø!ð,ð ,Ø
ð,à˜”ð,ð ð,ð �d˜3œ8œ=¨#¬(¬,Ð6Ô7Ô8ð	,ð
 ˜%”ð,ð ð,ð ˆ3Œ;Ô Ð%Ô&ð,ð ,ð ,ð ,ð^-ð -ð -ð  $ØØ ØØ"Ø!ØðAð AØ
„{ÔðAàðAð �eŒ_ðAð ð	Að
 �SŒMðAð ðAð ðAð ðAð �3Œ-ðAð 	„[ÔðAð Að Að AðH.ð .ð .ð  $ØØ ØØ"Ø!Ø$(Ø,0Ø%)ðeð eØ
„{Ôðeàðeð �eŒ_ðeð ð	eð
 �SŒMðeð ðeð ðeð ðeð �3”=Ô
!ðeð ˜#œ.Ô)ðeð ˜c”]ðeð 	„[Ôðeð eð eð eðV  $ØØ ØØ"Ø!Ø8<Ø#ðMð MØ
„{ÔðMàðMð �eŒ_ðMð ð	Mð
 �SŒMðMð ðMð ðMð ðMð ˜œÔ4Ô5ðMð �$˜�)ÔðMð 	„[ÔðMð Mð Mð Mðf 36´-Ô2DØ58´^Ô5FØ#ØØ;?Ø37ØØ $Ø ØØØØ.1¬hÔ.Hðwð wØðwà
�””˜sÐ"Ô
#ðwð �#”-Ô)¨3Ð.Ô/ðwð �3”>Ô,¨cÐ1Ô2ð	wð
 �eŒ_ðwð ðwð �d˜3œ8œ=¨#¬(¬,Ð6Ô7Ô8ðwð �e˜CœHœM¨3Ð.Ô/Ô0ðwð ðwð �uŒoðwð �SŒMðwð ðwð ðwð ðwð ˜œœ sÐ*Ô+ðwð  	ð!wð wð wð wðt
ð 
ð 
ð 
ð 
ˆdŒlñ 
ô 
ð 
ð  ,0ØØ#Ø $Ø ØØœðpBð pBØðpBà”Ô3ðpBð �C”KÔ'Ô(ðpBð ð	pBð
 �eŒ_ðpBð �uŒoðpBð �SŒMðpBð ðpBð ðpBð 
ðpBð pBð pBð pBð pBð pBs~   Á*A= Á=BÂBÂC ÂC Â'B6Â*C Â6B:Â:C Â=B:Â>C ÃC ÃC
ÃC Ã	C
Ã
C ÃCÃCÃC# Ã#C8Ã7C8