Skip to content

Commit 57a7581

Browse files
committed
fix: Update format_msg function to require max_length parameter explicitly
1 parent 485bc61 commit 57a7581

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Jiyu_attack.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ def ip_analyze(ip: str) -> list[str]:
153153

154154
def format_msg(
155155
msg: str,
156+
max_length: int,
156157
*,
157-
max_length: int = 800,
158158
errors: Literal["error", "warning", "ignore"] = "error",
159159
) -> bytes:
160160
"""
@@ -202,7 +202,7 @@ def pkg_message(
202202
Raises:
203203
ValueError: If the message length exceeds 800 bytes or if the header length is incorrect
204204
"""
205-
data = format_msg(msg, errors=errors)
205+
data = format_msg(msg, 800, errors=errors)
206206
head = (
207207
b"DMOC\x00\x00\x01\x00\x9e\x03\x00\x00"
208208
+ secrets.token_bytes(16)

0 commit comments

Comments
 (0)