shell bypass 403

Cubjrnet7 Shell


name : inet.cpython-39.opt-1.pyc
a

�M�e��@s�dZddlZddlmZmZmZddlZddlZej	Z	ej
Z
eee
d�dd�Zee
ed�dd	�Zeed
�dd�Zeed
�d
d�Zeed
�dd�Zdeeefeeed�dd�Zdd�Zeed
�dd�ZdS)z*Generic Internet address helper functions.�N)�Any�Optional�Tuple)�family�text�returncCs2|tkrtj�|�S|tkr*tj�|d�St�dS)aConvert the textual form of a network address into its binary form.

    *family* is an ``int``, the address family.

    *text* is a ``str``, the textual address.

    Raises ``NotImplementedError`` if the address family specified is not
    implemented.

    Returns a ``bytes``.
    TN)�AF_INET�dns�ipv4�	inet_aton�AF_INET6�ipv6�NotImplementedError)rr�r�,/usr/lib/python3.9/site-packages/dns/inet.py�	inet_pton!s

r)r�addressrcCs0|tkrtj�|�S|tkr(tj�|�St�dS)a0Convert the binary form of a network address into its textual form.

    *family* is an ``int``, the address family.

    *address* is a ``bytes``, the network address in binary form.

    Raises ``NotImplementedError`` if the address family specified is not
    implemented.

    Returns a ``str``.
    N)rr	r
Z	inet_ntoarr
r)rrrrr�	inet_ntop6s

r)rrcCsZztj�|�tWStyTztj�|d�tWYStyNt�Yn0Yn0dS)z�Determine the address family of a textual-form network address.

    *text*, a ``str``, the textual address.

    Raises ``ValueError`` if the address family cannot be determined
    from the input.

    Returns an ``int``.
    TN)r	r
rr�	Exceptionr
r�
ValueError�rrrr�af_for_addressKs
rcCsrz"tj�|�d}|dko |dkWStylz tj�|d�d}|dkWYStyft�Yn0Yn0dS)z�Is the textual-form network address a multicast address?

    *text*, a ``str``, the textual address.

    Raises ``ValueError`` if the address family cannot be determined
    from the input.

    Returns a ``bool``.
    r����T�N)r	r
rrr
r)r�firstrrr�is_multicastasrcCsXztj�|�WdStyRztj�|d�WYdStyLYYdS0Yn0dS)z{Is the specified string an IPv4 or IPv6 address?

    *text*, a ``str``, the textual address.

    Returns a ``bool``.
    TFN)r	r
rrr
rrrr�
is_addresswsr)�
high_tuple�afrc
Cs�|\}}|durt|�}|tkr(||fS|tkr�|�d�}|dkrN||ddfS|d|�}||dd�}|��r�||dt|�fSz||dt�|�fWSty�tj	}tj
|||d�^�^}}	}|	YS0ntd|����dS)aXGiven a "high-level" address tuple, i.e.
    an (address, port) return the appropriate "low-level" address tuple
    suitable for use in socket calls.

    If an *af* other than ``None`` is provided, it is assumed the
    address in the high-level tuple is valid and has that af.  If af
    is ``None``, then af_for_address will be called.
    N�%r�)�flags�unknown address family )rrr�find�isdigit�int�socketZif_nametoindex�AttributeErrorZAI_NUMERICHOSTZgetaddrinfor)
rrr�port�iZaddrpartZscopeZai_flags�_�tuprrr�low_level_address_tuple�s(
r-cCs.|tjkrdS|tjkrdStd|����dS)z:Return the 'any' address for the specified address family.z0.0.0.0z::r#N)r'rrr)rrrr�
any_for_af�s


r.cCsPztj�|�WStyJztj�|�WYStyDt�Yn0Yn0dS)aVerify that *address* is a valid text form IPv4 or IPv6 address and return its
    canonical text form.  IPv6 addresses with scopes are rejected.

    *text*, a ``str``, the address in textual form.

    Raises ``ValueError`` if the text is not valid.
    N)r	r
�canonicalizerr
rrrrrr/�sr/)N)�__doc__r'�typingrrrZdns.ipv4r	Zdns.ipv6rrr&�str�bytesrrr�boolrrr-r.r/rrrr�<module>s$��$	

© 2025 Cubjrnet7