
    gE                        S r SSKrSSKrSSKJrJrJrJrJr  SSK	r
SSKr
SSKr
SSKr
SSKr
SSKr
SSKr
SSKr
SSKr
SSKJrJrJrJr  \
R.                  R0                  r\
R.                  R4                  r " S S\
R8                  R:                  5      rSqS\4S jr S(S	 jr!\
RD                  RF                  \
RH                  RJ                  S
SSSSSS4	S\\
RL                  RN                  \(4   S\\
RD                  RR                  \(4   S\\
RH                  RT                  \(4   S\+S\\(   S\+S\,S\\-   S\\+   S\\
R\                  R^                     S\
R8                  R`                  4S jjr1S\(S\S\S\
R8                  R`                  4S jr2\Rf                  4S\\
RL                  RN                  \(4   S\,S\S\
R8                  Rh                  4S jjr5S\\
RL                  RN                  \(4   S\
RL                  RN                  4S jr6S)S\-SS4S  jjr7\
RH                  RJ                  S
SS4S\\
RL                  RN                  \(4   S\
RH                  RT                  S\+S!\\   S\\
R\                  R^                     S\
RL                  RN                  4S" jjr8S#\Rf                  S4S$\\
RL                  RN                  \(4   S%\,S\,S!\\   S\4
S& jjr9\
RD                  RF                  \
RH                  RJ                  S
SSSSSSS#\Rf                  S4S$\\
RL                  RN                  \(4   S\\
RL                  RN                  \(4   S\\
RD                  RR                  \(4   S\\
RH                  RT                  \(4   S\+S\\(   S\+S\,S\\-   S\\+   S\\
R\                  R^                     S%\,S\,S!\\   S\
R8                  R`                  4S' jjr:g)*Asynchronous DNS stub resolver.    N)AnyDictListOptionalUnion)NXDOMAINNoAnswer	NoRootSOANotAbsolutec                      \ rS rSrSr\R                  R                  \R                  R                  SSSSSSS4	S\
\R                  R                  \4   S\
\R                  R                  \4   S	\
\R                  R                  \4   S
\S\\   S\S\S\\   S\\   S\\R(                  R*                     S\R,                  R.                  4S jjrS\S\S\S\R,                  R.                  4S jr\R8                  4S\
\R                  R                  \4   S\S\S\R,                  R:                  4S jjrS\
\R                  R                  \4   S\R                  R                  4S jrSS\SS4S jjr Sr!g)Resolver*   r   FNTr   qnamerdtyperdclasstcpsourceraise_on_no_answersource_portlifetimesearchbackendreturnc           	        #    [         R                  R                  XX#XFU	5      nU
(       d  [         R                  R	                  5       n
[
        R
                  " 5       n UR                  5       u  pUb  U$ Uc   eSnU(       d  UR                  5       u  nnnU(       a  U
R                  U5      I Sh  vN   U R                  XUR                  5      n UR                  UUUUUU
S9I Sh  vN nUR                  US5      u  pUb  U$ U(       d  M  M   Na N*! [         a   nUR                  SU5      u  nn SnAM  SnAff = f7f)aQ  Query nameservers asynchronously to find the answer to the question.

*backend*, a ``dns.asyncbackend.Backend``, or ``None``.  If ``None``,
the default, then dnspython will use the default backend.

See :py:func:`dns.resolver.Resolver.resolve()` for the
documentation of the other parameters, exceptions, and return
type of this method.
NF)timeoutr   r   max_sizer   )dnsresolver_Resolutionasyncbackendget_default_backendtimenext_requestnext_nameserversleep_compute_timeouterrorsasync_query	Exceptionquery_result)selfr   r   r   r   r   r   r   r   r   r   
resolutionstartrequestanswerdone
nameserverbackoffr   responseex_s                         J/home/matz/Project1/venv/lib/python3.13/site-packages/dns/asyncresolver.pyresolveResolver.resolve-   sS    . \\--#6

 &&::<G		 * 7 7 9W
 !&&&D-7-G-G-I*S'!--000//ARARS%/%;%; '%$/!$ ' &< &  H ",!8!84!H
 %!M/ d  1  !  * 7 7b AIQsT   B2E4D5 ED -D.D 2 EED 
E$D?9E?EEipaddrargskwargsc                   #    0 nUR                  U5        [        R                  R                  US'   [        R                  R
                  US'   U R                  " [        R                  R                  U5      /UQ70 UD6I Sh  vN $  N7f)aw  Use an asynchronous resolver to run a reverse query for PTR
records.

This utilizes the resolve() method to perform a PTR lookup on the
specified IP address.

*ipaddr*, a ``str``, the IPv4 or IPv6 address you want to get
the PTR record for.

All other arguments that can be passed to the resolve() function
except for rdtype and rdclass are also supported by this
function.

r   r   N)	updater   	rdatatypePTR
rdataclassINr8   reversenamefrom_address)r,   r:   r;   r<   modified_kwargss        r7   resolve_addressResolver.resolve_addressn   s     ( +-v&$'MM$5$5!%(^^%6%6	"\\OO((0
37
;J
 
 	
 
s   BBBBnamefamilyc                   #    0 nUR                  U5        UR                  SS5        [        R                  R                  US'   U[
        R                  :X  a[  U R                  " U[        R                  R                  40 UD6I Sh  vN n[        R                  R                  R                  US9$ U[
        R                  :X  a[  U R                  " U[        R                  R                  40 UD6I Sh  vN n[        R                  R                  R                  US9$ U[
        R                  :w  a  [!        SU 35      eUR                  SS5      nUR                  S	S5      n["        R"                  " 5       n	U R                  " U[        R                  R                  4S
U R%                  X5      S.UD6I Sh  vN nUR&                  nU R                  " U[        R                  R                  4S
U R%                  X5      S.UD6I Sh  vN n[        R                  R                  R                  XeU(       + S9n
U
(       d  [)        UR*                  S9eU
$  GN GNk N NU7f)a  Use an asynchronous resolver to query for address records.

This utilizes the resolve() method to perform A and/or AAAA lookups on
the specified name.

*qname*, a ``dns.name.Name`` or ``str``, the name to resolve.

*family*, an ``int``, the address family.  If socket.AF_UNSPEC
(the default), both A and AAAA records will be retrieved.

All other arguments that can be passed to the resolve() function
except for rdtype and rdclass are also supported by this
function.
r   Nr   )v4)v6zunknown address family r   Tr   F)r   r   )rL   rK   	add_empty)r4   )r>   popr   rA   rB   socketAF_INETr8   r?   Ar   HostAnswersmakeAF_INET6AAAA	AF_UNSPECNotImplementedErrorr#   r'   r   r
   r4   )r,   rH   rI   r<   rE   rK   rL   r   r   r.   answerss              r7   resolve_nameResolver.resolve_name   s    . +-v&Hd+%(^^%6%6	"V^^#||D#--//M_MMB<<++00B077v&||D#--*<*<PPPB<<++00B077v'''%(?x&HII,001EtL"&&z48		<<MM
  %**5;	

 
 
 xx<<MMOO
  %**5;	

 
 
 ,,**//(:$: 0 
 BKK00I N Q

sL   BI)I	A.I)7I"8CI)?I% AI)I'AI)"I)%I)'I)c                    #     U R                  USS9I Sh  vN nUR                  nU$  N! [        R                  R                   a  nUR                  n SnAU$ SnAff = f7f)a{  Determine the canonical name of *name*.

The canonical name is the name the resolver uses for queries
after all CNAME and DNAME renamings have been applied.

*name*, a ``dns.name.Name`` or ``str``, the query name.

This method can raise any exception that ``resolve()`` can
raise, other than ``dns.resolver.NoAnswer`` and
``dns.resolver.NXDOMAIN``.

Returns a ``dns.name.Name``.
F)r   N)r8   canonical_namer   r   r	   )r,   rH   r0   r\   es        r7   r\   Resolver.canonical_name   sb     	.<<<GGF#22N 	 H||$$ 	.--N	.s7   A$, *, A$, A!
AA$A!!A$c                   #     [         R                   " 5       U-   nU R                  [        R                  R                  SUS9I Sh  vN n[        R
                  R                  U5      n[        R                  R                  X45      I Sh  vN n[        U5      S:  a  XPl	        gg Na N! [         a     gf = f7f)aS  Try to update the resolver's nameservers using Discovery of Designated
Resolvers (DDR).  If successful, the resolver will subsequently use
DNS-over-HTTPS or DNS-over-TLS for future queries.

*lifetime*, a float, is the maximum time to spend attempting DDR.  The default
is 5 seconds.

If the SVCB query is successful and results in a non-empty list of nameservers,
then the resolver's nameservers are set to the returned servers in priority
order.

The current implementation does not use any address hints from the SVCB record,
nor does it resolve addresses for the SCVB target name, rather it assumes that
the bootstrap nameserver will always be one of the addresses and uses it.
A future revision to the code may offer fuller support.  The code verifies that
the bootstrap nameserver is in the Subject Alternative Name field of the
TLS certficate.
svcb)r   Nr   )r#   r8   r   _ddr_local_resolver_namequery
_remaining_get_nameservers_asynclennameserversr*   )r,   r   
expirationr0   r   rg   s         r7   try_ddrResolver.try_ddr   s     &
	x/J<<--v (  F ii**:6G # ? ? PPK;!##.  $ Q  		sN   B>AB. B*	AB. B,B. (B>*B. ,B. .
B;8B>:B;;B>)rg   g      @)"__name__
__module____qualname____firstlineno____doc__r   r?   rQ   rA   rB   r   rH   Namestr	RdataType
RdataClassboolr   intfloatr!   Backendr   Answerr8   r   rF   rO   rV   rR   rY   r\   ri   __static_attributes__     r7   r   r   *   s   )
 7:mmoo9<9J9J $#'$(!%6:?"SXX]]C'(?" cmm--s23?" s~~00#56	?"
 ?" ?" !?" ?" 5/?" ?" #**223?" 
		?"B

"%
14
			
> &&ACHHMM3&'A A 	A
 
	!	!AJsxx}}c/A)B sxx}} *e d  r|   r   r   c                  B    [         c
  [        5         [         c   e[         $ )zDGet the default asynchronous resolver, initializing it if necessary.)default_resolverreset_default_resolverr{   r|   r7   get_default_resolverr     s      '''r|   c                      [        5       qg)zRe-initialize default asynchronous resolver.

Note that the resolver configuration (i.e. /etc/resolv.conf on UNIX
systems) will be re-read immediately.
N)r   r~   r{   r|   r7   r   r     s      zr|   FTr   r   r   r   r   r   r   r   r   r   c
                 b   #    [        5       R                  U UUUUUUUUU	5
      I Sh  vN $  N7f)zQuery nameservers asynchronously to find the answer to the question.

This is a convenience function that uses the default resolver
object to make the query.

See :py:func:`dns.asyncresolver.Resolver.resolve` for more
information on the parameters.
N)r   r8   )
r   r   r   r   r   r   r   r   r   r   s
             r7   r8   r8     sE     * &'//   s   &/-/r:   r;   r<   c                 Z   #    [        5       R                  " U /UQ70 UD6I Sh  vN $  N7f)zUse a resolver to run a reverse query for PTR records.

See :py:func:`dns.asyncresolver.Resolver.resolve_address` for more
information on the parameters.
N)r   rF   )r:   r;   r<   s      r7   rF   rF   =  s+      &'77PPPPPPs   "+)+rH   rI   c                 T   #    [        5       R                  " X40 UD6I Sh  vN $  N7f)zUse a resolver to asynchronously query for address records.

See :py:func:`dns.asyncresolver.Resolver.resolve_name` for more
information on the parameters.
N)r   rY   )rH   rI   r<   s      r7   rY   rY   I  s&      &'44TLVLLLLs   (&(c                 P   #    [        5       R                  U 5      I Sh  vN $  N7f)zDetermine the canonical name of *name*.

See :py:func:`dns.resolver.Resolver.canonical_name` for more
information on the parameters and possible exceptions.
N)r   r\   )rH   s    r7   r\   r\   U  s!      &'66t<<<<   &$&r   c                 P   #    [        5       R                  U 5      I Sh  vN $  N7f)a
  Try to update the default resolver's nameservers using Discovery of Designated
Resolvers (DDR).  If successful, the resolver will subsequently use
DNS-over-HTTPS or DNS-over-TLS for future queries.

See :py:func:`dns.resolver.Resolver.try_ddr` for more information.
N)r   ri   )r   s    r7   ri   ri   _  s!      &'//8888r   r   c                 d  #    [        U [        5      (       a8  [        R                  R	                  U [        R                  R
                  5      n Uc
  [        5       nU R                  5       (       d  [        U 5      e  UR                  U [        R                  R                  XUS9I Sh  vN nUR                  c   eUR                  R                  U :X  a  U $   U R                  5       n Mr   NC! [        [        4 a     N'f = f! [        R                  R                    a    ["        ef = f7f)zFind the name of the zone which contains the specified name.

See :py:func:`dns.resolver.Resolver.zone_for_name` for more
information on the parameters and possible exceptions.
N)r   )
isinstancerr   r   rH   	from_textrootr   is_absoluter   r8   r?   SOArrsetr	   r
   parentNoParentr   )rH   r   r   r   r   r0   s         r7   zone_for_namer   i  s     $xx!!$6')$
		#++cmm''w ,  F <<+++||  D( )
	;;=D  (# 		 xx   	O	sT   A<D0?-C2 ,C0-.C2 D0D .D00C2 2DD0DD0%D--D05   whereportc                   #    Uc
  [        5       n/ n[        U [        5      (       aS  [        R                  R                  U 5      (       a/  UR                  [        R                  R                  X5      5        O^UR                  X5      I Sh  vN nUR                  5        H1  nUR                  [        R                  R                  Xa5      5        M3     [        R                  R                  SS9nXGl        U$  Nn7f)a  Make a stub resolver using the specified destination as the full resolver.

*where*, a ``dns.name.Name`` or ``str`` the domain name or IP address of the
full resolver.

*port*, an ``int``, the port to use.  If not specified, the default is 53.

*family*, an ``int``, the address family to use.  This parameter is used if
*where* is not an address.  The default is ``socket.AF_UNSPEC`` in which case
the first address returned by ``resolve_name()`` will be used, otherwise the
first address of the specified family will be used.

*resolver*, a ``dns.asyncresolver.Resolver`` or ``None``, the resolver to use for
resolution of hostnames.  If not specified, the default resolver will be used.

Returns a ``dns.resolver.Resolver`` or raises an exception.
NF)	configure)r   r   rr   r   inet
is_addressappendr2   Do53NameserverrY   	addressesasyncresolverr   rg   )r   r   rI   r   rg   rX   addressress           r7   make_resolver_atr     s     . ')?AK%#(("5"5e"<"<3>>88EF --e<<((*Gs~~<<WKL +



$
$u
$
5C!OJ =s   BC?C=A/C?c                 ~   #    [        XX5      I Sh  vN nUR                  UUUUUUUUU	U
5
      I Sh  vN $  N& N7f)am  Query nameservers to find the answer to the question.

This is a convenience function that calls ``dns.asyncresolver.make_resolver_at()``
to make a resolver, and then uses it to resolve the query.

See ``dns.asyncresolver.Resolver.resolve`` for more information on the resolution
parameters, and ``dns.asyncresolver.make_resolver_at`` for information about the
resolver parameters *where*, *port*, *family*, and *resolver*.

If making more than one query, it is more efficient to call
``dns.asyncresolver.make_resolver_at()`` and then use that resolver for the queries
instead of calling ``resolve_at()`` multiple times.
N)r   r8   )r   r   r   r   r   r   r   r   r   r   r   r   rI   r   r   s                  r7   
resolve_atr     sU     : !f?
?C   @s   =9!=;==)r   Nrk   );rp   rO   r#   typingr   r   r   r   r   dns._ddrr   dns.asyncbackenddns.asyncquerydns.exceptiondns.name	dns.querydns.rdataclassdns.rdatatypedns.resolverr	   r
   r   r   
asyncqueryudp_udpr   _tcpr   BaseResolverr   r~   r   r   r?   rQ   rA   rB   rH   rq   rr   rs   rt   ru   rv   rw   r!   rx   ry   r8   rF   rV   rR   rY   r\   ri   r   r   r   r{   r|   r7   <module>r      s  $ &   3 3          D C ~~
~~Ws||(( Wt  h " 36--//58^^5F5F # $!26 #$ #--))3./  3>>,,c12  
	 
 SM      uo  TN  c&&../  	\\ F	Q	Q	Q'*	Q\\	Q 4:3C3C	M
s"
#	M-0	MOR	M\\	M=uSXX]]C%78 =SXX]] =95 94 9 *-):):#'26!
s"
#!^^&&! 
! x 	!
 c&&../! 	XX]]!L ""#'	"#$"
" " x 	"
 "P 36--//58^^5F5F # $!26""#')#$)#$) #--))3./) 3>>,,c12	)
 
) SM) ) ) uo) TN) c&&../) ) ) x ) 	\\)r|   