| 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 : /lib/python3/dist-packages/websocket/__pycache__/ |
Upload File : |
�
mîa� � � � d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl m
Z
ddlZ ddlZn# e
$ r Y nw xY wd� Zej j ej j fZ e� � Z G d� dej � � Zd� Z G d� d � � Z G d
� deej � � Z G d� d
e� � Zd� Zedk r+ e� � dS # e$ rZ ee� � Y dZ[dS dZ[ww xY wdS )a`
wsdump.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)�urlparsec �h � t t j dd� � } | sdS | � � � S )N�encoding� �utf-8)�getattr�sys�stdin�lower)r s �3/usr/lib/python3/dist-packages/websocket/_wsdump.py�get_encodingr
( s2 � ��s�y�*�b�1�1�H�� ��w��~�~���� c � � e Zd Zdd�ZdS )�VActionNc � � |�d} t |� � }n(# t $ r |� d� � dz }Y nw xY wt || j |� � d S )N�1�v� )�int�
ValueError�count�setattr�dest)�self�parser�args�values�
option_strings r �__call__zVAction.__call__6 sm � ��>��F� +���[�[�F�F��� +� +� +��\�\�#�&�&��*�F�F�F� +������d�i��(�(�(�(�(s � �";�;)N)�__name__�
__module__�__qualname__r � r r r r 4 s( � � � � � �)� )� )� )� )� )r r c � � t j d�� � } | � ddd�� � | � ddd �
� � | � ddd
dt dd�� � | � dddd�� � | � dddd�� � | � dddd�� � | � dd d!�
� � | � d"d
t d#�$� � | � d%d&d'�
� � | � d(dd)�� � | � d*d+�
� � | � � � S ),NzWebSocket Simple Dump Tool)�description�url�ws_urlz+websocket url. ex. ws://echo.websocket.org/)�metavar�helpz-pz--proxyz$proxy url. ex. http://127.0.0.1:8080)r) z-vz --verboser �?�verbosezZset verbose mode. If set to 1, show opcode. If set to 2, enable to trace websocket module)�default�nargs�actionr r) z-nz--nocert�
store_truezIgnore invalid SSL cert)r. r) z-rz--rawz
raw outputz-sz--subprotocols�*zSet subprotocols)r- r) z-oz--originz
Set originz
--eof-waitz'wait time(second) after 'EOF' received.)r, �typer) z-tz--textzSend initial textz --timingszPrint timings in secondsz --headersz(Set custom headers. Use ',' as separator)�argparse�ArgumentParser�add_argumentr r �
parse_args)r s r r5 r5 @ s� � �
�
$�1M�
N�
N�
N�F�
����x�J� � L� L� L�
����i�C� � E� E� E�
����k�1�C��&�I� � J� J� J� ����j��6� � 8� 8� 8�
����g�l�)� � +� +� +�
����.�c�/� � 1� 1� 1�
����j�)� � +� +� +�
����a�c�F� � H� H� H�
����h�0� � 2� 2� 2�
����L�7� � 9� 9� 9�
����G� � I� I� I� �����r c � � e Zd Zd� ZdS )�RawInputc �" � t |� � }t rNt dk rCt |t � � s.|� t � � � d� � }n*t |t � � r|� d� � }|S )Nr )�input�ENCODING�
isinstance�str�decode�encode)r �prompt�lines r � raw_inputzRawInput.raw_input` sw � ��V�}�}��� (��G�+�+�J�t�S�4I�4I�+��;�;�x�(�(�/�/��8�8�D�D�
��c�
"�
"� (��;�;�w�'�'�D��r N)r r! r"