/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__/tokenizer.cpython-39.pyc (17256B)
a àMÒe\ã@s¢dZddlZddlZddlmZmZmZmZddlZ ddl Z ddl Z hd£Z dhZ dZdZdZdZd Zd Zd ZGd d „d e jjƒZGdd„dƒZGdd„dƒZdS)zTokenize DNS zone file formatéN)ÚAnyÚListÚOptionalÚTuple>ú ú"Ú ú(ú;ú ú)rééééééc@seZdZdZdS)ÚUngetBufferFullzDAn attempt was made to unget a token when the unget buffer was full.N)Ú__name__Ú __module__Ú __qualname__Ú__doc__©rrú1/usr/lib/python3.9/site-packages/dns/tokenizer.pyr(src@sÎeZdZdZd#eeeeedœdd„Z edœd d „Z edœd d „Z edœd d„Z edœdd„Z edœdd„Zedœdd„Zedœdd„Zedœdd„Zdd„Zdd„Zdd„Zddœdd „Zddœd!d"„ZdS)$ÚTokenzŽA DNS zone file format token. ttype: The token type value: The token value has_escape: Does the token value contain escapes? ÚFN©ÚttypeÚvalueÚ has_escapeÚcommentcCs||_||_||_||_dS)zInitialize a token instance.Nr)Úselfrrrr rrrÚ__init__4s zToken.__init__©ÚreturncCs |jtkS©N)rÚEOF©r!rrrÚis_eofBsz Token.is_eofcCs |jtkSr%)rÚEOLr'rrrÚis_eolEsz Token.is_eolcCs |jtkSr%)rÚ WHITESPACEr'rrrÚ is_whitespaceHszToken.is_whitespacecCs |jtkSr%)rÚ IDENTIFIERr'rrrÚ is_identifierKszToken.is_identifiercCs |jtkSr%)rÚ QUOTED_STRINGr'rrrÚis_quoted_stringNszToken.is_quoted_stringcCs |jtkSr%)rÚCOMMENTr'rrrÚ is_commentQszToken.is_commentcCs |jtkSr%)rÚ DELIMITERr'rrrÚ is_delimiterTszToken.is_delimitercCs|jtkp|jtkSr%)rr)r&r'rrrÚ is_eol_or_eofWszToken.is_eol_or_eofcCs&t|tƒsdS|j|jko$|j|jkS)NF©Ú isinstancerrr©r!ÚotherrrrÚ__eq__Zs z Token.__eq__cCs&t|tƒsdS|j|jkp$|j|jkS)NTr6r8rrrÚ__ne___s z Token.__ne__cCsd|j|jfS)Nz%d "%s")rrr'rrrÚ__str__dsz Token.__str__cCs|js |Sd}t|jƒ}d}||k�r|j|}|d7}|dkrþ||krPtjj‚|j|}|d7}| ¡rþ||krztjj‚|j|}|d7}||krœtjj‚|j|}|d7}| ¡r¾| ¡sÆtjj‚t|ƒdt|ƒdt|ƒ}|dkrötjj‚t |ƒ}||7}qt |j |ƒS)Nrrr ú\édé éÿ) rÚlenrÚdnsÚ exceptionÚ UnexpectedEndÚisdigitÚ SyntaxErrorÚintÚchrrr©r!Z unescapedÚlÚiÚcZc2Zc3Z codepointrrrÚunescapegs<        zToken.unescapecCs(d}t|jƒ}d}||k�r|j|}|d7}|dk�r ||krHtjj‚|j|}|d7}| ¡rü||krrtjj‚|j|}|d7}||kr”tjj‚|j|}|d7}| ¡r¶| ¡s¾tjj‚t|ƒdt|ƒdt|ƒ}|dkrîtjj‚|d|7}n || ¡7}q|| ¡7}qt |j t |ƒƒS) Nórr r=r>r?r@s%c) rArrBrCrDrErFrGÚencoderrÚbytesrIrrrÚunescape_to_bytes‡s:        zToken.unescape_to_bytes)rFN)rrrrrGrÚboolrÚstrr"r(r*r,r.r0r2r4r5r:r;r<rMrQrrrrr,s. ûû  rc@sØeZdZdZejddfeeeee j j dœdd„Z edœdd„Z eeefdœd d „Zedd œd d „Zedœdd„Zd>eeedœdd„Zeddœdd„Zdd„ZeZdd„Zd?eedœdd„Zedœdd „Zd@eedœd!d"„ZdAeedœd#d$„ZdBeedœd%d&„ZdCeeed'œd(d)„Zedœd*d+„Z dDeee!ed,œd-d.„Z"dEeed/œd0d1„Z#dFeee j j$eee j j$e j j$d2œd3d4„Z%dGee j j$eee j j$e j j$d5œd6d7„Z&edœd8d9„Z'edœd:d;„Z(edœdzzrFr )r7rSÚioÚStringIOrPÚdecodeÚsysÚstdinÚfileÚ ungotten_charÚungotten_tokenÚ multilineÚquotingÚeofÚ _DELIMITERSÚ delimitersÚ line_numberrVrBÚnameZ IDNA_2003rW)r!rUrVrWrrrr"çs2      zTokenizer.__init__r#cCsZ|jdurJ|jrd}qV|j d¡}|dkr2d|_qV|dkrV|jd7_n |j}d|_|S)zRead a character from input.Nrr Tr)r^rbr]Úreadre©r!rLrrrÚ _get_chars  zTokenizer._get_charcCs |j|jfS)z·Return the current location in the input. Returns a (string, int) tuple. The first item is the filename of the input, the second is the current line number. )rVrer'rrrÚwhere)szTokenizer.where)rLr$cCs|jdurt‚||_dS)a%Unget a character. The unget buffer for characters is only one character large; it is an error to try to unget a character when the unget buffer is not empty. c: the character to unget raises UngetBufferFull: there is already an ungotten char N)r^rrhrrrÚ _unget_char2s zTokenizer._unget_charcCsFd}| ¡}|dkr8|dkr8|dks*|js8| |¡|S|d7}qdS)aFConsume input until a non-whitespace character is encountered. The non-whitespace character is then ungotten, and the number of whitespace characters consumed is returned. If the tokenizer is in multiline mode, then newlines are whitespace. Returns the number of characters skipped. rr rrr N)rir`rk)r!ÚskippedrLrrrÚskip_whitespaceBs  zTokenizer.skip_whitespaceF)Ú want_leadingÚ want_commentr$c Cs¼|jdur>|j}d|_| ¡r(|r>|Sn| ¡r:|r>|Sn|S| ¡}|r\|dkr\ttdƒSd}t}d}| ¡}|dks„||jv�r|dkrš|j ršt j j ‚|dk�r|t k�r|dkrÒ|jd7_| ¡qh�q|dk�r |jdkrît j j‚|jd8_| ¡qh�q|d k�rH|j �s0d |_ t|_t }qhnd|_ t|_| ¡qhn¾|d k�r\ttd ƒS|d k�rþ| ¡}|d k�s’|dk�r†�q’||7}�qf|�r¬| |¡tt|ƒS|dk�rÖ|j�rÊt j  d ¡‚tt|d�S|j�rî| ¡d}qhnttd |d�Sn|}t}n | |¡�q„nb|j �r8|d k�r8t j  d¡‚nB|dk�rz||7}d }| ¡}|dk�sr|d k�rz|j �szt j j ‚||7}qh|dk�r°|t k�r°|j�r¬t j  d ¡‚t}t|||ƒS)a½Get the next token. want_leading: If True, return a WHITESPACE token if the first character read is whitespace. The default is False. want_comment: If True, return a COMMENT token if the first token read is a comment. The default is False. Raises dns.exception.UnexpectedEnd: input ended prematurely Raises dns.exception.SyntaxError: input was badly formed Returns a Token. Nrr rFr r r rTrr zunbalanced parentheses)r znewline in quoted stringr=)r_r,r2rmrr+r-rirdrarBrCrDr/r`rFÚ_QUOTING_DELIMITERSrcr)rkr1r&r3) r!rnroZutokenrlÚtokenrrrLrrrÚgetVs              ÿ     z Tokenizer.get)rqr$cCs|jdurt‚||_dS)aUnget a token. The unget buffer for tokens is only one token large; it is an error to try to unget a token when the unget buffer is not empty. token: the token to unget Raises UngetBufferFull: there is already an ungotten token N)r_r©r!rqrrrÚungetÅs zTokenizer.ungetcCs| ¡}| ¡rt‚|S)zHReturn the next item in an iteration. Returns a Token. )rrr(Ú StopIterationrsrrrÚnextÕszTokenizer.nextcCs|Sr%rr'rrrÚ__iter__âszTokenizer.__iter__r?)Úbaser$cCsB| ¡ ¡}| ¡s tj d¡‚|j ¡s6tj d¡‚t|j|ƒS)z¤Read the next token and interpret it as an unsigned integer. Raises dns.exception.SyntaxError if not an unsigned integer. Returns an int. úexpecting an identifierzexpecting an integer) rrrMr.rBrCrFrrErG)r!rxrqrrrÚget_intçs     zTokenizer.get_intcCs,| ¡}|dks|dkr(tj d|¡‚|S)z¸Read the next token and interpret it as an 8-bit unsigned integer. Raises dns.exception.SyntaxError if not an 8-bit unsigned integer. Returns an int. rr@z#%d is not an unsigned 8-bit integer©rzrBrCrF)r!rrrrÚ get_uint8ös ÿzTokenizer.get_uint8cCsJ|j|d�}|dks|dkrF|dkr6tj d|¡‚ntj d|¡‚|S)z¸Read the next token and interpret it as a 16-bit unsigned integer. Raises dns.exception.SyntaxError if not a 16-bit unsigned integer. Returns an int. ©rxriÿÿéz*%o is not an octal unsigned 16-bit integerz$%d is not an unsigned 16-bit integerr{©r!rxrrrrÚ get_uint16s ÿÿzTokenizer.get_uint16cCs0|j|d�}|dks|dkr,tj d|¡‚|S)z¸Read the next token and interpret it as a 32-bit unsigned integer. Raises dns.exception.SyntaxError if not a 32-bit unsigned integer. Returns an int. r}rlÿÿz$%d is not an unsigned 32-bit integerr{rrrrÚ get_uint32s ÿzTokenizer.get_uint32cCs0|j|d�}|dks|dkr,tj d|¡‚|S)z¸Read the next token and interpret it as a 48-bit unsigned integer. Raises dns.exception.SyntaxError if not a 48-bit unsigned integer. Returns an int. r}rlÿÿÿz$%d is not an unsigned 48-bit integerr{rrrrÚ get_uint48+s ÿzTokenizer.get_uint48)Ú max_lengthr$cCsL| ¡ ¡}| ¡s(| ¡s(tj d¡‚|rFt|jƒ|krFtj d¡‚|jS)zúRead the next token and interpret it as a string. Raises dns.exception.SyntaxError if not a string. Raises dns.exception.SyntaxError if token value length exceeds max_length (if specified). Returns a string. zexpecting a stringzstring too long) rrrMr.r0rBrCrFrAr)r!rƒrqrrrÚ get_string;s   zTokenizer.get_stringcCs&| ¡ ¡}| ¡s tj d¡‚|jS)z—Read the next token, which should be an identifier. Raises dns.exception.SyntaxError if not an identifier. Returns a string. ry)rrrMr.rBrCrFrrsrrrÚget_identifierLs  zTokenizer.get_identifier)Ú max_tokensr$cCs>g}| ¡}| ¡r | |¡q:| |¡t|ƒ|krq:q|S)zµReturn the remaining tokens on the line, until an EOL or EOF is seen. max_tokens: If not None, stop after this number of tokens. Returns a list of tokens. )rrr5rtÚappendrA)r!r†ÚtokensrqrrrÚ get_remainingYs   zTokenizer.get_remaining)Ú allow_emptyr$cCsXd}| ¡ ¡}| ¡r$| |¡q@| ¡s4tjj‚||j7}q|sT|sTtj d¡‚|S)aRead the remaining tokens on the line, which should be identifiers. Raises dns.exception.SyntaxError if there are no remaining tokens, unless `allow_empty=True` is given. Raises dns.exception.SyntaxError if a token is seen that is not an identifier. Returns a string containing a concatenation of the remaining identifiers. rzexpecting another identifier) rrrMr5rtr.rBrCrFr)r!rŠÚsrqrrrÚ!concatenate_remaining_identifiersls     z+Tokenizer.concatenate_remaining_identifiers)rqÚoriginÚ relativizeÚ relativize_tor$cCs8| ¡stj d¡‚tj |j||j¡}| |p2||¡S)z�Try to interpret the token as a DNS name. Raises dns.exception.SyntaxError if not a name. Returns a dns.name.Name. ry) r.rBrCrFrfÚ from_textrrWZchoose_relativity)r!rqr�rŽr�rfrrrÚas_name…s  zTokenizer.as_name)r�rŽr�r$cCs| ¡}| ||||¡S)z—Read the next token and interpret it as a DNS name. Raises dns.exception.SyntaxError if not a name. Returns a dns.name.Name. )rrr‘)r!r�rŽr�rqrrrÚget_name—s zTokenizer.get_namecCs,| ¡}| ¡s(tj d|j|jf¡‚|S)znRead the next token and raise an exception if it isn't EOL or EOF. Returns a string. z expected EOL or EOF, got %d "%s")rrr5rBrCrFrrrsrrrÚget_eol_as_token§s ÿzTokenizer.get_eol_as_tokencCs | ¡jSr%)r“rr'rrrÚget_eolµszTokenizer.get_eolcCs.| ¡ ¡}| ¡s tj d¡‚tj |j¡S)z¾Read the next token and interpret it as a DNS TTL. Raises dns.exception.SyntaxError or dns.ttl.BadTTL if not an identifier or badly formed. Returns an int. ry) rrrMr.rBrCrFZttlr�rrsrrrÚget_ttl¸s  zTokenizer.get_ttl)FF)r?)r?)r?)r?)N)N)F)NFN)NFN)*rrrrr[r\rrrSrBrfZ IDNACodecr"rirrGrjrkrmrRrrrrtrvÚ__next__rwrzr|r€r�r‚r„r…rr‰rŒÚNamer‘r’r“r”r•rrrrrTÆsb"ü ü 1 o  û  ú ü  û rT)rrXr[ÚtypingrrrrZ dns.exceptionrBZdns.nameZdns.ttlrcrpr&r)r+r-r/r1r3rCZ DNSExceptionrrrTrrrrÚs&