Skip to content

Commit 8c004b3

Browse files
committed
5.7.6 fix seley bug.
1 parent cb801fe commit 8c004b3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

code/default/x_tunnel/local/seley_front/rc4_wrap.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
import struct
44
import json
55

6-
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
6+
try:
7+
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
8+
except:
9+
algorithms = None
10+
711

812
import utils
913

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

28+
if not algorithms:
29+
raise socket.error('no cryptography')
30+
2431
algorithm = algorithms.AES(self.sni)
2532
iv = b'\x00' * 16
2633
self.cipher = Cipher(algorithm, mode=modes.CFB(iv))

0 commit comments

Comments
 (0)