Skip to content

Commit

Permalink
5.7.6 fix seley bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-X-Net committed Sep 25, 2023
1 parent cb801fe commit 8c004b3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion code/default/x_tunnel/local/seley_front/rc4_wrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
import struct
import json

from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
try:
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
except:
algorithms = None


import utils

Expand All @@ -21,6 +25,9 @@ def __init__(self, sock, ip_str=None, sni=None, on_close=None):
self.running = True
self.h2 = False

if not algorithms:
raise socket.error('no cryptography')

algorithm = algorithms.AES(self.sni)
iv = b'\x00' * 16
self.cipher = Cipher(algorithm, mode=modes.CFB(iv))
Expand Down

0 comments on commit 8c004b3

Please sign in to comment.