Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.52 (Ubuntu)
System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
User : www-data ( 33)
PHP Version : 8.1.2-1ubuntu2.21
Disable Function : NONE
Directory :  /lib/python3/dist-packages/twisted/names/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/twisted/names/__pycache__/resolve.cpython-310.pyc
o

�b��@sbdZddlmZddlmZmZddlmZmZm	Z	Gdd�d�Z
eej�Gdd�dej��Z
d	S)
z�
Lookup a name using multiple resolvers.

Future Plans: This needs someway to specify which resolver answered
the query, or someway to specify (authority|ttl|cache behavior|more?)
�)�implementer)�defer�
interfaces)�common�dns�errorc@seZdZdd�Zdd�ZdS)�FailureHandlercCs||_||_||_dS�N)�resolver�query�timeout)�selfr
rr�r�7/usr/lib/python3/dist-packages/twisted/names/resolve.py�__init__s
zFailureHandler.__init__cCs"|�tjtjt�|�|j|j�Sr	)	�trapr�DomainErrorr�TimeoutError�NotImplementedErrorr
rr)r
�failurerrr�__call__szFailureHandler.__call__N)�__name__�
__module__�__qualname__rrrrrrrsrc@s*eZdZdZdd�Zdd�Zd	dd�ZdS)
�
ResolverChainz8
    Lookup an address using multiple L{IResolver}s
    cCstj�|�||_dS)zi
        @type resolvers: L{list}
        @param resolvers: A L{list} of L{IResolver} providers.
        N)r�ResolverBaser�	resolvers)r
rrrrr%s
zResolverChain.__init__cCs`|js
t�t���St�|||�}|jd�||�}|jdd�D]}|�t	|j||��}q!|S)aN
        Build a L{dns.Query} for the given parameters and dispatch it
        to each L{IResolver} in C{self.resolvers} until an answer or
        L{error.AuthoritativeDomainError} is returned.

        @type name: C{str}
        @param name: DNS name to resolve.

        @type type: C{int}
        @param type: DNS record type.

        @type cls: C{int}
        @param cls: DNS record class.

        @type timeout: Sequence of C{int}
        @param timeout: Number of seconds after which to reissue the query.
            When the last timeout expires, the query is considered failed.

        @rtype: L{Deferred}
        @return: A L{Deferred} which fires with a three-tuple of lists of
            L{twisted.names.dns.RRHeader} instances.  The first element of the
            tuple gives answers.  The second element of the tuple gives
            authorities.  The third element of the tuple gives additional
            information.  The L{Deferred} may instead fail with one of the
            exceptions defined in L{twisted.names.error} or with
            C{NotImplementedError}.
        r�N)
rr�failrrr�Queryr�
addErrbackr)r
�name�cls�typer�q�d�rrrr�_lookup-szResolverChain._lookupNcCsR|js
t�t���S|jd�||�}|jdd�D]}|�t|j||��}q|S)Nrr)rrrrr�lookupAllRecordsr r)r
r!rr%r&rrrr(QszResolverChain.lookupAllRecordsr	)rrr�__doc__rr'r(rrrrrs
$rN)r)�zope.interfacer�twisted.internetrr�
twisted.namesrrrr�	IResolverrrrrrr�<module>s

Spamworldpro Mini