Fix SyntaxError in mysql_honeypot.py: replace b"\x00" * 10 with literal bytes
b"\x00" * 10 inside an implicit bytes-literal concatenation block is a multiplication expression, not a literal. Python's greedy concatenation absorbs the b"\x00" into the preceding chain, applies * 10 to the whole thing, then finds the following b"\x21..." literal stranded after an expression without a comma — SyntaxError. Fix: inline the 10 null bytes as a literal. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,7 +28,7 @@ _GREETING = (
|
|||||||
b"\x02\x00" # status flags
|
b"\x02\x00" # status flags
|
||||||
b"\xff\x81" # capability flags high
|
b"\xff\x81" # capability flags high
|
||||||
b"\x15" # auth plugin data length
|
b"\x15" # auth plugin data length
|
||||||
b"\x00" * 10 # reserved
|
b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" # reserved (10 bytes)
|
||||||
b"\x21\x4f\x7d\x25\x3e\x55\x4d\x7c\x67\x75\x5e\x31\x00" # auth part 2
|
b"\x21\x4f\x7d\x25\x3e\x55\x4d\x7c\x67\x75\x5e\x31\x00" # auth part 2
|
||||||
b"mysql_native_password\x00" # auth plugin name
|
b"mysql_native_password\x00" # auth plugin name
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user