shell bypass 403

Cubjrnet7 Shell


name : exception.cpython-39.pyc
a

�M�eE�@s�dZddlmZmZGdd�de�ZGdd�de�ZGdd�de�ZGd	d
�d
e�ZGdd�de�Z	Gd
d�de�Z
Gdd�de�ZGdd�de�ZGdd�de�Z
Gdd�de�ZGdd�d�ZdS)z�Common DNS Exceptions.

Dnspython modules may also define their own exceptions, which will
always be subclasses of ``DNSException``.
�)�Optional�SetcsxeZdZUdZdZeeed<e�Z	e
eed<dZeeed<�fdd�Zdd	�Z
d
d�Zdd
�Z�fdd�Z�ZS)�DNSExceptiona�Abstract base class shared by all dnspython exceptions.

    It supports two basic modes of operation:

    a) Old/compatible mode is used if ``__init__`` was called with
    empty *kwargs*.  In compatible mode all *args* are passed
    to the standard Python Exception class as before and all *args* are
    printed by the standard ``__str__`` implementation.  Class variable
    ``msg`` (or doc string if ``msg`` is ``None``) is returned from ``str()``
    if *args* is empty.

    b) New/parametrized mode is used if ``__init__`` was called with
    non-empty *kwargs*.
    In the new mode *args* must be empty and all kwargs must match
    those set in class variable ``supp_kwargs``. All kwargs are stored inside
    ``self.kwargs`` and used in a new ``__str__`` implementation to construct
    a formatted message based on the ``fmt`` class variable, a ``string``.

    In the simplest case it is enough to override the ``supp_kwargs``
    and ``fmt`` class variables to get nice parametrized messages.
    N�msg�supp_kwargs�fmtcsp|j|i|��|r2|jfi|��|_t|�|_nt�|_|jdurL|j|_|r^t�j|�nt��|j�dS�N)	�
_check_params�
_check_kwargs�kwargs�strr�dict�__doc__�super�__init__��self�argsr��	__class__��1/usr/lib/python3.9/site-packages/dns/exception.pyr7s
zDNSException.__init__cOs$|s|r t|�t|�ks Jd��dS)zsOld exceptions supported only args and not kwargs.

        For sanity we do not allow to mix old and new behavior.z=keyword arguments are mutually exclusive with positional argsN)�boolrrrrr	Gs��zDNSException._check_paramscKs(|r$t|���|jks$Jd|j��|S)Nz-following set of keyword args is required: %s)�set�keysr)rrrrrr
Ps��zDNSException._check_kwargscKsdi}|��D]R\}}t|ttf�rVttt|��||<t||�dkr^||��||<q|||<q|S)z�Format kwargs before printing them.

        Resulting dictionary has to have keys necessary for str.format call
        on fmt class variable.
        �)�items�
isinstance�listr�mapr�len�pop)rr�fmtargs�kw�datarrr�_fmt_kwargsWs
zDNSException._fmt_kwargscs>|jr0|jr0|jfi|j��}|jjfi|��St���SdSr)rrr%�formatr�__str__)rr"rrrr'iszDNSException.__str__)�__name__�
__module__�__qualname__rrrr�__annotations__rrrrrr	r
r%r'�
__classcell__rrrrrs
	rc@seZdZdZdS)�	FormErrorzDNS message is malformed.N�r(r)r*rrrrrr-ssr-c@seZdZdZdS)�SyntaxErrorzText input is malformed.Nr.rrrrr/wsr/c@seZdZdZdS)�
UnexpectedEndzText input ended unexpectedly.Nr.rrrrr0{sr0c@seZdZdZdS)�TooBigzThe DNS message is too big.Nr.rrrrr1sr1cs*eZdZdZdhZdZ�fdd�Z�ZS)�TimeoutzThe DNS operation timed out.�timeoutz7The DNS operation timed out after {timeout:.3f} secondscst�j|i|��dSr)rrrrrrr�szTimeout.__init__)r(r)r*rrrrr,rrrrr2�sr2c@seZdZdZdS)�UnsupportedAlgorithmz&The DNSSEC algorithm is not supported.Nr.rrrrr4�sr4c@seZdZdZdS)�AlgorithmKeyMismatchz=The DNSSEC algorithm is not supported for the given key type.Nr.rrrrr5�sr5c@seZdZdZdS)�ValidationFailurez The DNSSEC signature is invalid.Nr.rrrrr6�sr6c@seZdZdZdS)�DeniedByPolicyzDenied by DNSSEC policy.Nr.rrrrr7�sr7c@s$eZdZdd�Zdd�Zdd�ZdS)�ExceptionWrappercCs
||_dSr)�exception_class)rr9rrrr�szExceptionWrapper.__init__cCs|Srr)rrrr�	__enter__�szExceptionWrapper.__enter__cCs(|dur$t||j�s$|�t|��|�dS)NF)rr9r)r�exc_typeZexc_valZexc_tbrrr�__exit__�szExceptionWrapper.__exit__N)r(r)r*rr:r<rrrrr8�sr8N)r�typingrr�	Exceptionrr-r/r0r1r2r4r5r6r7r8rrrr�<module>sW

© 2025 Cubjrnet7