示例#1
0
 def __init__(self, protocol):
     self.protocol = protocol
     self.state = Connected()
     self.rsa_key = L2RsaKey.generate()
     self.blowfish_key = BlowfishKey.generate()
     self.session_id = Int32.random()
     self.session_key = SessionKey()
     self.xor_key = LoginXorKey()
     self.protocol_version = 50721
     self.blowfish_key.decode = True
     self.blowfish_enabled = True
     self.encryption_enabled = True
示例#2
0
 def __init__(self, login_ok1=None, login_ok2=None, play_ok1=None, play_ok2=None):
     self.login_ok1 = Int32.random() if login_ok1 is None else login_ok1
     self.login_ok2 = Int32.random() if login_ok2 is None else login_ok2
     self.play_ok1 = Int32.random() if play_ok1 is None else play_ok1
     self.play_ok2 = Int32.random() if play_ok2 is None else play_ok2
示例#3
0
 def __init__(self, key=None):
     self.key = Int32.random() if not key else Int32(key)