![]() Server : Apache/2.4.52 (Ubuntu) System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64 User : www-data ( 33) PHP Version : 8.1.2-1ubuntu2.21 Disable Function : NONE Directory : /lib/python3/dist-packages/twisted/conch/ssh/__pycache__/ |
o �b�5 � @ s" d Z ddlZddlZddlZddlZddlmZ ddlmZm Z m Z ddlmZm Z mZ ddlmZmZ ddlmZ ddlmZ e� ZG d d � d ej�ZG dd� dej�ZG d d� d�Zdd� Zdd� Zg d�Zeej�G dd� dej��Z G dd� dej!�Z"dd� Z#dd� Z$dd� Z%dd� Z&dS ) z� This module contains the implementation of SSHSession, which (by default) allows access to a shell and a python interpreter over SSH. Maintainer: Paul Swartz � N)�implementer)�EnvironmentVariableNotPermitted�ISession�ISessionSetEnv)�channel�common� connection)� interfaces�protocol)�Logger)� networkStringc @ st e Zd ZdZdZdd� Zdd� Zdd� Zd d � Zdd� Z d d� Z dd� Zdd� Zdd� Z dd� Zdd� Zdd� ZdS )� SSHSessiona� A generalized implementation of an SSH session. See RFC 4254, section 6. The precise implementation of the various operations that the remote end can send is left up to the avatar, usually via an adapter to an interface such as L{ISession}. @ivar buf: a buffer for data received before making a connection to a client. @type buf: L{bytes} @ivar client: a protocol for communication with a shell, an application program, or a subsystem (see RFC 4254, section 6.5). @type client: L{SSHSessionProcessProtocol} @ivar session: an object providing concrete implementations of session operations. @type session: L{ISession} s sessionc O s0 t jj| g|�R i |�� d| _d | _d | _d S �N� )r � SSHChannel�__init__�buf�client�session)�self�args�kw� r �;/usr/lib/python3/dist-packages/twisted/conch/ssh/session.pyr 8 s zSSHSession.__init__c C sn t �|�\}}tjd|d� | j�||�}|r0t| �}t|�}|�|� |�t |�� || _ dS t�d� dS )Nz"Asking for subsystem "{subsystem}")� subsystem� zFailed to get subsystemr )r �getNS�log�info�avatar�lookupSubsystem�SSHSessionProcessProtocol�wrapProcessProtocol�makeConnection�wrapProtocolr �error)r �datar �ignoredr �pp�protor r r �request_subsystem>