/usr/lib/python3/dist-packages/twisted/names/__pycache__
Edit: /usr/lib/python3/dist-packages/twisted/names/__pycache__/authority.cpython-310.pyc (14736B)
o
¯b+A ã @ sœ d Z ddlZddlZddlmZ ddlmZmZmZ ddl m
Z
ddlmZm
Z
ddlmZ dd d
„ZG dd„ dejƒZG d
d„ deƒZG dd„ deƒZdS )z
Authoritative resolvers.
é N)Údefer)ÚcommonÚdnsÚerror)Úfailure)ÚexecfileÚnativeString)ÚFilePathú/tmp/twisted-names.serialc C s t d¡}t d¡}z)tj | ¡s-t| dƒ}| |d ¡ W d ƒ n1 s(w Y W t |¡ nt |¡ w t| ƒ}| ¡ ¡ \}}W d ƒ n1 sQw Y ||kr`t
|ƒd pad}t| dƒ}| d||f ¡ W d ƒ n1 s{w Y |d |f }|S )
aÛ
Return a monotonically increasing (across program runs) integer.
State is stored in the given file. If it does not exist, it is
created with rw-/---/--- permissions.
This manipulates process-global state by calling C{os.umask()}, so it isn't
thread-safe.
@param filename: Path to a file that is used to store the state across
program runs.
@type filename: L{str}
@return: a monotonically increasing number
@rtype: L{str}
z%Y%m%dé Úwz 0Né r z%s %dz%02d)ÚtimeÚstrftimeÚosÚumaskÚpathÚexistsÚopenÚwriteÚreadlineÚsplitÚint)ÚfilenameÚserialÚoÚfÚ
serialFileÚ
lastSerialÚzoneID© r ú9/usr/lib/python3/dist-packages/twisted/names/authority.pyÚ getSerial s$
ÿ€
ÿÿr" c @ sp e Zd ZdZejejejfZej ej
fZdZdZ
dd„ Zdd„ Zdd„ Zd d
„ Zddd„Zddd„Zdd„ ZdS )Ú
FileAuthoritya
An Authority that is loaded from a file.
This is an abstract class that implements record search logic. To create
a functional resolver, subclass it and override the L{loadFile} method.
@ivar _ADDITIONAL_PROCESSING_TYPES: Record types for which additional
processing will be done.
@ivar _ADDRESS_TYPES: Record types which are useful for inclusion in the
additional section generated during additional processing.
@ivar soa: A 2-tuple containing the SOA domain name as a L{bytes} and a
L{dns.Record_SOA}.
@ivar records: A mapping of domains (as lowercased L{bytes}) to records.
@type records: L{dict} with L{bytes} keys
Nc C s t j | ¡ | |¡ i | _d S ©N)r ÚResolverBaseÚ__init__ÚloadFileÚ_cache©Úselfr r r r! r&