| Server IP : 195.114.193.97 / Your IP : 216.73.217.93 Web Server : LiteSpeed System : Linux host 5.15.0-126-generic #136-Ubuntu SMP Wed Nov 6 10:38:22 UTC 2024 x86_64 User : sembi4241 ( 1126) PHP Version : 8.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/twisted/plugins/__pycache__/ |
Upload File : |
o
�b? � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl m
Z
ddlmZ ddl
mZ d d
� Zee�G dd� d��Zd
Zeeej�G dd� d��Ze� ZdS )z%
Cred plugin for UNIX user accounts.
� )�implementer)�plugin)�ICredentialsChecker)�IUsernamePassword)�UnauthorizedLogin)�ICheckerFactory)�deferc C s� zddl }W n ty d}Y nw |du rtd��t|t�r$|�d�}t| t�r.| �d�} z|� || �}t|t�r?|�d�}|| kW S tyM Y dS w )a�
Use L{crypt.crypt} to Verify that an unencrypted
password matches the encrypted password.
@param crypted: The encrypted password, obtained from
the Unix password database or Unix shadow
password database.
@param pw: The unencrypted password.
@return: L{True} if there is successful match, else L{False}.
@rtype: L{bool}
r Nz(cred_unix not supported on this platform�utf-8F)�crypt�ImportError�NotImplementedError�
isinstance�bytes�decode�OSError)�crypted�pwr
�
crypted_check� r �;/usr/lib/python3/dist-packages/twisted/plugins/cred_unix.py�verifyCryptedPassword s&