403Webshell
Server IP : 46.101.140.223  /  Your IP : 216.73.217.61
Web Server : nginx/1.22.1
System : Linux debian-s-1vcpu-1gb-fra1-01 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
User : deploy-others ( 1001)
PHP Version : 8.2.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/websocket/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/websocket/__pycache__/_http.cpython-311.pyc
�

K�a�-��>�dZddlZddlZddlZddlZddlTddlTddlTddlTddl	Tddl
mZgd�Z
	ddlmZddlTddlmZd	Zn3#d
ZGd�de��ZGd
�de��ZGd�de��ZYnxYwGd�d��Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z dS)a_
_http.py
websocket - WebSocket client library for Python

Copyright 2021 engn33r

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
�N�)�*)�encodebytes)�
proxy_info�connect�read_headers)�Proxy)�	ProxyTypeTFc��eZdZdS)�
ProxyErrorN��__name__�
__module__�__qualname__���1/usr/lib/python3/dist-packages/websocket/_http.pyrr*��������rrc��eZdZdS)�ProxyTimeoutErrorNr
rrrrr-rrrc��eZdZdS)�ProxyConnectionErrorNr
rrrrr0rrrc��eZdZd�ZdS)rc���|�dd��|_|jr�|�dd��|_|�dd��|_|�dd��|_|�dd��|_|�dd��|_|jd	vrtd
���dSd|_d|_d|_d|_dS)N�http_proxy_host�http_proxy_portr�http_proxy_auth�
http_no_proxy�
proxy_type�http�timeout)r �socks4�socks4a�socks5�socks5hz7Only http, socks4, socks5 proxy protocols are supported)�get�
proxy_host�
proxy_port�auth�no_proxy�proxy_protocol�
proxy_timeoutr)�self�optionss  r�__init__zproxy_info.__init__6s���!�+�+�&7��>�>����?�
	)�%�k�k�*;�Q�?�?�D�O����$5�t�<�<�D�I�#�K�K���>�>�D�M�")�+�+�l�F�"C�"C�D��!(���Y��!=�!=�D���"�*\�\�\� �!Z�[�[�[�]�\� �D�O��D�I� �D�M�"(�D���rN)rrrr/rrrrr4s#������)�)�)�)�)rrc�z�tstd���t|��\}}}}|jdkrd}tj}|jdkrd}tj}|jdkrd}tj}|jdkrd}tj}tj||j	t|j��|jr
|jdnd|jr
|jd	nd|�
��}	|	�
|||j���}
|rtrt!|
|j|��}
n|rtd���|
|||ffS)
Nz>Python Socks is needed for SOCKS proxying but is not availabler$Fr"r%Tr#rr)r�host�port�username�password�rdns)r!�SSL not available.)�HAVE_PYTHON_SOCKS�WebSocketException�	parse_urlr+r
�SOCKS5�SOCKS4r	�creater'�intr(r)rr,�HAVE_SSL�_ssl_socket�sslopt)�urlr.�proxy�hostnamer2�resource�	is_securer5r�ws_proxy�socks           r�_start_proxied_socketrHHs^���c� �!a�b�b�b�*3�C�.�.�'�H�d�H�i���x�'�'����%�
���x�'�'����%�
���y�(�(����%�
���y�(�(����%�
��|��
�
�
��!�
"�
"�"'�*�6���A���$�"'�*�6���A���$�
�
���H����H�d�E�4G��H�H�D��7�X�7��4����:�:���	�7� �!5�6�6�6��(�D�(�+�+�+rc��|jr|s|jdkst|||��St|��\}}}}|r||||ffSt	||||��\}}	}
|s%td|zdzt
|��z���d}	t||j|j	��}|	rt||||
��}|r-trt||j
|��}ntd���||||ffS#|r|����xYw)Nr zHost not found.: �:r6)r'r+rHr9�_get_addrinfo_listr8�str�_open_socket�sockoptr!�_tunnelr>r?r@�close)rAr.rB�socketrCr2rDrE�
addrinfo_list�need_tunnelr)rGs            rrrnsW��
��:��:��0D��0N�0N�$�S�'�5�9�9�9�*3�C�.�.�'�H�d�H�i�
�2���$��1�1�1�'9��$�	�5�(*�(*�$�M�;���>� ��(�*�S�0�3�t�9�9�<�>�>�	>��D���M�7�?�G�O�L�L���	7��4��4��6�6�D��	?��
?�"�4����B�B���(�)=�>�>�>��h��h�/�/�/����	��J�J�L�L�L�
���s
�A$C(�(Dc�|�t|||j|j|j|j��\}}}	|s1tj||dt
jt
j��}|ddfS|r|pd}tj||dt
jt
j��}|d|fS#t
j	$r}t|���d}~wwxYw)NrF�PT)�get_proxy_infor'r(r)r*rQ�getaddrinfo�SOCK_STREAM�SOL_TCP�gaierror�WebSocketAddressException)	rCr2rErB�phost�pport�pauthrR�es	         rrKrK�s���(��)�U�-�u�/?���U�^�]�]��E�5�%�+��	.�"�.��$��6�#5�v�~�G�G�M� �%��-�-��O�e�)�r�E�
#�.�u�e�Q��@R�TZ�Tb�c�c�M� �$��-�-���?�+�+�+�'��*�*�*�����+���s�2B�!6B�B;�'B6�6B;c�d�d}|D�]%}|dd�\}}}tj|||��}|�|��tD]}	|j|	��
|D]}	|j|	��
|d}
d}|s�	|�|
��n�#tj$r�}t
|
d��|_	tj	tj
f}n#tj	f}YnxYw|jtjkrYd}~��|j|vr|}Yd}~��|r|���|�d}~wwxYw��%n|r|�|S)N��r)
rQ�
settimeout�DEFAULT_SOCKET_OPTION�
setsockoptr�errorrL�	remote_ip�errno�ECONNREFUSED�WSAECONNREFUSED�EINTRrP)
rRrNr!�err�addrinfo�family�socktype�protorG�opts�addressrf�eConnRefuseds
             rrMrM�s���
�C�!�$�$��"*�2�A�2�,����%��}�V�X�u�5�5������ � � �)�	#�	#�D��D�O�T�"�"�"��	#�	#�D��D�O�T�"�"�"��1�+�����	�
����W�%�%�%�"��!�<�
 �
 �
 �"%�g�a�j�/�/���:�$)�$6��8M�#N�L�L��:�$)�$6�#9�L�L�L�����;�%�+�-�-��H�H�H�H��[�L�0�0��C��H�H�H�H��%��
�
�����K�����
 ����$
�
���	��I��Ks<�1B�D%�D �1C
�	D �
C�D �8D �D � D%c�4�|�dd��}|�s?t�|�dtj����}|�dtj��tjkr||�dd��}|�dd��}|s|r|�||���n4t
|d��r$|�tjj	��|�dd��rE|�
|d|�d	d��|�d
d����|�dtj��tjkr/|�dd��sd|_tj|_n@|�dd
��|_|�dtj
��|_d|vr|�|d��d|vr#|d\}}}	|�
|||	��d|vr|�|d��|�||�dd
��|�dd
��|���S)N�context�ssl_version�	cert_reqs�ca_certs�ca_cert_path)�cafile�capath�load_default_certs�certfile�keyfiler4�check_hostnameFT�ciphers�
cert_chain�
ecdh_curve�do_handshake_on_connect�suppress_ragged_eofs)r�r��server_hostname)r&�ssl�
SSLContext�PROTOCOL_TLS_CLIENT�	CERT_NONE�load_verify_locations�hasattrr|�Purpose�SERVER_AUTH�load_cert_chainr�verify_mode�
CERT_REQUIRED�set_ciphers�set_ecdh_curve�wrap_socket)
rGr@rCrrurzr{r}r~r4s
          r�_wrap_sni_socketr��sp���j�j��D�)�)�G��!9��.�.����M�3�;R�!S�!S�T�T���:�:�k�3�=�1�1�S�]�B�B��Z�Z�
�D�1�1�F��Z�Z���5�5�F��
D��
D��-�-�V�F�-�K�K�K�K���"6�7�7�
D��*�*�3�;�+B�C�C�C��:�:�j�$�'�'�	��#�#��z�"��
�
�9�d�+�+��
�
�:�t�,�,�
�
�
��:�:�k�3�=�1�1�S�]�B�B�6�:�:�Vf�hm�Kn�Kn�B�%*�G�"�"%�-�G���%+�Z�Z�0@�$�%G�%G�G�"�"(�*�*�[�#�:K�"L�"L�G����������y� 1�2�2�2��6�!�!�*0��*>�'�H�g�x��#�#�H�g�x�@�@�@��6�!�!��"�"�6�,�#7�8�8�8����� &�
�
�+D�d� K� K�#�Z�Z�(>��E�E� �	���rc� �ttj���}|�|��tj�d��}|r;tj�|��r|�dd���||d<n<|r:tj�	|��r|�dd���||d<|�dd��r|d}|�dd��}t||||��}|S)N)rw�WEBSOCKET_CLIENT_CA_BUNDLErxryr�rT)�dictr�r��update�os�environr&�path�isfile�isdirr�)rG�user_ssloptrCr@�certPathrs      rr?r?s��
�C�-�
.�
.�
.�F�
�M�M�+�����z�~�~�:�;�;�H��*�B�G�N�N�8�,�,�*����
�D�1�1�9�%��z���	�*�b�g�m�m�H�-�-�*������5�5�=�!)��~��
�z�z�#�T�*�*�-��+�,���Z�Z� 0�$�7�7�N��D�&�(�N�C�C�D��Krc�X�td��d||fz}|d||fzz
}|r�|dr|d}|dr|d|dzz
}t|������������dd��}|d	|zz
}|d
z
}t
d|��t||��	t|��\}}}	n.#t$r!}
tt|
�����d}
~
wwxYw|dkrtd
|z���|S)NzConnecting proxy...zCONNECT %s:%d HTTP/1.1
z
Host: %s:%d
rrrJ�
�zProxy-Authorization: Basic %s
z
zrequest header��z#failed CONNECT via proxy status: %r)�debug�base64encode�encode�strip�decode�replace�dump�sendr�	Exception�WebSocketProxyExceptionrL)rGr1r2r)�connect_header�auth_str�encoded_str�status�resp_headers�status_messager_s           rrOrOsf��	�
� � � �1�T�4�L�@�N��'�4��,�6�6�N��L��Q��L���7����7�	&���d�1�g�
�%�H�"�8�?�?�#4�#4�5�5�;�;�=�=�D�D�F�F�N�N�t�UW�X�X���=��K�K���f��N��	�>�*�*�*���~����.�/;�D�/A�/A�,���n�n���.�.�.�%�c�!�f�f�-�-�-�����.������}�}�%�1�F�:�<�<�	<��Ks�C$�$
D�.D
�
Dc��d}d}i}td��	t|��}|�d�����}|s�nt|��|sG|�dd��}t|d��}t
|��dkr|d}n�|�dd��}t
|��dkr�|\}}|���dkrF|�d��r1|�d��d	z|���z|d<n9|���||���<ntd
�����Ytd��|||fS)Nz--- response header ---Tzutf-8� �rrJz
set-cookiez; zInvalid headerz-----------------------)
�trace�	recv_liner�r��splitr=�len�lowerr&r8)	rGr�r��headers�line�status_info�kv�key�values	         rrr4su��
�F��N��G�	�
#�$�$�$�;�������{�{�7�#�#�)�)�+�+���	��
�d�����	;��*�*�S�!�,�,�K���Q��(�(�F��;���!�#�#�!,�Q�������C��#�#�B��2�w�w�!�|�|��
��U��9�9�;�;�,�.�.�7�;�;�|�3L�3L�.�,3�K�K��,E�,E��,L�u�{�{�}�}�,\�G�L�)�)�+0�;�;�=�=�G�C�I�I�K�K�(�(�(�)9�:�:�:�+;�.
�
#�$�$�$��7�N�*�*r)!�__doc__rhr�rQ�sys�_exceptions�_logging�_socket�_ssl_compat�_url�base64rr��__all__�python_socks.syncr	�python_socks._errors�python_socks._typesr
r7r�rrrrrHrrKrMr�r?rOrrrr�<module>r�s����$
����	�	�	�	�
�
�
�
�
�
�
�
���������������������.�.�.�.�.�.�
3�
3�
3��
�'�'�'�'�'�'�&�&�&�&�-�-�-�-�-�-�����

���
�
�
�
�
�Y�
�
�
�
�
�
�
�
�I�
�
�
�
�
�
�
�
�y�
�
�
�
�
����)�)�)�)�)�)�)�)�(#,�#,�#,�L"�"�"�J+�+�+�.(�(�(�V*�*�*�Z���*���:+�+�+�+�+s�A�.A5

Youez - 2016 - github.com/yon3zu
LinuXploit