403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/werkzeug/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/werkzeug/__pycache__/security.cpython-311.pyc
�

��b2�
�b�UddlZddlZddlZddlZddlZddlZejr	dZdZ	e
d�ejjejj
fD����Zejeed<dedefd�Zd	ed
ededejeeffd�Z	dded	ededefd�Zdededefd�Zdededejefd�ZdS)�N�>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789i��c#�*K�|]}|�|dk�
|V��dS)N�/�)�.0�seps  �3/usr/lib/python3/dist-packages/werkzeug/security.py�	<genexpr>r
s3����!�!��C�O��s�
�
�C�
�
�
�
�!�!��_os_alt_seps�length�returnc��|dkrtd���d�d�t|��D����S)zAGenerate a random string of SALT_CHARS with specified ``length``.rzSalt length must be positive�c3�HK�|]}tjt��V��dS�N)�secrets�choice�
SALT_CHARS)r�_s  r	r
zgen_salt.<locals>.<genexpr>s,����E�E�!�7�>�*�-�-�E�E�E�E�E�Er)�
ValueError�join�range)r
s r	�gen_saltrsA��
��{�{��7�8�8�8�
�7�7�E�E�u�V�}�}�E�E�E�E�E�Er�method�salt�passwordc��|dkr||fS|�d��}|�d��}|�d��r�|std���|dd��d��}t	|��dvrtd	���|�d
��}|rt
|d
pd
��nt}tj	||||���
��d|�d|��fS|r*tj|||���
��|fStj||���
��|fS)z�Internal password hash helper.  Supports plaintext without salt,
    unsalted and salted passwords.  In case salted passwords are used
    hmac is used.
    �plainzutf-8zpbkdf2:zSalt is required for PBKDF2�N�:)��z&Invalid number of arguments for PBKDF2r)�encode�
startswithr�split�len�pop�int�DEFAULT_PBKDF2_ITERATIONS�hashlib�pbkdf2_hmac�hex�hmac�new�	hexdigest)rrr�args�
iterationss     r	�_hash_internalr3sc��
���������;�;�w���D����w�'�'�H�
����#�#�
��	<��:�;�;�;��a�b�b�z����$�$���t�9�9�F�"�"��E�F�F�F����!����*.�M�S��a���A�&�&�&�4M�
�����$�
�C�C�G�G�I�I�+�f�+�+�z�+�+�
�	
�
�D��x��h��/�/�9�9�;�;�V�C�C��;�v�x�(�(�2�2�4�4�f�<�<r�
pbkdf2:sha256��salt_lengthc�l�|dkrt|��nd}t|||��\}}|�d|�d|��S)a�Hash a password with the given method and salt with a string of
    the given length. The format of the string returned includes the method
    that was used so that :func:`check_password_hash` can check the hash.

    The format for the hashed string looks like this::

        method$salt$hash

    This method can **not** generate unsalted passwords but it is possible
    to set param method='plain' in order to enforce plaintext passwords.
    If a salt is used, hmac is used internally to salt the password.

    If PBKDF2 is wanted it can be enabled by setting the method to
    ``pbkdf2:method:iterations`` where iterations is optional::

        pbkdf2:sha256:80000$salt$hash
        pbkdf2:sha256$salt$hash

    :param password: the password to hash.
    :param method: the hash method to use (one that hashlib supports). Can
                   optionally be in the format ``pbkdf2:method:iterations``
                   to enable PBKDF2.
    :param salt_length: the length of the salt in letters.
    rr�$)rr3)rrr6r�h�
actual_methods      r	�generate_password_hashr;<sR��6%+�g�$5�$5�8�K� � � �2�D�%�f�d�H�=�=��A�}��(�(�d�(�(�Q�(�(�(r�pwhashc��|�d��dkrdS|�dd��\}}}tjt	|||��d|��S)a�Check a password against a given salted and hashed password value.
    In order to support unsalted legacy passwords this method supports
    plain text passwords, md5 and sha1 hashes (both salted and unsalted).

    Returns `True` if the password matched, `False` otherwise.

    :param pwhash: a hashed string like returned by
                   :func:`generate_password_hash`.
    :param password: the plaintext password to compare against the hash.
    r8r#Fr)�countr&r.�compare_digestr3)r<rrr�hashvals     r	�check_password_hashrA\s^���|�|�C���1����u�"�L�L��a�0�0��F�D�'���~�f�d�H�E�E�a�H�'�R�R�Rr�	directory�	pathnamesc�P��|sd}|g}|D]���dkrtj����t�fd�tD����s:tj����s�dks��d��rdS|������tj	|�S)a2Safely join zero or more untrusted path components to a base
    directory to avoid escaping the base directory.

    :param directory: The trusted base directory.
    :param pathnames: The untrusted path components relative to the
        base directory.
    :return: A safe path, otherwise ``None``.
    �.rc3� �K�|]}|�vV��	dSrr)rr�filenames  �r	r
zsafe_join.<locals>.<genexpr>�s'�����8�8�C��x��8�8�8�8�8�8rz..z../N)
�	posixpath�normpath�anyr�os�path�isabsr%�appendr)rBrC�partsrGs   @r	�	safe_joinrPns�������	�
�K�E������r�>�>� �)�(�3�3�H�
�8�8�8�8�<�8�8�8�8�8�	��w�}�}�X�&�&�	��4����"�"�5�)�)� ��4�4�
���X������>�5�!�!r)r4r5)r+r.rKrHr�typing�t�
TYPE_CHECKINGrr*�listrLr�altsepr�List�str�__annotations__r)r�Tupler3r;�boolrA�OptionalrPrrr	�<module>r\s������������	�	�	�	��������������?�	��
M�
�"�� �D�!�!��G�K����0�!�!�!����a�f�S�k����
F�S�F�S�F�F�F�F�=�3�=�c�=�S�=�Q�W�S�#�X�=N�=�=�=�=�DFH�)�)��)��)�?B�)��)�)�)�)�@S��S�s�S�t�S�S�S�S�$"��"�#�"�!�*�S�/�"�"�"�"�"�"r

Youez - 2016 - github.com/yon3zu
LinuXploit