AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/twisted/conch/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /lib/python3/dist-packages/twisted/conch/__pycache__/manhole_tap.cpython-310.pyc
o

�bl�@s�dZddlmZddlmZmZddlmZmZm	Z	ddl
mZddlm
Z
ddlmZmZddlmZdd	lmZmZGd
d�d�ZGdd
�d
�Zeej�Gdd�d��ZGdd�dej�Zdd�ZdS)z\
TAP plugin for creating telnet- and ssh-accessible manhole servers.

@author: Jp Calderone
�)�implementer)�service�strports)�manhole�manhole_ssh�telnet)�insults)�keys)�checkers�portal)�protocol)�filepath�usagec@�eZdZdd�Zdd�ZdS)�makeTelnetProtocolcC�
||_dS�N)r)�selfr�r�;/usr/lib/python3/dist-packages/twisted/conch/manhole_tap.py�__init__�
zmakeTelnetProtocol.__init__cCs tj}|jf}tj|g|�R�Sr)r�AuthenticatingTelnetProtocolr�TelnetTransport)r�auth�argsrrr�__call__szmakeTelnetProtocol.__call__N��__name__�
__module__�__qualname__rrrrrrr�rc@r)�chainedProtocolFactorycCrr)�	namespace)rr#rrrr rzchainedProtocolFactory.__init__cCst�tj|j�Sr)r�ServerProtocolr�ColoredManholer#�rrrrr#szchainedProtocolFactory.__call__Nrrrrrr"r!r"c@r)�_StupidRealmcOs||_||_||_dSr)�protocolFactory�protocolArgs�protocolKwArgs)r�proto�a�kwrrrr)s
z_StupidRealm.__init__cGs0tj|vrtj|j|ji|j��dd�fSt��)NcSsdSrrrrrr�<lambda>3sz,_StupidRealm.requestAvatar.<locals>.<lambda>)r�ITelnetProtocolr(r)r*�NotImplementedError)r�avatarId�
interfacesrrr�
requestAvatar.s
�z_StupidRealm.requestAvatarN)rrr rr3rrrrr''sr'c@sDeZdZgd�gd�gd�gd�gd�gd�gZdd�Zd	d
�ZdS)�Options)�
telnetPort�tNzMstrports description of the address on which to listen for telnet connections)�sshPort�sNzJstrports description of the address on which to listen for ssh connections)�passwd�pz/etc/passwdz1name of a passwd(5)-format username/password file)�	sshKeyDirN�<USER DATA DIR>z2Directory where the autogenerated SSH key is kept.)�
sshKeyNameNz
server.keyz&Filename of the autogenerated SSH key.)�
sshKeySizeNiz,Size of the automatically generated SSH key.cCstj�|�d|d<dS)Nr#)rr4rr&rrrr\szOptions.__init__cCs*|ddur|ddurt�d��dSdS)Nr5r7z<At least one of --telnetPort and --sshPort must be specified)r�
UsageErrorr&rrr�postOptions`s
��zOptions.postOptionsN)rrr �
optParametersrr@rrrrr48s		�#r4cCs4t��}|d}|duri}t�|d�}|dr@ttjtjt	j
|�}t�||g�}t
��}t|�|_
t�|d|�}|�|�|dr�t��}t|�|_t�||g�}	t�|	�}
|ddkrd|d}n	dd	lm}|�}t�|��|d
�}
t�|
t|d��}||
jd<||
jd<t�|d|
�}|�|�|S)
a;
    Create a manhole server service.

    @type options: L{dict}
    @param options: A mapping describing the configuration of
    the desired service.  Recognized key/value pairs are::

        "telnetPort": strports description of the address on which
                      to listen for telnet connections.  If None,
                      no telnet service will be started.

        "sshPort": strports description of the address on which to
                   listen for ssh connections.  If None, no ssh
                   service will be started.

        "namespace": dictionary containing desired initial locals
                     for manhole connections.  If None, an empty
                     dictionary will be used.

        "passwd": Name of a passwd(5)-format username/password file.

        "sshKeyDir": The folder that the SSH server key will be kept in.

        "sshKeyName": The filename of the key.

        "sshKeySize": The size of the key, in bits. Default is 4096.

    @rtype: L{twisted.application.service.IService}
    @return: A manhole service.
    r#Nr9r5r7r;r<r)�getDataDirectoryr=r>sssh-rsa) r�MultiServicer
�FilePasswordDBr'r�TelnetBootstrapProtocolrr$rr%r�Portalr�
ServerFactoryrr�setServiceParentr�
TerminalRealmr"�ConchFactory�twisted.python._appdirsrBr
�FilePath�childr	�_getPersistentRSAKey�int�
publicKeys�privateKeys)�options�svcr#�checker�telnetRealm�telnetPortal�
telnetFactory�
telnetService�sshRealm�	sshPortal�
sshFactory�keyDirrB�keyLocation�sshKey�
sshServicerrr�makeServicegsB�







r`N)�__doc__�zope.interfacer�twisted.applicationrr�
twisted.conchrrr�twisted.conch.insultsr�twisted.conch.sshr	�twisted.credr
r�twisted.internetr�twisted.pythonr
rrr"�IRealmr'r4r`rrrr�<module>s
/

Anon7 - 2022
AnonSec Team