f&ddlmZmZddlmZddlZddlZddlZddl Zddl ZGddZ Gdde Z Gdd e Z Gd d e ZGd d e ZGdde Zy))OptionalUnion)urlparseNc|eZdZdZdZdefdZdefdZdefdZ de fdZ dde jjd ed eed e d ed edede jj"fdZ dde jjd ed eed e d ede j&j(d edede jj"fdZy) NameservercyNselfs W/var/lib/jenkins/workspace/mettalog/venv/lib/python3.12/site-packages/dns/nameserver.py__init__zNameserver.__init__ s ctr NotImplementedErrorr s r __str__zNameserver.__str__!!rreturnctr rr s r kindzNameserver.kindrrctr rr s r is_always_max_sizezNameserver.is_always_max_sizerrctr rr s r answer_nameserverzNameserver.answer_nameserverrrctr rr s r answer_portzNameserver.answer_portrrrequesttimeoutsource source_portmax_sizeone_rr_per_rrsetignore_trailingctr rr rrr r!r"r#r$s r queryzNameserver.querys "!rbackendc Ktwr r r rrr r!r"r(r#r$s r async_queryzNameserver.async_query*s"!s NFF)__name__ __module__ __qualname__rrstrrboolrrintrdnsmessage QueryMessagefloatrMessager' asyncbackendBackendr+r rr rr s8 ""c""D""3""S""' % ")) " " "  "  " " "    "("' % ")) " " "  "  "!!)) " " "    "rrc^eZdZdedeffd ZdefdZdefdZdZ defdZ defd Z xZ S) AddressAndPortNameserveraddressportc>t|||_||_yr )superrr<r=r r<r= __class__s r rz!AddressAndPortNameserver.__init__9s   rrctr rr s r rzAddressAndPortNameserver.kind>rrcy)NFr r s r rz+AddressAndPortNameserver.is_always_max_sizeArc^|j}|d|jd|jS)N:@)rr<r=)r ns_kinds r rz AddressAndPortNameserver.__str__Ds,))+!DLL>499+66rc|jSr )r<r s r rz*AddressAndPortNameserver.answer_nameserverHs ||rc|jSr )r=r s r rz$AddressAndPortNameserver.answer_portKs yyr) r-r.r/r0r2rrr1rrrr __classcell__rAs@r r;r;8sK3 "c"D73Srr;cdeZdZddedeffd ZdZ ddejjde de eded e d e d e d ejjfd Z ddejjde de eded e dejj d e d e d ejjfdZxZS)Do53Nameserverr<r=c&t|||yr )r?rr@s r rzDo53Nameserver.__init__Ps $'rcy)NDo53r r s r rzDo53Nameserver.kindSsrrrr r!r"r#r$rc |r=tjj||j||j||||}|Stjj ||j||j||d||dd }|S)N)rr=r r!r#r$T) rr=r r!raise_on_truncationr#r$ ignore_errorsignore_unexpected)r3r'tcpr<r=udp) r rrr r!r"r#r$responses r r'zDo53Nameserver.queryVs yy}} YY'!1 /% H0yy}} YY'$(!1 /""&% Hrr(c 4K|rFtjj||j||j||||| d{} | Stjj ||j||j||d|||dd d{} | S7O7w)N)rr=r r!r(r#r$T) rr=r r!rSr(r#r$rTrU)r3 asyncqueryrVr<r=rW) r rrr r!r"r(r#r$rXs r r+zDo53Nameserver.async_query{s  ^^// YY'!1 /0  H4!^^// YY'$(!1 /""&0  H5  s%ABBAB BBB)5r,)r-r.r/r0r2rrr3r4r5r6rr1r7r'r8r9r+rKrLs@r rNrNOs((3("' %#))## #  #  ###   #Z"' %&))&& &  &  &!!))&&&   &rrNceZdZ ddedeedeeefdeffd ZdZdefdZ d Z defd Z de fd Z dd ejj d edeede dedededejj$fdZ dd ejj d edeede dedej(j*dededejj$fdZxZS) DoHNameserverurlbootstrap_addressverifywant_getcZt|||_||_||_||_yr )r?rr^r_r`ra)r r^r_r`rarAs r rzDoHNameserver.__init__s- !2   rcy)NDoHr r s r rzDoHNameserver.kindrDrrcy)NTr r s r rz DoHNameserver.is_always_max_sizesrc|jSr r^r s r rzDoHNameserver.__str__ xxrc|jSr rgr s r rzDoHNameserver.answer_nameserverrhrcLt|jj}|d}|S)Ni)rr^r=)r r=s r rzDoHNameserver.answer_ports%!&& <D rrrr r!r"r#r$c tjj||j||||j|||j |j  SN)rr r!r_r#r$r`post)r3r'httpsr^r_r`rar&s r r'zDoHNameserver.querysQyy  HH#"44-+;;mm#  rr(c Ktjj||j||||j|||j |j  d{S7wrl)r3rZrnr^r_r`rar*s r r+zDoHNameserver.async_querysa^^))  HH#"44-+;;mm#*    sAAAA)NTFFFFr,)r-r.r/r0rrr1rrrrrr2rr3r4r5r6r7r'r8r9r+rKrLs@r r]r]ss,0#' !  !$C= !dCi !  !D3S!& % ))              >"' % ))        !!))       rr]ceZdZ ddededeedeeefffd ZdZ dde jjde d eed ed ed ed ede jjfdZ dde jjde d eed ed ede j j"d ed ede jjfdZxZS) DoTNameserverr<r=hostnamer`cBt|||||_||_yr )r?rrsr`)r r<r=rsr`rAs r rzDoTNameserver.__init__s" $'   rcy)NDoTr r s r rzDoTNameserver.kindrDrrrr r!r"r#r$rc tjj||j|j||||j |j SN)r=rr#r$server_hostnamer`)r3r'tlsr<r=rsr`r&s r r'zDoTNameserver.querysFyy}}  LL-+ MM;;  rr(c Ktjj||j|j||||j |j d{S7wrx)r3rZrzr<r=rsr`r*s r r+zDoTNameserver.async_querysV^^''  LL-+ MM;;(    AAAA)UNTrpr,)r-r.r/r0r2rrr1rrr3r4r5r6r7r'r8r9r+rKrLs@r rrrrsJ"&#'   3-  dCi !& % ))              :"' % ))        !!))       rrrceZdZ ddededeeefdeeffd ZdZ dde jjde d eed ed ed ed ede jjfdZ dde jjde d eed ed ede j j"d ed ede jjfdZxZS) DoQNameserverr<r=r`rycBt|||||_||_yr )r?rr`ry)r r<r=r`ryrAs r rzDoQNameserver.__init__0s# $' .rcy)NDoQr r s r rzDoQNameserver.kind;rDrrrr r!r"r#r$rc tjj||j|j||||j |j SN)r=rr#r$r`ry)r3r'quicr<r=r`ryr&s r r'zDoQNameserver.query>sHyy~~  LL-+;; 00  rr(c Ktjj||j|j||||j |j d{S7wr)r3rZrr<r=r`ryr*s r r+zDoQNameserver.async_querySsX^^((  LL-+;; 00)    r|)r}TNrpr,)r-r.r/r0r2rr1rrrr3r4r5r6r7r'r8r9r+rKrLs@r rr/sJ#')- / / /dCi / "# /!& % ))              :"' % ))        !!))       rr)typingrr urllib.parserdns.asyncbackendr3dns.asyncquerydns.inet dns.message dns.queryrr;rNr]rrrr rr rsk"!*"*"Zz.R-RjM JM `8 ,8 v8 ,8 r