/usr/lib/python3.9/site-packages/dns/__pycache__
NameSizeModeActions
asyncbackend.cpython-39.opt-1.pyc26160644editdlrm
asyncbackend.cpython-39.pyc26160644editdlrm
asyncquery.cpython-39.opt-1.pyc178050644editdlrm
asyncquery.cpython-39.pyc178170644editdlrm
asyncresolver.cpython-39.opt-1.pyc129580644editdlrm
asyncresolver.cpython-39.pyc130020644editdlrm
dnssec.cpython-39.opt-1.pyc321600644editdlrm
dnssec.cpython-39.pyc321880644editdlrm
dnssectypes.cpython-39.opt-1.pyc16160644editdlrm
dnssectypes.cpython-39.pyc16160644editdlrm
e164.cpython-39.opt-1.pyc34520644editdlrm
e164.cpython-39.pyc34520644editdlrm
edns.cpython-39.opt-1.pyc147200644editdlrm
edns.cpython-39.pyc147340644editdlrm
entropy.cpython-39.opt-1.pyc33480644editdlrm
entropy.cpython-39.pyc33480644editdlrm
enum.cpython-39.opt-1.pyc32490644editdlrm
enum.cpython-39.pyc32490644editdlrm
exception.cpython-39.opt-1.pyc55180644editdlrm
exception.cpython-39.pyc57140644editdlrm
flags.cpython-39.opt-1.pyc22080644editdlrm
flags.cpython-39.pyc22080644editdlrm
grange.cpython-39.opt-1.pyc10890644editdlrm
grange.cpython-39.pyc11330644editdlrm
immutable.cpython-39.opt-1.pyc24280644editdlrm
immutable.cpython-39.pyc24280644editdlrm
inet.cpython-39.opt-1.pyc46030644editdlrm
inet.cpython-39.pyc46030644editdlrm
ipv4.cpython-39.opt-1.pyc18440644editdlrm
ipv4.cpython-39.pyc18440644editdlrm
ipv6.cpython-39.opt-1.pyc39380644editdlrm
ipv6.cpython-39.pyc39380644editdlrm
message.cpython-39.opt-1.pyc506310644editdlrm
message.cpython-39.pyc506720644editdlrm
name.cpython-39.opt-1.pyc350740644editdlrm
name.cpython-39.pyc350890644editdlrm
namedict.cpython-39.opt-1.pyc29860644editdlrm
namedict.cpython-39.pyc29860644editdlrm
nameserver.cpython-39.opt-1.pyc89080644editdlrm
nameserver.cpython-39.pyc89080644editdlrm
node.cpython-39.opt-1.pyc116050644editdlrm
node.cpython-39.pyc116050644editdlrm
opcode.cpython-39.opt-1.pyc24750644editdlrm
opcode.cpython-39.pyc24750644editdlrm
query.cpython-39.opt-1.pyc402980644editdlrm
query.cpython-39.pyc403430644editdlrm
rcode.cpython-39.opt-1.pyc32530644editdlrm
rcode.cpython-39.pyc32530644editdlrm
rdata.cpython-39.opt-1.pyc236090644editdlrm
rdata.cpython-39.pyc236090644editdlrm
rdataclass.cpython-39.opt-1.pyc27920644editdlrm
rdataclass.cpython-39.pyc27920644editdlrm
rdataset.cpython-39.opt-1.pyc154370644editdlrm
rdataset.cpython-39.pyc154510644editdlrm
rdatatype.cpython-39.opt-1.pyc66730644editdlrm
rdatatype.cpython-39.pyc66730644editdlrm
renderer.cpython-39.opt-1.pyc98220644editdlrm
renderer.cpython-39.pyc98410644editdlrm
resolver.cpython-39.opt-1.pyc524720644editdlrm
resolver.cpython-39.pyc526250644editdlrm
reversename.cpython-39.opt-1.pyc30550644editdlrm
reversename.cpython-39.pyc30550644editdlrm
rrset.cpython-39.opt-1.pyc78850644editdlrm
rrset.cpython-39.pyc78990644editdlrm
serial.cpython-39.opt-1.pyc29330644editdlrm
serial.cpython-39.pyc29330644editdlrm
set.cpython-39.opt-1.pyc87990644editdlrm
set.cpython-39.pyc87990644editdlrm
tokenizer.cpython-39.opt-1.pyc172420644editdlrm
tokenizer.cpython-39.pyc172560644editdlrm
transaction.cpython-39.opt-1.pyc202610644editdlrm
transaction.cpython-39.pyc202610644editdlrm
tsig.cpython-39.opt-1.pyc103810644editdlrm
tsig.cpython-39.pyc103810644editdlrm
tsigkeyring.cpython-39.opt-1.pyc18350644editdlrm
tsigkeyring.cpython-39.pyc18350644editdlrm
ttl.cpython-39.opt-1.pyc16800644editdlrm
ttl.cpython-39.pyc16800644editdlrm
update.cpython-39.opt-1.pyc88860644editdlrm
update.cpython-39.pyc88860644editdlrm
version.cpython-39.opt-1.pyc5630644editdlrm
version.cpython-39.pyc5630644editdlrm
versioned.cpython-39.opt-1.pyc87230644editdlrm
versioned.cpython-39.pyc87750644editdlrm
win32util.cpython-39.opt-1.pyc56530644editdlrm
win32util.cpython-39.pyc56530644editdlrm
wire.cpython-39.opt-1.pyc33270644editdlrm
wire.cpython-39.pyc33550644editdlrm
xfr.cpython-39.opt-1.pyc77710644editdlrm
xfr.cpython-39.pyc77890644editdlrm
zone.cpython-39.opt-1.pyc452680644editdlrm
zone.cpython-39.pyc454120644editdlrm
zonefile.cpython-39.opt-1.pyc176630644editdlrm
zonefile.cpython-39.pyc176870644editdlrm
zonetypes.cpython-39.opt-1.pyc10230644editdlrm
zonetypes.cpython-39.pyc10230644editdlrm
_asyncbackend.cpython-39.opt-1.pyc42080644editdlrm
_asyncbackend.cpython-39.pyc42080644editdlrm
_asyncio_backend.cpython-39.opt-1.pyc89840644editdlrm
_asyncio_backend.cpython-39.pyc90020644editdlrm
_ddr.cpython-39.opt-1.pyc40710644editdlrm
_ddr.cpython-39.pyc40710644editdlrm
_features.cpython-39.opt-1.pyc23670644editdlrm
_features.cpython-39.pyc23670644editdlrm
_immutable_ctx.cpython-39.opt-1.pyc21590644editdlrm
_immutable_ctx.cpython-39.pyc21590644editdlrm
__init__.cpython-39.opt-1.pyc6670644editdlrm
__init__.cpython-39.pyc6670644editdlrm
Edit: /usr/lib/python3.9/site-packages/dns/__pycache__/edns.cpython-39.pyc (14734B)
a àMÒeŸ;ã@sšUdZddlZddlZddlZddlZddlmZmZmZm Z ddl Z ddl Z ddl Z ddlZ Gdd„de jjƒZGdd„dƒZGdd „d eƒZGd d „d eƒZGd d „d e jjƒZGdd„deƒZGdd„deƒZejeejeejeiZeeefed<eedœdd„Ze eefdedœdd„Ze eefe e!e!edœdd„Z"eeddœdd„Z#ejZej$Z$ej%Z%ej&Z&ejZej'Z'ej(Z(ej)Z)ej*Z*ej+Z+ejZdS) z EDNS OptionséN)ÚAnyÚDictÚOptionalÚUnionc@sDeZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z ed d „ƒZdS)Ú OptionTypeéééééé é é é é écCsdS©Niÿÿ©©Úclsrrú,/usr/lib/python3.9/site-packages/dns/edns.pyÚ_maximum8szOptionType._maximumN)Ú__name__Ú __module__Ú __qualname__ÚNSIDÚDAUÚDHUÚN3UÚECSÚEXPIREÚCOOKIEÚ KEEPALIVEÚPADDINGÚCHAINÚEDEÚ classmethodrrrrrr src@s¤eZdZdZeeefdœdd„Zd ee ee dœdd„Z ed œd d „Z e ed dd œdd„ƒZdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„ZdS)!ÚOptionz%Base class for all EDNS option types.©ÚotypecCst |¡|_dS)z_Initialize an option. *otype*, a ``dns.edns.OptionType``, is the option type. N)rÚmaker))Úselfr)rrrÚ__init__@szOption.__init__N©ÚfileÚreturncCst‚dS)zUConvert an option to wire format. Returns a ``bytes`` or ``None``. N©ÚNotImplementedError©r+r.rrrÚto_wireGszOption.to_wire©r/cCst‚dS©Nr0©r+rrrÚto_textOszOption.to_textúdns.wire.Parser©r)Úparserr/cCst‚dS)aBuild an EDNS option object from wire format. *otype*, a ``dns.edns.OptionType``, is the option type. *parser*, a ``dns.wire.Parser``, the parser, which should be restructed to the option length. Returns a ``dns.edns.Option``. Nr0©rr)r:rrrÚfrom_wire_parserRs zOption.from_wire_parsercCs,| ¡}| ¡}||krdS||kr(dSdS)z�Compare an EDNS option with another option of the same type. Returns < 0 if < *other*, 0 if == *other*, and > 0 if > *other*. rééÿÿÿÿ)r3)r+ÚotherÚwireZowirerrrÚ_cmp_sz Option._cmpcCs,t|tƒsdS|j|jkrdS| |¡dkS)NFr©Ú isinstancer'r)rA©r+r?rrrÚ__eq__ls   z Option.__eq__cCs,t|tƒsdS|j|jkrdS| |¡dkS)NTrrBrDrrrÚ__ne__ss   z Option.__ne__cCs(t|tƒr|j|jkrtS| |¡dkS©Nr©rCr'r)ÚNotImplementedrArDrrrÚ__lt__zsz Option.__lt__cCs(t|tƒr|j|jkrtS| |¡dkSrGrHrDrrrÚ__le__sz Option.__le__cCs(t|tƒr|j|jkrtS| |¡dkSrGrHrDrrrÚ__ge__„sz Option.__ge__cCs(t|tƒr|j|jkrtS| |¡dkSrGrHrDrrrÚ__gt__‰sz Option.__gt__cCs| ¡Sr5)r7r6rrrÚ__str__ŽszOption.__str__)N)rrrÚ__doc__rrÚstrr,rrÚbytesr3r7r&r<rArErFrJrKrLrMrNrrrrr'=s  r'cs~eZdZdZeeefeeefdœ‡fdd„ Zde e e edœdd„Z ed œd d „Z e eeefd ed œdd„ƒZ‡ZS)Ú GenericOptionzwGeneric Option Class This class is used for EDNS option types for which we have no better implementation. )r)Údatacs"tƒ |¡tjj |d¡|_dS)NT)Úsuperr,ÚdnsÚrdataÚRdataZ _as_bytesrS)r+r)rS©Ú __class__rrr,™s zGenericOption.__init__Nr-cCs|r| |j¡dS|jSdSr5)ÚwriterSr2rrrr3�s zGenericOption.to_wirer4cCs d|jS)Nz Generic %dr(r6rrrr7¤szGenericOption.to_textr8r9cCs||| ¡ƒSr5©Ú get_remainingr;rrrr<§szGenericOption.from_wire_parser)N)rrrrOrrrPrQr,rrr3r7r&r'r<Ú __classcell__rrrXrrR’s$ þrRcsŠeZdZdZdeeeedœ‡fdd„ Zedœdd „Ze ee d œd d „ƒZ dee ee d œdd„Zeeeefde dœdd„ƒZ‡ZS)Ú ECSOptionz!EDNS Client Subnet (ECS, RFC7871)Nr)ÚaddressÚsrclenÚscopelenc s^tƒ tj¡tj |¡}|tjkrjd|_ |dur6d}tj j   |¡}tj j   |dd¡}tj j   |dd¡}nX|tjkrºd|_ |dur†d}tj j  |¡}tj j   |dd¡}tj j   |dd¡}ntd ƒ‚|dusÎJ‚||_||_||_tj ||¡}tt |d ¡ƒ}|d|…|_|d }|dk�rZt d t|jd d…ƒdd |>@¡}|jdd …||_dS)aŠ*address*, a ``str``, is the client address information. *srclen*, an ``int``, the source prefix length, which is the leftmost number of bits of the address to be used for the lookup. The default is 24 for IPv4 and 56 for IPv6. *scopelen*, an ``int``, the scope prefix length. This value must be 0 in queries, and should be set in responses. éNé8ré€r=éé zBad address familyç @r ÚBr>éÿ)rTr,rrrUZinetZaf_for_addressÚsocketZAF_INET6ÚfamilyrVrWZ_as_ipv6_addressÚ_as_intZAF_INETZ_as_ipv4_addressÚ ValueErrorr_r`raZ inet_ptonÚintÚmathÚceilÚaddrdataÚstructÚpackÚord) r+r_r`raÚafrqÚnbytesZnbitsZlastrXrrr,±s8      &zECSOption.__init__r4cCsd |j|j|j¡S)NzECS {}/{} scope/{})Úformatr_r`rar6rrrr7àszECSOption.to_text)Útextr/c Cs$d}| ¡}d}t|ƒdkr&|d}n>t|ƒdkrV|d|krLtd |¡ƒ‚|d}ntd |¡ƒ‚| d¡}|dkrŠ| d¡\}}d}n(|dkr¤| d¡\}}}ntd |¡ƒ‚z t|ƒ}Wn$tyâtd d  |¡ƒ‚Yn0z t|ƒ} Wn&t�ytd d  |¡ƒ‚Yn0t|| |ƒS) a€Convert a string into a `dns.edns.ECSOption` *text*, a `str`, the text form of the option. Returns a `dns.edns.ECSOption`. Examples: >>> import dns.edns >>> >>> # basic example >>> dns.edns.ECSOption.from_text('1.2.3.4/24') >>> >>> # also understands scope >>> dns.edns.ECSOption.from_text('1.2.3.4/24/32') >>> >>> # IPv6 >>> dns.edns.ECSOption.from_text('2001:4b98::1/64/64') >>> >>> # it understands results from `dns.edns.ECSOption.to_text()` >>> dns.edns.ECSOption.from_text('ECS 1.2.3.4/24/32') rNr=rrbzcould not parse ECS from "{}"ú/Ú0zinvalid scope z"{}": scope must be an integerzinvalid srclen z"{}": srclen must be an integer)ÚsplitÚlenrmrwÚcountrnr^) rxZoptional_prefixÚtokensZecs_textZ n_slashesr_ZtsrclenZtscopeÚscoper`rrrÚ from_textãs<         ÿ   ÿ zECSOption.from_textr-cCs6t d|j|j|j¡|j}|r.| |¡dS|SdS)Nú!HBB)rrrsrkr`rarqrZ©r+r.Úvaluerrrr3s ÿ zECSOption.to_wirer8r9c CsŒ| d¡\}}}tt |d¡ƒ}| |¡}|dkrRd|}tj |d|¡} n.|dkrxd|}tj |d|¡} nt dƒ‚|| ||ƒS) Nr�rgr=éórbézunsupported family) Z get_structrnrorpZ get_bytesrUZipv4Z inet_ntoaZipv6rm) rr)r:rkÚsrcrZaddrlenÚprefixZpadZaddrrrrr<&s zECSOption.from_wire_parser)Nr)N)rrrrOrPrrnr,r7Ú staticmethodr'r€rrQr3r&rrr<r]rrrXrr^®s/8  þr^c@s|eZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZdZdZdZdZdZdZdZedd„ƒZdS)ÚEDECoderr=rbrr„rr r r r r rrrérr†ééééééérecCsdSrrrrrrrTszEDECode._maximumN)rrrZOTHERZUNSUPPORTED_DNSKEY_ALGORITHMZUNSUPPORTED_DS_DIGEST_TYPEZ STALE_ANSWERZ FORGED_ANSWERZDNSSEC_INDETERMINATEZ DNSSEC_BOGUSZSIGNATURE_EXPIREDZSIGNATURE_NOT_YET_VALIDZDNSKEY_MISSINGZRRSIGS_MISSINGZNO_ZONE_KEY_BIT_SETZ NSEC_MISSINGZ CACHED_ERRORZ NOT_READYZBLOCKEDZCENSOREDZFILTEREDZ PROHIBITEDZSTALE_NXDOMAIN_ANSWERZNOT_AUTHORITATIVEZ NOT_SUPPORTEDZNO_REACHABLE_AUTHORITYZ NETWORK_ERRORZ INVALID_DATAr&rrrrrrŠ9s6rŠcs„eZdZdZhd£Zdeeefeedœ‡fdd„ Z edœdd „Z dee ee d œd d „Z eeeefd edœdd„ƒZ‡ZS)Ú EDEOptionz!Extended DNS Error (EDE, RFC8914)>ZDSZDNSKEYZNSECZDNSSECZNXDOMAINZRRSIGsN)Úcoderxcs>tƒ tj¡t |¡|_|dur4t|tƒs4t dƒ‚||_ dS)zÃ*code*, a ``dns.edns.EDECode`` or ``str``, the info code of the extended error. *text*, a ``str`` or ``None``, specifying additional information about the error. Nztext must be string or None) rTr,rr%rŠr*r”rCrPrmrx)r+r”rxrXrrr,^s  zEDEOption.__init__r4csndˆj›�}ˆjtvrPt ˆj¡}d ‡fdd„| d¡Dƒ¡}|d|›d�7}ˆjdurj|dˆj›�7}|S) NzEDE ú c3s$|]}|ˆjvr|n| ¡VqdSr5)Ú_preserve_caseÚtitle)Ú.0Zwordr6rrÚ qsÿz$EDEOption.to_text..Ú_z (ú)z: )r”rŠr7Újoinr{rx)r+ÚoutputZdescrr6rr7ms   þ zEDEOption.to_textr-cCsBt d|j¡}|jdur(||j d¡7}|r:| |¡dS|SdS)Nz!HÚutf8)rrrsr”rxÚencoderZr‚rrrr3zs  zEDEOption.to_wirer8r9cCsLt | ¡¡}| ¡}|r>|ddkr2|dd…}| d¡}nd}|||ƒS)Nr>rrž)rŠr*Z get_uint16r\Údecode)rr)r:r”rxZbtextrrrr<…s   zEDEOption.from_wire_parser)N)N)rrrrOr–rrŠrPrr,r7rrQr3r&rr'r<r]rrrXrr“Ys"   þr“csheZdZedœ‡fdd„ Zdeeedœdd„Zedœd d „Z e e e efe jjed œd d „ƒZ‡ZS)Ú NSIDOption)Únsidcstƒ tj¡||_dSr5)rTr,rrr¢)r+r¢rXrrr,—szNSIDOption.__init__Nr-cCs|r| |j¡dS|jSdSr5)rZr¢r2rrrr3›s zNSIDOption.to_wirer4cCs:tdd„|jDƒƒr |j ¡}nt |j¡ ¡}d|›�S)Ncss|]}|dko|dkVqdS)rfé~Nr)r˜Úcrrrr™£óz%NSIDOption.to_text..zNSID )Úallr¢r ÚbinasciiZhexlify)r+rƒrrrr7¢s zNSIDOption.to_textr9cCs || ¡ƒSr5r[r;rrrr<ªszNSIDOption.from_wire_parser)N)rrrrQr,rrr3rPr7r&rrrUr@ÚParserr'r<r]rrrXrr¡–sþr¡Ú_type_to_class)r)r/cCst |¡}|durt}|S)z„Return the class for the specified option type. The GenericOption class is used if a more specific class is not known. N)r©ÚgetrR)r)rrrrÚget_option_class¸s r«r8r9cCst |¡}t|ƒ}| ||¡S)aBuild an EDNS option object from wire format. *otype*, an ``int``, is the option type. *parser*, a ``dns.wire.Parser``, the parser, which should be restricted to the option length. Returns an instance of a subclass of ``dns.edns.Option``. )rr*r«r<)r)r:rrrrÚoption_from_wire_parserÅs r¬)r)r@ÚcurrentÚolenr/cCsFtj ||¡}| |¡�t||ƒWdƒS1s80YdS)arBuild an EDNS option object from wire format. *otype*, an ``int``, is the option type. *wire*, a ``bytes``, is the wire-format message. *current*, an ``int``, is the offset in *wire* of the beginning of the rdata. *olen*, an ``int``, is the length of the wire-format option data Returns an instance of a subclass of ``dns.edns.Option``. N)rUr@r¨Z restrict_tor¬)r)r@r­r®r:rrrÚoption_from_wireÖs r¯)Úimplementationr)r/cCs |t|<dS)z«Register the implementation of an option type. *implementation*, a ``class``, is a subclass of ``dns.edns.Option``. *otype*, an ``int``, is the option type. N)r©)r°r)rrrÚ register_typeësr±),rOr§rorjrrÚtypingrrrrZdns.enumrUZdns.inetZ dns.rdataZdns.wireÚenumÚIntEnumrr'rRr^rŠr“r¡rr%rr©Ú__annotations__r«rPr¬rQrnr¯r±rrrr r!r"r#r$rrrrÚsPU  =ý þ þ