From 0c7605dedf8b94e946983146c50871bcc1483a3b Mon Sep 17 00:00:00 2001 From: wujiayang2007 <52036257+wujiayang2007@users.noreply.github.com> Date: Fri, 20 Jun 2025 12:37:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=A7=E5=88=B6=E6=B5=81?= =?UTF-8?q?=E4=BF=9D=E6=8A=A4=E5=9C=A8#153=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 注意到 mkaring 在 1.4.0版本中对控制流保护做出了误操作(272行) 将src => statementLast.Contains(src),错误修改成了src => !statementLast.Contains(src),导致了保护后的程序出现了错误的循环,这里特此做出修复! --- Confuser.Protections/ControlFlow/SwitchMangler.cs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Confuser.Protections/ControlFlow/SwitchMangler.cs b/Confuser.Protections/ControlFlow/SwitchMangler.cs index 5e259e289..7dca5f55c 100644 --- a/Confuser.Protections/ControlFlow/SwitchMangler.cs +++ b/Confuser.Protections/ControlFlow/SwitchMangler.cs @@ -260,16 +260,8 @@ public override void Mangle(CilBody body, ScopeBlock root, CFContext ctx) { src.Offset >= block.Instructions.Last().Offset)) return true; - // Disable flow obfuscation for blocks reached by jump instructions. - // Bug in #153 caused exactly this behaviour, expect for allowing wrong jump instructions - // There is another issue present here tracked here: - // https://github.com/mkaring/ConfuserEx/issues/162 - // Until this issue is resolved, the ctrl flow obfuscation will be severely reduced. - if (srcs.Any()) - return true; - // Not targeted by the last of statements - if (srcs.Any(src => !statementLast.Contains(src))) + if (srcs.Any(src => statementLast.Contains(src))) return true; } return false;