Spamworldpro Mini Shell
Spamworldpro


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/python/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

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

�bL�@sTdZddlmZddgZGdd�d�ZGdd�d�ZGdd	�d	�ZGd
d�d�ZdS)zM
L{twisted.python.fakepwd} provides a fake implementation of the L{pwd} API.
�)�List�UserDatabase�ShadowDatabasec@sPeZdZdZdededededededed	d
fdd�Zd	efd
d�Zdd�Zd
S)�_UserRecordz�
    L{_UserRecord} holds the user data for a single user in L{UserDatabase}.
    It corresponds to the C{passwd} structure from the L{pwd} module.
    See that module for attribute documentation.
    �name�password�uid�gid�gecos�home�shell�returnNcCs.||_||_||_||_||_||_||_dS�N��pw_name�	pw_passwd�pw_uid�pw_gid�pw_gecos�pw_dir�pw_shell)�selfrrrr	r
rr�r�8/usr/lib/python3/dist-packages/twisted/python/fakepwd.py�__init__s

z_UserRecord.__init__cC�dS)N�r�rrrr�__len__'�z_UserRecord.__len__cCs$|j|j|j|j|j|j|jf|Srr�r�indexrrr�__getitem__*s��z_UserRecord.__getitem__�	�__name__�
__module__�__qualname__�__doc__�str�intrrr"rrrrrs*�������	
�rc@s�eZdZUdZeeed<ddd�Zdeded	e	d
e	deded
eddfdd�Z
d	e	defdd�Zdedefdd�Zdeefdd�Z
dS)rz�
    L{UserDatabase} holds a traditional POSIX user data in memory and makes it
    available via the same API as L{pwd}.

    @ivar _users: A C{list} of L{_UserRecord} instances holding all user data
        added to this database.
    �_usersr
NcC�
g|_dSr�r*rrrrrA�
zUserDatabase.__init__�usernamerrr	r
rrc
Cs |j�t|||||||��dS)a�
        Add a new user record to this database.

        @param username: The value for the C{pw_name} field of the user
            record to add.

        @param password: The value for the C{pw_passwd} field of the user
            record to add.

        @param uid: The value for the C{pw_uid} field of the user record to
            add.

        @param gid: The value for the C{pw_gid} field of the user record to
            add.

        @param gecos: The value for the C{pw_gecos} field of the user record
            to add.

        @param home: The value for the C{pw_dir} field of the user record to
            add.

        @param shell: The value for the C{pw_shell} field of the user record to
            add.
        N)r*�appendr)rr.rrr	r
rrrrr�addUserDs"�zUserDatabase.addUsercCs$|jD]}|j|kr|Sqt��)zH
        Return the user record corresponding to the given uid.
        )r*r�KeyError)rr�entryrrr�getpwuidjs


�zUserDatabase.getpwuidrcCs@t|t�stdt|�����|jD]}|j|kr|Sqt��)zM
        Return the user record corresponding to the given username.
        z%getpwuam() argument must be str, not )�
isinstancer(�	TypeError�typer*rr1)rrr2rrr�getpwnamss


�zUserDatabase.getpwnamcC�|jS)z4
        Return a list of all user records.
        r,rrrr�getpwall~�zUserDatabase.getpwall�r
N)r$r%r&r'rr�__annotations__rr(r)r0r3r7r9rrrrr6s0

�������	
�&	c@sXeZdZdZdededededededed	ed
eddfd
d�Zdefdd�Zdd�ZdS)�
_ShadowRecordz�
    L{_ShadowRecord} holds the shadow user data for a single user in
    L{ShadowDatabase}.  It corresponds to C{spwd.struct_spwd}.  See that class
    for attribute documentation.
    r.r�
lastChange�min�max�warn�inact�expire�flagr
Nc

Cs:||_||_||_||_||_||_||_||_|	|_dSr�	�sp_nam�sp_pwd�	sp_lstchg�sp_min�sp_max�sp_warn�sp_inact�	sp_expire�sp_flag�
rr.rr>r?r@rArBrCrDrrrr�s
z_ShadowRecord.__init__cCr)N�	rrrrrr�rz_ShadowRecord.__len__c	Cs,|j|j|j|j|j|j|j|j|jf	|SrrEr rrrr"�s�
�z_ShadowRecord.__getitem__r#rrrrr=�s2�������	�
�
�r=c@steZdZUdZeeed<ddd�Zdeded	e	d
e	de	de	d
e	de	de	ddfdd�Z
dedefdd�Zdd�ZdS)rz�
    L{ShadowDatabase} holds a shadow user database in memory and makes it
    available via the same API as C{spwd}.

    @ivar _users: A C{list} of L{_ShadowRecord} instances holding all user data
        added to this database.

    @since: 12.0
    r*r
NcCr+rr,rrrrr�r-zShadowDatabase.__init__r.rr>r?r@rArBrCrDc

Cs$|j�t|||||||||	�	�dS)a�
        Add a new user record to this database.

        @param username: The value for the C{sp_nam} field of the user record to
            add.

        @param password: The value for the C{sp_pwd} field of the user record to
            add.

        @param lastChange: The value for the C{sp_lstchg} field of the user
            record to add.

        @param min: The value for the C{sp_min} field of the user record to add.

        @param max: The value for the C{sp_max} field of the user record to add.

        @param warn: The value for the C{sp_warn} field of the user record to
            add.

        @param inact: The value for the C{sp_inact} field of the user record to
            add.

        @param expire: The value for the C{sp_expire} field of the user record
            to add.

        @param flag: The value for the C{sp_flag} field of the user record to
            add.
        N)r*r/r=rOrrrr0�s
(��zShadowDatabase.addUsercCsBt|t�stdt|�����|jD]}|j|kr|Sqt|��)zT
        Return the shadow user record corresponding to the given username.
        z%getspnam() argument must be str, not )r4r(r5r6r*rFr1)rr.r2rrr�getspnam�s


�zShadowDatabase.getspnamcCr8)z;
        Return a list of all shadow user records.
        r,rrrr�getspall�r:zShadowDatabase.getspallr;)
r$r%r&r'rr=r<rr(r)r0rQrRrrrrr�s6


�������	�
�
�.N)r'�typingr�__all__rrr=rrrrr�<module>s(O.

Spamworldpro Mini