Using this method to login (which works on 1.18.2) and is now giving me this error on 1.19:Unhandled Error Traceback (most recent call last): File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\twisted\python\log.py", line 96, in callWithLogger return callWithContext({"system": lp}, func, *args, **kw) File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\twisted\python\log.py", line 80, in callWithContext return context.call({ILogContext: newCtx}, func, *args, **kw) File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\twisted\python\context.py", line 117, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\twisted\python\context.py", line 82, in callWithContext return func(*args, **kw) --- <exception caught here> --- File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\twisted\internet\selectreactor.py", line 148, in _doReadOrWrite why = getattr(selectable, method)() File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\twisted\internet\tcp.py", line 248, in doRead return self._dataReceived(data) File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\twisted\internet\tcp.py", line 253, in _dataReceived rval = self.protocol.dataReceived(data) File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\quarry\net\protocol.py", line 84, in dataReceived return self.data_received(data) File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\quarry\net\protocol.py", line 245, in data_received self.packet_received(buff, name) File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\quarry\net\protocol.py", line 267, in packet_received dispatched = self.dispatch((name,), buff) File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\quarry\net\protocol.py", line 26, in dispatch handler(buff) File "nbt_view_proxy.py", line 86, in packet_login_encryption_response verify_token = crypto.decrypt_secret( File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\quarry\net\crypto.py", line 102, in decrypt_secret return keypair.decrypt( File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\cryptography\hazmat\backends\openssl\rsa.py", line 422, in decrypt raise ValueError("Ciphertext length must be equal to key size.") builtins.ValueError: Ciphertext length must be equal to key size.
and this is the code I'm using
class MyUpstream(Upstream):
def packet_login_encryption_request(self, buff):
p_server_id = buff.unpack_string()
The code runs but it only fails after I try to join a 1.19 server. If I try to join a 1.18.2 server however it works fine. And I have updated Quarry with the 1.19 additions
If anyone can help me out here it would be much appreciated, sorry if I'm just being dumb
Using this method to login (which works on 1.18.2) and is now giving me this error on 1.19:
Unhandled Error Traceback (most recent call last): File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\twisted\python\log.py", line 96, in callWithLogger return callWithContext({"system": lp}, func, *args, **kw) File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\twisted\python\log.py", line 80, in callWithContext return context.call({ILogContext: newCtx}, func, *args, **kw) File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\twisted\python\context.py", line 117, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\twisted\python\context.py", line 82, in callWithContext return func(*args, **kw) --- <exception caught here> --- File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\twisted\internet\selectreactor.py", line 148, in _doReadOrWrite why = getattr(selectable, method)() File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\twisted\internet\tcp.py", line 248, in doRead return self._dataReceived(data) File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\twisted\internet\tcp.py", line 253, in _dataReceived rval = self.protocol.dataReceived(data) File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\quarry\net\protocol.py", line 84, in dataReceived return self.data_received(data) File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\quarry\net\protocol.py", line 245, in data_received self.packet_received(buff, name) File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\quarry\net\protocol.py", line 267, in packet_received dispatched = self.dispatch((name,), buff) File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\quarry\net\protocol.py", line 26, in dispatch handler(buff) File "nbt_view_proxy.py", line 86, in packet_login_encryption_response verify_token = crypto.decrypt_secret( File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\quarry\net\crypto.py", line 102, in decrypt_secret return keypair.decrypt( File "C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\cryptography\hazmat\backends\openssl\rsa.py", line 422, in decrypt raise ValueError("Ciphertext length must be equal to key size.") builtins.ValueError: Ciphertext length must be equal to key size.
and this is the code I'm using
class MyUpstream(Upstream): def packet_login_encryption_request(self, buff): p_server_id = buff.unpack_string()
class MyDownstream(Downstream): def packet_login_encryption_response(self, buff): if self.login_expecting != 1: raise ProtocolError("Out-of-order login")
Sorry that wouldn't format for some reason, but the code fails at:
verify_token = crypto.decrypt_secret( self.factory.keypair, p_verify_token)
The code runs but it only fails after I try to join a 1.19 server. If I try to join a 1.18.2 server however it works fine. And I have updated Quarry with the 1.19 additions
If anyone can help me out here it would be much appreciated, sorry if I'm just being dumb
Edit: anything not in bold is code