hyb
2025-12-30 399ffc4d9829f70529d3b096fe4228f7496cc566
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
Ë
Wñúh(1ãóܗdZdgZddlZddlmZmZmZmZmZddl    m
Z
m Z ddl m Z mZmZddlmZdd    lmZmZmZdd
lmZmZmZmZdd lmZmZd d lmZd dl m!Z!m"Z"d dl#m$Z$Gd„de«Zy)z,Implements the MySQL Client/Server protocol.Ú MySQLProtocoléN)ÚAnyÚDictÚListÚOptionalÚTupleé)Ú
ClientFlagÚ    ServerCmd)ÚInterfaceErrorÚProgrammingErrorÚ get_exception)Úlogger)ÚDEFAULT_CHARSET_IDÚDEFAULT_MAX_ALLOWED_PACKETr)ÚBinaryProtocolTypeÚDescriptionTypeÚ EofPacketTypeÚ HandShakeType)Úlc_intÚread_lc_string_listé)Ú MySQLSocket)ÚMySQLAuthPluginÚget_auth_plugin)Ú"MySQLCachingSHA2PasswordAuthPluginc ó²—eZdZdZe            ddededededeed    ed
ee    ee
fd e ee ffd „«Z eded eddddddf
dedededeededededeedeedee    eefded    ed
ee    ee
fd e ee ffd„«Z            ddedeedededeed e ee edfeeff d„Z        d dede edfdedeed e ee eedfeeff
d„Zy)!rzSImplements MySQL client/server protocol.
 
    Create and parses MySQL packets.
    NFÚ    auth_dataÚusernameÚpasswordÚ auth_pluginÚauth_plugin_classÚ ssl_enabledÚ plugin_configÚreturncó@—|s|dk(rdt|||¬«fS|€i}    t||«|||¬«}|j|fi|¤Ž}|€t    d|j
›«‚t t|««|z}||fS#ttf$r}    t    d|    ›«|    ‚d}    ~    wwxYw)aPrepare the first authentication response.
 
        Args:
            auth_data: Authorization data from initial handshake.
            username: Account's username.
            password: Account's password.
            client_flags: Integer representing client capabilities flags.
            auth_plugin: Authorization plugin name.
            auth_plugin_class: Authorization plugin class (has higher precedence
                               than the authorization plugin name).
            ssl_enabled: Whether SSL is enabled or not.
            plugin_config: Custom configuration to be passed to the auth plugin
                           when invoked. The parameters defined here will override
                           the ones defined in the auth plugin itself.
 
        Returns:
            auth_response: Authorization plugin response.
            auth_strategy: Authorization plugin instance created based
                           on the provided `auth_plugin` and `auth_plugin_class`
                           parameters.
 
        Raises:
            InterfaceError: If authentication fails or when got a NULL auth response.
        Úó)r#NzFailed authentication: z8Got NULL auth response while authenticating with plugin )rrÚ auth_responseÚ    TypeErrorr ÚnamerÚlen)
rrr r!r"r#r$Ú auth_strategyr)Úerrs
          úOH:\Change_password\venv_build\Lib\site-packages\mysql/connector/aio/protocol.pyÚauth_plugin_first_responsez(MySQLProtocol.auth_plugin_first_response:sì€ñD˜K¨2Ò-àÔ>ؘ(° ôðð ð Ð  ØˆMð    KØKœO¨KÐ9JÓKؘ(° ôˆMð8˜M×7Ñ7¸    ÑSÀ]ÑSˆMð Ð  Ü ðØ'×,Ñ,Ð-ð/óð ô
œs =Ó1Ó2°]ÑBˆ à˜mÐ+Ð+øôœ>Ð*ò    KÜ Ð#:¸3¸%Ð!@ÓAÀsÐ Jûð    Kús(A:Á:B    BÂBrÚ    handshakeÚdatabaseÚcharsetÚ client_flagsÚmax_allowed_packetÚ
conn_attrsÚis_change_user_requestc     ó\—|j«} g}|
rtjd«tjd«|€ td«d‚|j    d«€ td«d‚    |xs|d}tjd
|«|
rB|jtjd t| «›d tj| ««n9d }|jtjd|›t| «›d |||| ««tj|d||||| | ¬«\}}|j|«|jtj||««|
r%|jtjd|««|t j"zr"|j|j«dz«|t j$zr&|    $|jtj'|    ««dj)|«|fS#t
t f$r}td|›d    «d‚d}~wwxYw)a²Make a MySQL Authentication packet.
 
        Args:
            handshake: Initial handshake.
            username: Account's username.
            password: Account's password.
            database: Initial database name for the connection
            charset: Client charset (see [2]), only the lower 8-bits.
            client_flags: Integer representing client capabilities flags.
            max_allowed_packet: Maximum packet size.
            auth_plugin: Authorization plugin name.
            auth_plugin_class: Authorization plugin class (has higher precedence
                               than the authorization plugin name).
            conn_attrs: Connection attributes.
            is_change_user_request: Whether is a `change user request` operation or not.
            ssl_enabled: Whether SSL is enabled or not.
            plugin_config: Custom configuration to be passed to the auth plugin
                           when invoked. The parameters defined here will override
                           the one defined in the auth plugin itself.
 
        Returns:
            handshake_response: Handshake response as per [1].
            auth_strategy: Authorization plugin instance created based
                           on the provided `auth_plugin` and `auth_plugin_class`.
 
        Raises:
            ProgrammingError: Handshake misses authentication info.
 
        References:
            [1]: https://dev.mysql.com/doc/dev/mysql-server/latest/                page_protocol_connection_phase_packets_protocol_handshake_response.html
 
            [2]: https://dev.mysql.com/doc/dev/mysql-server/latest/                page_protocol_basic_character_set.html#a_protocol_character_set
        zGot a `change user` requestzStarting authorization phaseNzGot a NULL handshakerz$Handshake misses authentication infor!z-Handshake misses authentication plugin info (ú)z#The provided initial strategy is %sz<BÚsxÚxxxxxxxxxxxxxxxxxxxxxxxz<IIB)rrr r!r"r#r$z<Hr(ó)ÚencoderÚdebugr Úgetr*ÚKeyErrorÚappendÚstructÚpackr,r Ú CHANGE_USERrr0Úconnect_with_dbr
Ú PLUGIN_AUTHÚ CONNECT_ARGSÚmake_conn_attrsÚjoin)r1rr r2r3r4r5r!r"r6r7r#r$Ú
b_usernameÚresponse_payloadr.Úfillerr)r-s                   r/Ú    make_authzMySQLProtocol.make_authws,€ðf—_‘_Ó&ˆ
ØÐá !Ü L‰LÐ6Ô 7ä ‰ Ð3Ô4Ø Ð Ü"Ð#9Ó:ÀÐ Dà =‰=˜Ó %Ð -Ü"Ð#IÓJÐPTÐ Tð    Ø%ÒA¨°=Ñ)AˆKô      ‰ Ð:¸KÔHá !Ø × #Ñ #Ü— ‘ Øœ˜Z›Ð)¨Ð,Ü×)Ñ)Øóõ ðˆFØ × #Ñ #Ü— ‘ ؘ6˜(¤3 z£?Ð"3°2Ð6Ø Ø&ØØó ô ô(5×'OÑ'OØ  Ñ,ØØØ#Ø/Ø#Ø'ð(Pó(
Ñ$ˆ }ð    ×Ñ  Ô.ð    ×Ѥ × =Ñ =¸lÈHÓ UÔVñ "Ø × #Ñ #¤F§K¡K°°gÓ$>Ô ?ð œ*×0Ñ0Ò 0Ø × #Ñ # K×$6Ñ$6Ó$8¸7Ñ$BÔ Cð œ:×2Ñ2Ò 2¸
Ð8NØ × #Ñ #¤M×$AÑ$AÀ*Ó$MÔ Nàx‰xÐ(Ó)¨=Ð8Ð8øômœ8Ð$ò    Ü"Ø?À¸uÀAÐFóàð ûð    úsÁ+    HÈH+ÈH&È&H+ÚsockÚcolumnsÚcountÚ read_timeout.cƒó8K—g}d}d}d}        |s|    |k(r    ||fS|j|«ƒd{–—†}
|
ddk(r|j|
«}d}n |
ddk(rd}|j||
dd|«}|€||j|«n|€ |€ t    |
«‚|    dz }    ŒŒ7Œk­w)zxRead MySQL binary protocol result.
 
        Reads all or given number of binary resultset rows from the socket.
        Nrééþér)ÚreadÚ    parse_eofÚ_parse_binary_valuesrAr) ÚselfrNrOrPr3rQÚrowsÚeofÚvaluesÚiÚpackets            r/Úread_binary_resultz MySQLProtocol.read_binary_resultòsÐèø€ðˆØˆØˆØ ˆØÙa˜5’jØðcˆ{Ðð Ÿ9™9 \Ó2×2ˆFؐa‰y˜CÒØ—n‘n VÓ,Ø‘ؘ‘˜a’ؐØ×2Ñ2°7¸FÀ1À2¸JÈÓPØˆ{˜vÐ1Ø— ‘ ˜FÕ#ؐ  Ü# FÓ+Ð+Ø ‰FˆAðð3ús‚*B¬B­A,BÚversioncƒó¨K—|}g}d}d}d}        |s|    |k(r    ||fS|j|«ƒd{–—†}
|
jd«rž|
ddg} |j|«ƒd{–—†}
|
jd«r?| j|
dd«|j|«ƒd{–—†}
|
jd«rŒ?| j|
dd«tdj    | ««}n=|
ddk(r|
ddkr|j |
«}d}nd}tt |
dd««}|€||j|«n|€ |€ t|
«‚|    dz }    Œ=7Œ7Œï7Œ³­w)    z·Read MySQL text result.
 
        Reads all or given number of rows from the socket.
 
        Returns a tuple with 2 elements: a list with all rows and
        the EOF packet.
        NrsÿÿÿrSr<rTér)rVÚ
startswithrArrIrWÚbytesr) rYrNr`rPrQÚ_rZr[Úrowdatar]r^Údatass             r/Úread_text_resultzMySQLProtocol.read_text_resultsnèø€ð$ ˆØˆØˆØˆØ ˆØÙa˜5’jØð*SˆyÐð) Ÿ9™9 \Ó2×2ˆFØ× Ñ  Ô1Ø  ˜˜ Ø#Ÿy™y¨Ó6×6Ø×'Ñ'¨Ô8Ø—L‘L ¨¨ Ô,Ø#'§9¡9¨\Ó#:×:Fð×'Ñ'¨Õ8ð— ‘ ˜V A B˜ZÔ(Ü-¨c¯h©h°u«oÓ>‘ؘ‘˜cÒ! f¨Q¡i°!¢mØ—n‘n VÓ,Ø‘àÜ-¬e°F¸1¸2°JÓ.?Ó@Øˆ{˜wÐ2Ø— ‘ ˜GÕ$ؐ  Ü# FÓ+Ð+Ø ‰FˆAñ-ð3ùð7øð;ús:‚,E®E ¯/EÁEÁ=EÂEÂEÂ3BEÅEÅE)NFN)rzutf-8N)rN)Ú__name__Ú
__module__Ú __qualname__Ú__doc__Ú staticmethodrdÚstrrÚboolrrrrr0rrrÚintrMrrrrrr_rh©r<r/rr4su„ñð
ð ,0Ø!Ø26ñ:,Øð:,àð:,ðð:,ðð    :,ð
$ C™=ð :,ð ð :,ð   S¨# X¡Ñ/ð:,ð
ˆuoÐ%Ñ    &ò:,óð:,ðxð
#'Ø)ØØ"<Ø%)Ø+/Ø/3Ø',Ø!Ø26ñw9Ø ðw9àðw9ððw9ð˜3‘-ð    w9ð
ð w9ð ð w9ð ðw9ð˜c‘]ðw9ð$ C™=ðw9ð˜T # s (™^Ñ,ðw9ð!%ðw9ððw9ð   S¨# X¡Ñ/ðw9ð
ˆuoÐ%Ñ    &òw9óðw9ð|ØØ&*ñ "àð"ðoÑ&ð"ðð    "ð
ð "ð ˜s‘mð "ð
Ø ˆUÐ% sÐ*Ñ +Ñ,ؐÑð    !ñ
ó"ðRØ&*ñ .àð.ðs˜Cx‘ð.ðð    .ð
˜s‘mð .ð
Ø ˆU8˜E‘? CÐ'Ñ (Ñ)ؐÑð    !ñ
ô .r<)%rlÚ__all__rBÚtypingrrrrrÚ    constantsr
r Úerrorsr r rrÚprotocolrrrÚ_MySQLProtocolÚtypesrrrrÚutilsrrÚnetworkrÚpluginsrrÚplugins.caching_sha2_passwordrrqr<r/ú<module>r}sTðñ:3à Ð
€ã ç3Õ3ç-ßDÑDÝ÷ñ÷
VÓUß/Ý ß5ÝMôQNõQr<