shell bypass 403

Cubjrnet7 Shell


name : asyncquery.cpython-39.pyc
a

�M�e�h�@sfdZddlZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZddlZ
ddlZ
ddlZ
ddlZ
ddlZ
ddlZ
ddlZ
ddlZ
ddlZ
ddlZ
ddlmZddlmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#e"r�ddl$Z$e
j%j&Z'dd�Z(d6dd	�Z)d7e
j*j+ee
j,j-e.fee	e/e
e0e/fd
�dd�Z1d8e
j*j+e	ee	e/e2e2e	ee
j3j4e
j5j6fe	e.e2e2e2e	e
j,j-ed�dd�Z7d9e
j,j-e8e	e/e0e	e8e0e2e2e2e2e	e
j*j+e	e
j*j9e2e
j,j-d�dd�Z:d:e
j,j-e8e	e/e0e	e8e0e2e2e2e	e
j*j+e	e
j*j;e	e
j*j9e2e
e
j,j-e2fd�dd�Z<d;e
j*j;ee
j,j-e.fe	e/e
e0e/fd�dd�Z=dd�Z>d<e
j*j;e	e/e2e	ee
j3j4e
j5j6fe	e.e2e
e
j,j-e/fd�dd �Z?d=e
j,j-e8e	e/e0e	e8e0e2e2e	e
j*j;e	e
j*j9e
j,j-d!�d"d#�Z@d>e
j,j-e8e	e/e0e	e8e0e2e2e	e
j*j;e	e
j*j9e	e#jAe	e8ee2e8fe
j,j-d&�d'd(�ZBdd)ddd
d
dd*d%d%ddejCf
e
j,j-e8e	e/e0e	e8e0e2e2e	d+e8e2ee2e8fe	e8e	d,e	e0e
j,j-d-�d.d/�ZDddddddejEdfe8e
jFjGe	e
j,j-e0e	e/e	e/e	e8e0ee	e
j*j9dd0�d1d2�ZHd?e
j,j-e8e	e/e0e	e8e0e2e2e	e
jIjJee2e8fe	e
j*j9e	e8e
j,j-d3�
d4d5�ZIdS)@zTalk to a DNS server.�N)�Any�Dict�Optional�Tuple�Union)�NullContext)
�BadResponse�NoDOH�NoDOQ�UDPMode�_compute_times�_make_dot_ssl_context�_matches_destination�
_remaining�have_doh�sslcCsN|s|rF|dur>|tjkr d}n|tjkr0d}ntd|����||fSdSdS)Nz0.0.0.0z::zunknown address family )�socket�AF_INET�AF_INET6�NotImplementedError)�afZaddress�port�r�2/usr/lib/python3.9/site-packages/dns/asyncquery.py�
_source_tuple:s

rcCs*|dur"|st��}t||d�SdSdS)Nr)�time�max)�
expirationZnowrrr�_timeoutJs
r)�sock�what�destinationr�returnc�s@t|tjj�r|��}t��}|�||t||��IdH}||fS)a�Send a DNS message to the specified UDP socket.

    *sock*, a ``dns.asyncbackend.DatagramSocket``.

    *what*, a ``bytes`` or ``dns.message.Message``, the message to send.

    *destination*, a destination tuple appropriate for the address family
    of the socket, specifying where to send the query.

    *expiration*, a ``float`` or ``None``, the absolute time at which
    a timeout exception should be raised.  If ``None``, no timeout will
    occur.  The expiration value is meaningless for the asyncio backend, as
    asyncio's transport sendto() never blocks.

    Returns an ``(int, float)`` tuple of bytes sent and the sent time.
    N)�
isinstance�dns�message�Message�to_wirer�sendtor)rr r!r�	sent_time�nrrr�send_udpSs
r+F�)rr!r�ignore_unexpected�one_rr_per_rrset�keyring�request_mac�ignore_trailing�raise_on_truncation�
ignore_errors�queryr"c
�s�d}|�dt|��IdH\}}t|j|||�s0qt��}
ztjj||||||d�}Wnntjjy�}z6|	r�|
dur�|
�	|���s�WYd}~qn�WYd}~n&d}~0t
y�|	r�Yqn�Yn0|	r�|
dur�|
�	|�s�q||
|fS)ajRead a DNS message from a UDP socket.

    *sock*, a ``dns.asyncbackend.DatagramSocket``.

    See :py:func:`dns.query.receive_udp()` for the documentation of the other
    parameters, and exceptions.

    Returns a ``(dns.message.Message, float, tuple)`` tuple of the received message, the
    received time, and the address where the message arrived from.
    r,�N)r/r0r.r1r2)�recvfromrr�familyrr$r%�	from_wire�	Truncated�is_response�	Exception)rr!rr-r.r/r0r1r2r3r4�wire�from_address�
received_time�r�errr�receive_udpqs@
��
���rA�5)�q�where�timeoutr�source�source_portr-r.r1r2r�backendr3r"c

�s$|��}
t|�\}}tj�|�}t||f|�}|
r<t|
�}nJ|sJtj��}t	|||�}|�
�rh||f}nd}|�|tj
d||�IdH}|4IdH�v}t||
||�IdHt||||||j|j||	||�IdH\}}}|||_|s�|�|�s�t�|Wd�IdHS1IdH�s0YdS)aFReturn the response obtained after sending a query via UDP.

    *sock*, a ``dns.asyncbackend.DatagramSocket``, or ``None``,
    the socket to use for the query.  If ``None``, the default, a
    socket is created.  Note that if a socket is provided, the
    *source*, *source_port*, and *backend* are ignored.

    *backend*, a ``dns.asyncbackend.Backend``, or ``None``.  If ``None``,
    the default, then dnspython will use the default backend.

    See :py:func:`dns.query.udp()` for the documentation of the other
    parameters, exceptions, and return type of this method.
    Nr)r'rr$�inet�af_for_address�_lltupler�asyncbackend�get_default_backendrZdatagram_connection_required�make_socketr�
SOCK_DGRAMr+rAr/�macrr:r)rCrDrErrFrGr-r.r1r2rrHr3r<�
begin_timerrr!�cm�stuple�dtuple�sr?r>�_rrr�udp�s@


�
rW)rCrDrErrFrGr-r.r1�udp_sock�tcp_sockrHr3r"c
�stz0t|||||||||d|	||�
IdH}
|
dfWStjjynt|||||||||
|�
IdH}
|
dfYS0dS)a�Return the response to the query, trying UDP first and falling back
    to TCP if UDP results in a truncated response.

    *udp_sock*, a ``dns.asyncbackend.DatagramSocket``, or ``None``,
    the socket to use for the UDP query.  If ``None``, the default, a
    socket is created.  Note that if a socket is provided the *source*,
    *source_port*, and *backend* are ignored for the UDP query.

    *tcp_sock*, a ``dns.asyncbackend.StreamSocket``, or ``None``, the
    socket to use for the TCP query.  If ``None``, the default, a
    socket is created.  Note that if a socket is provided *where*,
    *source*, *source_port*, and *backend*  are ignored for the TCP query.

    *backend*, a ``dns.asyncbackend.Backend``, or ``None``.  If ``None``,
    the default, then dnspython will use the default backend.

    See :py:func:`dns.query.udp_with_fallback()` for the documentation
    of the other parameters, exceptions, and return type of this
    method.
    TNF)rWr$r%r9�tcp)rCrDrErrFrGr-r.r1rXrYrHr3�responserrr�udp_with_fallback�s>#�

�
r\)rr rr"c�s\t|tjj�r|jdd�}nt|��dd�|}t��}|�|t	||��IdHt|�|fS)z�Send a DNS message to the specified TCP socket.

    *sock*, a ``dns.asyncbackend.StreamSocket``.

    See :py:func:`dns.query.send_tcp()` for the documentation of the other
    parameters, exceptions, and return type of this method.
    T)Zprepend_length�ZbigN)
r#r$r%r&r'�len�to_bytesr�sendallr)rr r�tcpmsgr)rrr�send_tcp4s
rbc�sHd}|dkrD|�|t|��IdH}|dkr.t�|t|�}||}q|S)z|Read the specified number of bytes from stream.  Keep trying until we
    either get the desired amount, or we hit EOF.
    r,rN)Zrecvr�EOFErrorr^)r�countrrUr*rrr�
_read_exactlyMs
re)rrr.r/r0r1r"c�sXt|d|�IdH}t�d|�\}t|||�IdH}t��}	tjj|||||d�}
|
|	fS)z�Read a DNS message from a TCP socket.

    *sock*, a ``dns.asyncbackend.StreamSocket``.

    See :py:func:`dns.query.receive_tcp()` for the documentation of the other
    parameters, exceptions, and return type of this method.
    r]N�!H�r/r0r.r1)re�struct�unpackrr$r%r8)rrr.r/r0r1�ldata�lr<r>r?rrr�receive_tcp[s�rl)rCrDrErrFrGr.r1rrHr"c
	�s|��}
t|�\}}|r0|��IdHt|�}
nJtj�|�}t|||�}||f}|	s^tj�	�}	|	�
|tjd|||�IdH}
|
4IdH�d}t
||
|�IdHt||||j|j|�IdH\}}|||_|�|�s�t�|Wd�IdHS1IdH�s�0YdS)aOReturn the response obtained after sending a query via TCP.

    *sock*, a ``dns.asyncbacket.StreamSocket``, or ``None``, the
    socket to use for the query.  If ``None``, the default, a socket
    is created.  Note that if a socket is provided
    *where*, *port*, *source*, *source_port*, and *backend* are ignored.

    *backend*, a ``dns.asyncbackend.Backend``, or ``None``.  If ``None``,
    the default, then dnspython will use the default backend.

    See :py:func:`dns.query.tcp()` for the documentation of the other
    parameters, exceptions, and return type of this method.
    Nr)r'rZgetpeernamerr$rIrJrrLrMrNr�SOCK_STREAMrbrlr/rPrr:r)rCrDrErrFrGr.r1rrHr<rQrrRrrSrTrUr?r>rrrrZys,

�
�

rZ�UT)rCrDrErrFrGr.r1rrH�ssl_context�server_hostname�verifyr"c
�s�t|�\}
}|rt|�}n`|
dur,t||�}
tj�|�}t|||�}||f}|	sZtj��}	|	�	|t
jd||||
|�IdH}|4IdH�T}t|�}t
||||||||||	�
IdH}t��}||
|_|Wd�IdHS1IdHs�0YdS)a�Return the response obtained after sending a query via TLS.

    *sock*, an ``asyncbackend.StreamSocket``, or ``None``, the socket
    to use for the query.  If ``None``, the default, a socket is
    created.  Note that if a socket is provided, it must be a
    connected SSL stream socket, and *where*, *port*,
    *source*, *source_port*, *backend*, *ssl_context*, and *server_hostname*
    are ignored.

    *backend*, a ``dns.asyncbackend.Backend``, or ``None``.  If ``None``,
    the default, then dnspython will use the default backend.

    See :py:func:`dns.query.tls()` for the documentation of the other
    parameters, exceptions, and return type of this method.
    Nr)rrr
r$rIrJrrLrMrNrrmrrZr)rCrDrErrFrGr.r1rrHrorprqrQrrRrrSrTrUr[Zend_timerrr�tls�sJ


�

�

rri�z
/dns-queryzhttpx.AsyncClientzdns.asyncresolver.Resolver)rCrDrErrFrGr.r1�client�path�postrq�bootstrap_address�resolverr7r"c
�s&tst�|r t|tj�s td��|��}ztj�	|�}WntyNd}Yn0d}ddi}|dur�tj�
|�r�|tjkr�d�
|||	�}q�|tjkr�d�
|||	�}n|}tj��}|dur�d}d}n|}|}|��|dd||||
|d	�}|r�t|�}ntjdd||d
�}|4IdH��}|
�rT|�dtt|��d��|�|j|||d�|�IdH}n:t�|��d
�}|��}|�|j||d|id�|�IdH}Wd�IdH�q�1IdH�s�0Y|jdk�s�|jdk�r�td�
||j|j���tjj |j|j!|j"||d�}|j#�$�|_%|�&|��s"t'�|S)a�Return the response obtained after sending a query via DNS-over-HTTPS.

    *client*, a ``httpx.AsyncClient``.  If provided, the client to use for
    the query.

    Unlike the other dnspython async functions, a backend cannot be provided
    in this function because httpx always auto-detects the async backend.

    See :py:func:`dns.query.https()` for the documentation of the other
    parameters, exceptions, and return type of this method.
    z.session parameter must be an httpx.AsyncClientNZacceptzapplication/dns-messagezhttps://{}:{}{}zhttps://[{}]:{}{}rT)�
local_address�http1�http2rq�
local_portrvrwr7)ryrzrq�	transport)zcontent-typezcontent-length)�headers�content�=r$)r}�params��i+z4{} responded with status code {}
Response body: {!r}rg)(rr	r#�httpxZAsyncClient�
ValueErrorr'r$rIrJZ
is_addressrr�formatrrLrMZget_transport_classr�update�strr^�wait_forru�base64Zurlsafe_b64encode�rstrip�decode�getZstatus_coder~r%r8r/r0�elapsedZ
total_secondsrr:r)rCrDrErrFrGr.r1rsrtrurqrvrwr7r<rr|r}�urlrHrxr{rRZ
the_clientr[Ztwirer?rrr�https�s�



�
�
����8
���r�)rD�txn_managerr4rrE�lifetimerFrG�udp_moderHr"c
#�s�|durtj�|�\}}
ntj�|�}
|jdj}|tjjk}|��}
|�	�}tj
�|�}t|||�}||f}t
|�\}}d}|�r�d}|r�|tjkr�tj}d}n
tj}d}|	s�tj��}	|	�||d||t|��IdH}|4IdH���|�r|�||t|��IdHn&t�dt|��|}|�||�IdHtj�|||
|���x}d}d}|�s�t
|�\}}|du�s||du�r�||k�r�|}|�r�t||f|�}t|�}|�d|�IdH\}}t|||d��r��q��q�n2t |d|�IdH} t�!d| �\}!t ||!|�IdH}|tjjk}tj"j#||j$|j%d|
|||d�}"z|�&|"�}WnDtjj'�y~|�sXJ�|tj(k�rf�d}d}tj}Y�qLYn0|"j)}�qL|�s�|j$�r�|"j*�s�tj+�,d	��Wd�n1�s�0YWd�IdHq~1IdH�s�0Yq~dS)
amConduct an inbound transfer and apply it via a transaction from the
    txn_manager.

    *backend*, a ``dns.asyncbackend.Backend``, or ``None``.  If ``None``,
    the default, then dnspython will use the default backend.

    See :py:func:`dns.query.inbound_xfr()` for the documentation of
    the other parameters, exceptions, and return type of this method.
    NrTFrfr5r])r/r0�xfr�origin�tsig_ctxZmultir.zmissing TSIG)-r$r�Z
make_queryZextract_serial_from_queryZquestion�rdtypeZ	rdatatypeZIXFRZfrom_wire_originr'rIrJrrr�NEVERrrOrmrLrMrNrr(rh�packr^r`ZInboundrKr6rrerir%r8r/rPZprocess_messageZUseTCPZONLYr�Zhad_tsig�	exceptionZ	FormError)#rDr�r4rrEr�rFrGr�rH�serialr�Zis_ixfrr�r<rrSrTrVrZretryZ	sock_typeZis_udprUraZinboundZdoner�Zmexpirationr!Zrwirer=rjrkr?rrr�inbound_xfrls�
�

���
�


r�)
rCrDrErrFrGr.r1�
connectionrqrHrpr"c�s�tjjstd��d|_|��}|r8tjj}
tjj}|}ntj�|
�\}
}|
�4IdH��}|||	|d�4IdH��}|s�|�||||�}t	|�\}}|�
|�IdH}|4IdH�>|�|d�IdH|�t
|��IdH}Wd�IdH�q1IdHs�0Yt��}Wd�IdH�q81IdH�s.0Ytjj||j|j||d�}Wd�IdH�q�1IdH�sv0Yt||d�|_|�|��s�t�|S)aiReturn the response obtained after sending an asynchronous query via
    DNS-over-QUIC.

    *backend*, a ``dns.asyncbackend.Backend``, or ``None``.  If ``None``,
    the default, then dnspython will use the default backend.

    See :py:func:`dns.query.quic()` for the documentation of the other
    parameters, exceptions, and return type of this method.
    zDNS-over-QUIC is not available.rN)Zverify_modeZserver_nameTrgg)r$�quicZ	have_quicr
�idr'Znull_factoryZfactories_for_backendZconnectrZmake_stream�sendZreceiverrr%r8r/r0rr:r)rCrDrErrFrGr.r1r�rqrHrpr<ZcfactoryZmfactoryZthe_connection�contextZthe_manager�startr�streamZfinishr?rrrr��sB�@6�4r�)N)N)
NNFFNr,FFFN)NrBNrFFFFNNF)NrBNrFFFNNNF)N)NFNr,F)NrBNrFFNN)NrnNrFFNNNNT)
NrnNrFFNTNN)K�__doc__r��
contextlibrrhr�typingrrrrrZdns.asyncbackendr$Z
dns.exceptionZdns.inetZdns.messageZdns.nameZdns.quicZ	dns.rcodeZdns.rdataclassZ
dns.rdatatypeZdns.transactionZdns._asyncbackendrZ	dns.queryrr	r
rrr
rrrrr�rIZlow_level_address_tuplerKrrrLZDatagramSocketr%r&�bytes�float�intr+�bool�name�NameZtsigZKeyrAr�ZBackendrWZStreamSocketr\rbrerlrZZ
SSLContextrrZ	AF_UNSPECr�r�ZtransactionZTransactionManagerr�r�ZAsyncQuicConnectionrrrr�<module>s0


�
� �
�@�

�E�


�G�
���!�

�;�


�I�
�x�

�h�


�

© 2025 Cubjrnet7