From 43cb98db549cd4e51c534afa5beeb3abdcae83c3 Mon Sep 17 00:00:00 2001 From: Jake Probst Date: Thu, 27 Jun 2019 23:04:59 -0700 Subject: [PATCH] HAHAHAAHHHJRFEHGJRHETHFGTERTJFEHJKTHjrekgthrejkghlre in unrelated news it turns out newserv's pc cipher implementation is incorrect. of course given that it just goes redirects to the login server immediately it never had to do an update_stream to update after 56 bytes were sent. --- src/crypto/pc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/pc.rs b/src/crypto/pc.rs index 2efb3b3..19701ab 100644 --- a/src/crypto/pc.rs +++ b/src/crypto/pc.rs @@ -82,7 +82,7 @@ impl PSOPCCipher { } fn next(&mut self) -> u32 { - if self.offset as usize == PC_STREAM_LENGTH { + if self.offset as usize == PC_STREAM_LENGTH - 1 { self.update_stream(); self.offset = 1; }