shell bypass 403
UnknownSec Shell
:
/
usr
/
lib
/
python3
/
dist-packages
/
redis
/
commands
/
graph
/
__pycache__
/ [
drwxr-xr-x
]
upload
mass deface
mass delete
console
info server
name :
commands.cpython-312.pyc
� ���b� � �T � d dl mZ d dlmZ ddlmZ ddlmZ ddlm Z G d� d� Z y ) � )� DataError)� ResponseError� )�VersionMismatchException)� ExecutionPlan)�QueryResultc �` � e Zd ZdZd� Zdd�Zd� Zd� Zd� Zd� Z d � Z d � Zdd�Zd� Z dd �Zdd�Zy)� GraphCommandszRedisGraph Commandsc �~ � t | j � dk( rt | j � dk( ryd}| j j � D ] \ }}|t |� dz z }� |dj | j D �cg c] }t |� �� c}� z }|d dk( r|dd }| j |� S c c}w )z& Create entire graph. r NzCREATE �,���)�len�nodes�edges�items�str�join�query)�selfr �_�node�edges �?/usr/lib/python3/dist-packages/redis/commands/graph/commands.py�commitzGraphCommands.commit s� � � �t�z�z�?�a��C�� � �O�q�$8�����z�z�'�'�)� %�G�A�t��S��Y��_�$�E� %� �������<��3�t�9�<�=�=�� ��9����#�2�J�E��z�z�%� � �� =s �B: Nc � � |}|�| j |� |z }|rd}n|rdnd}|| j |dg}|r"t |t � st d� �|d|gz } | j |� } t | | |� S # t $ rH} dt | � v rt d � d t | � v r|r| j |||d�� cY d} ~ S | �d} ~ wt $ r?} | j | _ | j � | j ||||� cY d} ~ S d} ~ ww xY w) a Executes a query against the graph. For more information see `GRAPH.QUERY <https://redis.io/commands/graph.query>`_. # noqa Args: q : str The query. params : dict Query parameters. timeout : int Maximum runtime for read queries in milliseconds. read_only : bool Executes a readonly query if set to True. profile : bool Return details on results produced by and time spent in each operation. Nz GRAPH.PROFILEzGRAPH.RO_QUERYzGRAPH.QUERYz --compactz+Timeout argument must be a positive integer�timeoutzwrong number of argumentsz>Note: RedisGraph Python requires server version 2.2.8 or abovezunknown commandF)� read_only)�_build_params_header�name� isinstance�int� Exception�execute_commandr r r �printr r �version�_refresh_schema)r �q�paramsr r �profiler �cmd�command�response�es r r zGraphCommands.query s& � �* �� ���-�-�f�5��=�E� �!�C�&/�"�]�C��� � �5�+�6�� ��g�s�+�� M�N�N�� �7�+�+�G� =�+�t�+�+�W�5�H��t�X�w�7�7��� �*�c�!�f�4��T�� !�C��F�*�y��z�z�!�V�W��z�F�F��G��'� =� �9�9�D�L�� � �"��:�:�a���)�<�<�� =�s6 �A5 �5 D�>;C�9D�?C�D� 4D�D�Dc �D � d}|t |� z }| j |� S )z Merge pattern. zMERGE )r r )r �patternr s r �mergezGraphCommands.merge^ s&