/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 Me\@sdZddlZddlZddlmZmZmZmZddlZ ddl Z ddl Z hdZ dhZ dZdZdZdZd Zd Zd ZGd d d e jjZGdddZGdddZdS)zTokenize DNS zone file formatN)AnyListOptionalTuple> " (; )rc@seZdZdZdS)UngetBufferFullzDAn attempt was made to unget a token when the unget buffer was full.N)__name__ __module__ __qualname____doc__rr1/usr/lib/python3.9/site-packages/dns/tokenizer.pyr(src@seZdZdZd#eeeeedddZ edd d Z edd d Z edd dZ edddZ edddZedddZedddZedddZddZddZddZdddd Zddd!d"ZdS)$TokenzA DNS zone file format token. ttype: The token type value: The token value has_escape: Does the token value contain escapes? FNttypevalue has_escapecommentcCs||_||_||_||_dS)zInitialize a token instance.Nr)selfrrrr rrr__init__4s zToken.__init__returncCs |jtkSN)rEOFr!rrris_eofBsz Token.is_eofcCs |jtkSr%)rEOLr'rrris_eolEsz Token.is_eolcCs |jtkSr%)r WHITESPACEr'rrr is_whitespaceHszToken.is_whitespacecCs |jtkSr%)r IDENTIFIERr'rrr is_identifierKszToken.is_identifiercCs |jtkSr%)r QUOTED_STRINGr'rrris_quoted_stringNszToken.is_quoted_stringcCs |jtkSr%)rCOMMENTr'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|tsdS|j|jko$|j|jkS)NF isinstancerrrr!otherrrr__eq__Zs z Token.__eq__cCs&t|tsdS|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}||kr|j|}|d7}|dkr||krPtjj|j|}|d7}|r||krztjj|j|}|d7}||krtjj|j|}|d7}|r|stjjt|dt|dt|}|dkrtjjt |}||7}qt |j |S)Nrrr \d ) rlenrdns exception UnexpectedEndisdigit SyntaxErrorintchrrrr!Z unescapedlicZc2Zc3Z codepointrrrunescapegs<        zToken.unescapecCs(d}t|j}d}||kr|j|}|d7}|dkr ||krHtjj|j|}|d7}|r||krrtjj|j|}|d7}||krtjj|j|}|d7}|r|stjjt|dt|dt|}|dkrtjj|d|7}n ||7}q||7}qt |j t |S) Nrr r=r>r?r@s%c) rArrBrCrDrErFrGencoderrbytesrIrrrunescape_to_bytess:        zToken.unescape_to_bytes)rFN)rrrrrGrboolrstrr"r(r*r,r.r0r2r4r5r:r;r<rMrQrrrrr,s.   rc@seZdZdZejddfeeeee j j dddZ edddZ eeefdd d Zedd d d ZedddZd>eeedddZeddddZddZeZddZd?eedddZeddd Zd@eedd!d"ZdAeedd#d$ZdBeedd%d&ZdCeeed'd(d)Zedd*d+Z dDeee!ed,d-d.Z"dEeed/d0d1Z#dFeee j j$eee j j$e j j$d2d3d4Z%dGee j j$eee j j$e j j$d5d6d7Z&edd8d9Z'edd:d;Z(eddzzrFr )r7rSioStringIOrPdecodesysstdinfile ungotten_charungotten_token multilinequotingeof _DELIMITERS delimiters line_numberrVrBnameZ IDNA_2003rW)r!rUrVrWrrrr"s2      zTokenizer.__init__r#cCsZ|jdurJ|jrd}qV|jd}|dkr2d|_qV|dkrV|jd7_n |j}d|_|S)zRead a character from input.Nrr Tr)r^rbr]readrer!rLrrr _get_chars  zTokenizer._get_charcCs |j|jfS)zReturn 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'rrrwhere)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!skippedrLrrrskip_whitespaceBs  zTokenizer.skip_whitespaceF) want_leading want_commentr$c Cs|jdur>|j}d|_|r(|r>|Sn|r:|r>|Sn|S|}|r\|dkr\ttdSd}t}d}|}|dks||jvr|dkr|j rt j j |dkr|t kr|dkr|jd7_|qhq|dkr |jdkrt j j|jd8_|qhq|d krH|j s0d |_ t|_t }qhnd|_ t|_|qhn|d kr\ttd S|d kr|}|d ks|dkrq||7}qf|r||tt|S|dkr|jrt j d tt|dS|jr|d}qhnttd |dSn|}t}n ||qnb|j r8|d kr8t j dnB|dkrz||7}d }|}|dksr|d krz|j szt j j ||7}qh|dkr|t kr|jrt j d t}t|||S)aGet 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!rnroZutokenrltokenrrrLrrrgetVs                  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_rr!rqrrrungets zTokenizer.ungetcCs|}|rt|S)zHReturn the next item in an iteration. Returns a Token. )rrr( StopIterationrsrrrnextszTokenizer.nextcCs|Sr%rr'rrr__iter__szTokenizer.__iter__r?)baser$cCsB|}|s tjd|js6tjdt|j|S)zRead 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!rxrqrrrget_ints     zTokenizer.get_intcCs,|}|dks|dkr(tjd||S)zRead 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 integerrzrBrCrF)r!rrrr get_uint8s zTokenizer.get_uint8cCsJ|j|d}|dks|dkrF|dkr6tjd|ntjd||S)zRead 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. rxriz*%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,tjd||S)zRead 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}rlz$%d is not an unsigned 32-bit integerr{rrrr get_uint32s zTokenizer.get_uint32cCs0|j|d}|dks|dkr,tjd||S)zRead 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}rlz$%d is not an unsigned 48-bit integerr{rrrr get_uint48+s zTokenizer.get_uint48) max_lengthr$cCsL|}|s(|s(tjd|rFt|j|krFtjd|jS)zRead 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!rrqrrr get_string;s   zTokenizer.get_stringcCs&|}|s tjd|jS)zRead the next token, which should be an identifier. Raises dns.exception.SyntaxError if not an identifier. Returns a string. ry)rrrMr.rBrCrFrrsrrrget_identifierLs  zTokenizer.get_identifier) max_tokensr$cCs>g}|}|r ||q:||t||krq:q|S)zReturn 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. )rrr5rtappendrA)r!rtokensrqrrr get_remainingYs   zTokenizer.get_remaining) allow_emptyr$cCsXd}|}|r$||q@|s4tjj||j7}q|sT|sTtjd|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!rsrqrrr!concatenate_remaining_identifiersls     z+Tokenizer.concatenate_remaining_identifiers)rqorigin relativize relativize_tor$cCs8|stjdtj|j||j}||p2||S)zTry 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!rqrrrrfrrras_names  zTokenizer.as_name)rrrr$cCs|}|||||S)zRead 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!rrrrqrrrget_names zTokenizer.get_namecCs,|}|s(tjd|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")rrr5rBrCrFrrrsrrrget_eol_as_tokens zTokenizer.get_eol_as_tokencCs |jSr%)rrr'rrrget_eolszTokenizer.get_eolcCs.|}|s tjdtj|jS)zRead 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.rBrCrFZttlrrrsrrrget_ttls  zTokenizer.get_ttl)FF)r?)r?)r?)r?)N)N)F)NFN)NFN)*rrrrr[r\rrrSrBrfZ IDNACodecr"rirrGrjrkrmrRrrrrtrv__next__rwrzr|rrrrrrrrNamerrrrrrrrrrTsb" 1 o        rT)rrXr[typingrrrrZ dns.exceptionrBZdns.nameZdns.ttlrcrpr&r)r+r-r/r1r3rCZ DNSExceptionrrrTrrrrs&