remove randbytes

This commit is contained in:
Hay1tsme committed 2023-11-13 13:47:17 -05:00
1 parent ee45c55f66
commit 22cf3f83a6
2 files changed
+2 -3

No files matched your search

-1
View File
@@ -1,5 +1,4 @@
import logging
from random import randbytes
import socket
from twisted.internet.protocol import DatagramProtocol
+2 -2
View File
@@ -6,7 +6,7 @@ from logging.handlers import TimedRotatingFileHandler
from os import path
from Crypto.Cipher import Blowfish
from hashlib import md5
import random
import secrets
from core import CoreConfig, Utils
from core.title import BaseServlet
@@ -123,7 +123,7 @@ class SaoServlet(BaseServlet):
self.logger.debug(f"Response: {resp.hex()}")
if self.game_cfg.crypt.enable:
iv = random.randbytes(8)
iv = secrets.token_bytes(8)
data_to_crypt = resp[24:]
while len(data_to_crypt) % 8 != 0:
data_to_crypt += b"\x00"