403Webshell
Server IP : 157.22.201.140  /  Your IP : 216.73.216.74
Web Server : nginx/1.30.1
System : Linux mit.vincode.fvds.ru 6.8.0-111-generic #111-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 11 23:16:02 UTC 2026 x86_64
User : root ( 0)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/passlib/handlers/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/passlib/handlers/__pycache__/md5_crypt.cpython-312.pyc
�

XR_�5��(�dZddlmZddlZeje�ZddlmZm	Z	m
Z
ddlmZddl
mZmZddlmcmZddgZd	Zd
ZdZdZd
Zdd�ZGd�dej6ej8�ZGd�dej<e�ZGd�de�Z y)z0passlib.handlers.md5_crypt - md5-crypt algorithm�)�md5N)�
safe_crypt�
test_crypt�
repeat_string)�h64)�unicode�u�	md5_crypt�
apr_md5_crypt�s$1$s$apr1$))r�����rr
)r�rr�rr
)�rrr)rrrrr)rr
rr)rrrrr)��r�
�r��r��	r
r�
r�c�p�t|t�r|jd�}t|t�sJd��t|vr#t
jjt��t|�}t|t�sJd��|jd�}t|�dksJd��|rt}nt}t||z|z�j�}t||z|z�}|j}|t||��|}|dd}	|r||dzrtn|	�|dz}|r�|j�}
||z}||z}|||||z||z||zg}
t D��cgc]\}}|
||
|f��}}}|
}d	}|rH|D];\}}t|t||z�j�z�j�}�=|dz}|r�H|dd
D];\}}t|t||z�j�z�j�}�=t#j$|t&�j)d�Scc}}w)a�perform raw md5-crypt calculation

    this function provides a pure-python implementation of the internals
    for the MD5-Crypt algorithms; it doesn't handle any of the
    parsing/validation of the hash strings themselves.

    :arg pwd: password chars/bytes to hash
    :arg salt: salt chars to use
    :arg use_apr: use apache variant

    :returns:
        encoded checksum chars
    zutf-8zpwd not unicode or byteszsalt not unicode�asciirzsalt too largeNr��)�
isinstancer�encode�bytes�_BNULL�uh�exc�NullPasswordErrorr
�len�
_APR_MAGIC�
_MD5_MAGICr�digest�updater�_c_digest_offsetsr�encode_transposed_bytes�_transpose_map�decode)�pwd�salt�use_apr�pwd_len�magic�db�a_ctx�a_ctx_update�i�evenchar�da�pwd_pwd�pwd_salt�perms�even�odd�data�dc�blockss                   �</usr/lib/python3/dist-packages/passlib/handlers/md5_crypt.py�_raw_md5_cryptrG,sL��4�#�w���j�j��!���c�5�!�=�#=�=�!�
��}��f�f�&�&�y�1�1��#�h�G��d�G�$�8�&8�8�$��;�;�w��D��t�9�q�=�*�*�*�=������


�S�4�Z�#�
�	�	%�	%�	'�B�
��e��d�"�#�E��<�<�L���r�7�+�,�	�A��2�A�w�H�
��q�1�u�V�(�3�	�a����

����B�\�#�g�G��4�x�H�
�'�8�X�c�\�4��8�T�'�\�J�E�9J�J�9�4��e�D�k�5��:�
&�J�D�J�
�B�
�F�
��	=�I�D�#��S�3�r�D�y�>�0�0�2�2�3�:�:�<�B�	=��!�����#�2�Y�9�	��c�
��s�2��9�~�,�,�.�.�
/�
6�
6�
8��9��&�&�r�>�:�A�A�'�J�J��#Ks�!H2c�b�eZdZdZdZdZejZdZ	ejZ
ed��Zd�Z
y)�_MD5_Commonz+common code for md5_crypt and apr_md5_crypt)r4�	salt_size�rc�`�tj||j|��\}}|||��S)N)�handler)r4�checksum)r'�	parse_mc2�ident)�cls�hashr4�chks    rF�from_stringz_MD5_Common.from_string�s)���L�L��s�y�y�#�>�	��c���s�+�+�c�l�tj|j|j|j�S�N)r'�
render_mc2rPr4rN)�selfs rF�	to_stringz_MD5_Common.to_string�s!���}�}�T�Z�Z����D�M�M�B�BrUN)�__name__�
__module__�__qualname__�__doc__�setting_kwds�
checksum_sizer'�HASH64_CHARS�checksum_chars�
max_salt_size�
salt_chars�classmethodrTrZ�rUrFrIrI�sB��5�
)�L��M��_�_�N��M����J��,��,�CrUrIc�T�eZdZdZdZed�ZdZed��Z	d�Z
ed��Zd�Zy)	r
a�This class implements the MD5-Crypt password hash, and follows the :ref:`password-hash-api`.

    It supports a variable-length salt.

    The :meth:`~passlib.ifc.PasswordHash.using` method accepts the following optional keywords:

    :type salt: str
    :param salt:
        Optional salt string.
        If not specified, one will be autogenerated (this is recommended).
        If specified, it must be 0-8 characters, drawn from the regexp range ``[./0-9A-Za-z]``.

    :type salt_size: int
    :param salt_size:
        Optional number of characters to use when autogenerating new salts.
        Defaults to 8, but can be any value between 0 and 8.
        (This is mainly needed when generating Cisco-compatible hashes,
        which require ``salt_size=4``).

    :type relaxed: bool
    :param relaxed:
        By default, providing an invalid value for one of the other
        keywords will result in a :exc:`ValueError`. If ``relaxed=True``,
        and the error can be corrected, a :exc:`~passlib.exc.PasslibHashWarning`
        will be issued instead. Correctable errors include
        ``salt`` strings that are too long.

        .. versionadded:: 1.6
    z$1$)�os_crypt�builtinc�T�tdd�r|j|j�yy)N�testz$1$test$pi/xDtU5WFVRqYS6BMU8X/TF)r�_set_calc_checksum_backend�_calc_checksum_os_crypt�rQs rF�_load_backend_os_cryptz md5_crypt._load_backend_os_crypts'���f�>�?��*�*�3�+F�+F�G��rUc��|j|jz}t||�}|�|j|�S|j	|�rt|�t|�dzk7r!tjj|||��|ddS)Nr!i��)	rPr4r�_calc_checksum_builtin�
startswithr*r'r(�CryptBackendError)rY�secret�configrRs    rFrmz!md5_crypt._calc_checksum_os_crypts}�����d�i�i�'���&�&�)���<��.�.�v�6�6����v�&�#�d�)�s�6�{�R�7G�*G��&�&�*�*�4���>�>��C�D�z�rUc�:�|j|j�y)NT)rlrqrns rF�_load_backend_builtinzmd5_crypt._load_backend_builtin%s���&�&�s�'A�'A�B�rUc�.�t||j�SrW�rGr4�rYrts  rFrqz md5_crypt._calc_checksum_builtin*s���f�d�i�i�0�0rUN)
r[r\r]r^�namer	rP�backendsrerormrwrqrfrUrFr
r
�sQ���@�D�
�e�H�E�'�H�
����	�����1rUc�*�eZdZdZdZed�Zd�Zy)rapThis class implements the Apr-MD5-Crypt password hash, and follows the :ref:`password-hash-api`.

    It supports a variable-length salt.

    The :meth:`~passlib.ifc.PasswordHash.using` method accepts the following optional keywords:

    :type salt: str
    :param salt:
        Optional salt string.
        If not specified, one will be autogenerated (this is recommended).
        If specified, it must be 0-8 characters, drawn from the regexp range ``[./0-9A-Za-z]``.

    :type relaxed: bool
    :param relaxed:
        By default, providing an invalid value for one of the other
        keywords will result in a :exc:`ValueError`. If ``relaxed=True``,
        and the error can be corrected, a :exc:`~passlib.exc.PasslibHashWarning`
        will be issued instead. Correctable errors include
        ``salt`` strings that are too long.

        .. versionadded:: 1.6
    z$apr1$c�2�t||jd��S)NT)r5ryrzs  rF�_calc_checksumzapr_md5_crypt._calc_checksumQs���f�d�i�i��>�>rUN)r[r\r]r^r{r	rPrrfrUrFrr1s���2�D�
�h�K�E�
?rU)F)!r^�hashlibr�logging�	getLoggerr[�log�
passlib.utilsrrr�passlib.utils.binaryr�passlib.utils.compatrr	�passlib.utils.handlers�utils�handlersr'�__all__r&r,r+r/r1rG�HasSalt�GenericHandlerrI�HasManyBackendsr
rrfrUrF�<module>r�s���6�
��'�g�'�'��1��@�?�$�+�#�#�����
��
�
�
�
���H��OK�hC�"�*�*�b�/�/�C�@K1��"�"�K�K1�b!?�K�!?rU

Youez - 2016 - github.com/yon3zu
LinuXploit