/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 Me;@sUdZddlZddlZddlZddlZddlmZmZmZm Z ddl Z ddl Z ddl Z ddlZ Gddde jjZGdddZGdd d eZGd d d eZGd d d e jjZGdddeZGdddeZejeejeejeiZeeefed<eedddZe eefdedddZe eefe e!e!edddZ"eeddddZ#ejZej$Z$ej%Z%ej&Z&ejZej'Z'ej(Z(ej)Z)ej*Z*ej+Z+ejZdS) z EDNS OptionsN)AnyDictOptionalUnionc@sDeZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z ed d ZdS) OptionType cCsdSNiclsrr,/usr/lib/python3.9/site-packages/dns/edns.py_maximum8szOptionType._maximumN)__name__ __module__ __qualname__NSIDDAUDHUN3UECSEXPIRECOOKIE KEEPALIVEPADDINGCHAINEDE classmethodrrrrrr src@seZdZdZeeefdddZd ee ee dddZ ed d d Z e ed dd ddZddZddZddZddZddZddZddZddZdS)!Optionz%Base class for all EDNS option types.otypecCst||_dS)z_Initialize an option. *otype*, a ``dns.edns.OptionType``, is the option type. N)rmaker))selfr)rrr__init__@szOption.__init__NfilereturncCstdS)zUConvert an option to wire format. Returns a ``bytes`` or ``None``. NNotImplementedErrorr+r.rrrto_wireGszOption.to_wirer/cCstdSNr0r+rrrto_textOszOption.to_textdns.wire.Parserr)parserr/cCstdS)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``. Nr0rr)r:rrrfrom_wire_parserRs zOption.from_wire_parsercCs,|}|}||krdS||kr(dSdS)zCompare an EDNS option with another option of the same type. Returns < 0 if < *other*, 0 if == *other*, and > 0 if > *other*. r)r3)r+otherwireZowirerrr_cmp_sz Option._cmpcCs,t|tsdS|j|jkrdS||dkS)NFr isinstancer'r)rAr+r?rrr__eq__ls   z Option.__eq__cCs,t|tsdS|j|jkrdS||dkS)NTrrBrDrrr__ne__ss   z Option.__ne__cCs(t|tr|j|jkrtS||dkSNrrCr'r)NotImplementedrArDrrr__lt__zsz Option.__lt__cCs(t|tr|j|jkrtS||dkSrGrHrDrrr__le__sz Option.__le__cCs(t|tr|j|jkrtS||dkSrGrHrDrrr__ge__sz Option.__ge__cCs(t|tr|j|jkrtS||dkSrGrHrDrrr__gt__sz Option.__gt__cCs|Sr5)r7r6rrr__str__szOption.__str__)N)rrr__doc__rrstrr,rrbytesr3r7r&r<rArErFrJrKrLrMrNrrrrr'=s  r'cs~eZdZdZeeefeeefdfdd Zde e e edddZ ed d d Z e eeefd ed ddZZS) 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,dnsrdataRdataZ _as_bytesrS)r+r)rS __class__rrr,s zGenericOption.__init__Nr-cCs|r||jdS|jSdSr5)writerSr2rrrr3s zGenericOption.to_wirer4cCs d|jS)Nz Generic %dr(r6rrrr7szGenericOption.to_textr8r9cCs|||Sr5 get_remainingr;rrrr<szGenericOption.from_wire_parser)N)rrrrOrrrPrQr,rrr3r7r&r'r< __classcell__rrrXrrRs$ rRcseZdZdZdeeeedfdd Zeddd Ze ee d d d Z dee ee d ddZeeeefde dddZZS) ECSOptionz!EDNS Client Subnet (ECS, RFC7871)Nr)addresssrclenscopelenc s^ttjtj|}|tjkrjd|_ |dur6d}tj j |}tj j |dd}tj j |dd}nX|tjkrd|_ |durd}tj j |}tj j |dd}tj j |dd}ntd |dusJ||_||_||_tj||}tt|d }|d||_|d }|dkrZtd t|jd ddd |>@}|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. N8rr= zBad address family @r Br>)rTr,rrrUZinetZaf_for_addresssocketZAF_INET6familyrVrWZ_as_ipv6_address_as_intZAF_INETZ_as_ipv4_address ValueErrorr_r`raZ inet_ptonintmathceiladdrdatastructpackord) r+r_r`raafrqnbytesZnbitsZlastrXrrr,s8      &zECSOption.__init__r4cCsd|j|j|jS)NzECS {}/{} scope/{})formatr_r`rar6rrrr7szECSOption.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$tytd d |Yn0z t|} Wn&tytd d |Yn0t|| |S) aConvert 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)splitlenrmrwcountrnr^) rxZoptional_prefixtokensZecs_textZ n_slashesr_ZtsrclenZtscopescoper`rrr from_texts<           zECSOption.from_textr-cCs6td|j|j|j|j}|r.||dS|SdS)N!HBB)rrrsrkr`rarqrZr+r.valuerrrr3s  zECSOption.to_wirer8r9c Cs|d\}}}tt|d}||}|dkrRd|}tj|d|} n.|dkrxd|}tj|d|} nt d|| ||S) Nrrgr=rbzunsupported family) Z get_structrnrorpZ get_bytesrUZipv4Z inet_ntoaZipv6rm) rr)r:rksrcrZaddrlenprefixZpadZaddrrrrr<&s zECSOption.from_wire_parser)Nr)N)rrrrOrPrrnr,r7 staticmethodr'rrrQr3r&rrr<r]rrrXrr^s/8  r^c@s|eZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZdZdZdZdZdZdZdZeddZdS)EDECoderr=rbrrrr r r r r rrrrrrecCsdSrrrrrrrTszEDECode._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&rrrrrr9s6rcseZdZdZhdZdeeefeedfdd Z eddd Z dee ee d d d Z eeeefd edddZZS) EDEOptionz!Extended DNS Error (EDE, RFC8914)>ZDSZDNSKEYZNSECZDNSSECZNXDOMAINZRRSIGsN)coderxcs>ttjt||_|dur4t|ts4t 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%rr*rrCrPrmrx)r+rrxrXrrr,^s  zEDEOption.__init__r4csndj}jtvrPtj}dfdd|dD}|d|d7}jdurj|dj7}|S) NzEDE  c3s$|]}|jvr|n|VqdSr5)_preserve_casetitle).0Zwordr6rr qsz$EDEOption.to_text.._z ()z: )rrr7joinr{rx)r+outputZdescrr6rr7ms    zEDEOption.to_textr-cCsBtd|j}|jdur(||jd7}|r:||dS|SdS)Nz!Hutf8)rrrsrrxencoderZrrrrr3zs  zEDEOption.to_wirer8r9cCsLt|}|}|r>|ddkr2|dd}|d}nd}|||S)Nr>rr)rr*Z get_uint16r\decode)rr)r:rrxZbtextrrrr<s   zEDEOption.from_wire_parser)N)N)rrrrOrrrrPrr,r7rrQr3r&rr'r<r]rrrXrrYs"   rcsheZdZedfdd ZdeeedddZedd d Z e e e efe jjed d d ZZS) NSIDOption)nsidcsttj||_dSr5)rTr,rrr)r+rrXrrr,szNSIDOption.__init__Nr-cCs|r||jdS|jSdSr5)rZrr2rrrr3s zNSIDOption.to_wirer4cCs:tdd|jDr |j}nt|j}d|S)Ncss|]}|dko|dkVqdS)rf~Nr)rcrrrrz%NSIDOption.to_text..zNSID )allrrbinasciiZhexlify)r+rrrrr7s zNSIDOption.to_textr9cCs ||Sr5r[r;rrrr<szNSIDOption.from_wire_parser)N)rrrrQr,rrr3rPr7r&rrrUr@Parserr'r<r]rrrXrrsr_type_to_class)r)r/cCst|}|durt}|S)zReturn the class for the specified option type. The GenericOption class is used if a more specific class is not known. N)rgetrR)r)rrrrget_option_classs rr8r9cCst|}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*rr<)r)r:rrrroption_from_wire_parsers r)r)r@currentolenr/cCsFtj||}||t||WdS1s80YdS)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@rZ restrict_tor)r)r@rrr:rrroption_from_wires r)implementationr)r/cCs |t|<dS)zRegister 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)rr)rrr register_typesr),rOrrorjrrtypingrrrrZdns.enumrUZdns.inetZ dns.rdataZdns.wireenumIntEnumrr'rRr^rrrrr%rr__annotations__rrPrrQrnrrrrrr r!r"r#r$rrrrsPU  =