From e01ae320477d597ce30cc43ffd2792e87c7cf01c Mon Sep 17 00:00:00 2001 From: JoshuaMKW <60854312+JoshuaMKW@users.noreply.github.com> Date: Mon, 24 Aug 2020 05:24:50 -0500 Subject: [PATCH] Improved encryption --- kernel.py | 2 +- loader.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel.py b/kernel.py index 3c23dde..0dcb56b 100644 --- a/kernel.py +++ b/kernel.py @@ -258,7 +258,7 @@ class CodeHandler: packet = tools.read_uint32(self.geckoCodes.codeList) self.geckoCodes.codeList.seek(-4, 1) tools.write_uint32(self.geckoCodes.codeList, (packet^key) & 0xFFFFFFFF) - key += (i ^ key) & 0xFFFFFFFF + key += (i << 3) & 0xFFFFFFFF if key > 0xFFFFFFFF: key -= 0x100000000 i += 1 diff --git a/loader.cpp b/loader.cpp index aef3a45..cea6536 100644 --- a/loader.cpp +++ b/loader.cpp @@ -289,7 +289,7 @@ namespace Memory { for (u32 i = 0; i < size; ++i) { dest[i] = buffer[i] ^ key; - key += i ^ key; + key += i << 3; } } };