From 460be88a7306e83fc8aa1dc96594d9a1aedfc045 Mon Sep 17 00:00:00 2001 From: seiya-git Date: Sun, 8 Oct 2023 12:02:26 +0300 Subject: [PATCH] upd --- py-test/verif.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/py-test/verif.py b/py-test/verif.py index 0b3caf2c..6b87b1c6 100644 --- a/py-test/verif.py +++ b/py-test/verif.py @@ -144,6 +144,19 @@ def decrypt_verify(self): verdict = False def verify_enforcer(f, file): + if type(f) == Fs.Nca and f.header.contentType == Fs.Type.Content.PROGRAM: + for fs in f.sectionFilesystems: + if fs.fsType == Type.Fs.PFS0 and fs.cryptoType == Type.Crypto.CTR: + f.seek(0) + ncaHeader = f.read(0x400) + + sectionHeaderBlock = fs.buffer + + f.seek(fs.offset) + pfs0Header = f.read(0x10) + return True + else: + return False if type(f) == Fs.Nca.Nca and f.header.contentType == Fs.Type.Content.META: for fs in f.sectionFilesystems: if fs.fsType == Fs.Type.Fs.PFS0 and fs.cryptoType == Fs.Type.Crypto.CTR: