forked from Dniel97/artemis
remove randbytes
This commit is contained in:
parent
ee45c55f66
commit
22cf3f83a6
@ -1,5 +1,4 @@
|
||||
import logging
|
||||
from random import randbytes
|
||||
import socket
|
||||
|
||||
from twisted.internet.protocol import DatagramProtocol
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user