{"record":{"id":"7ed796c83a2bfb69","repo":"huiyadanli/RevokeMsgPatcher","slug":"maybe-modified","errorCode":"maybe_modified","errorMessage":"程序支持此文件版本： {editor.FileName} - {editor.FileVersion}。但是文件校验不通过，请确认是否使用过其他补丁程序！","messagePattern":"程序支持此文件版本： (.+?) - (.+?)。但是文件校验不通过，请确认是否使用过其他补丁程序！","errorType":"error_code","errorClass":"BusinessException","httpStatus":null,"severity":"error","filePath":"RevokeMsgPatcher/Modifier/AppModifier.cs","lineNumber":375,"sourceCode":"                            replacePatterns = editor.FileCommonModifyInfo.ReplacePatterns.Where(info => categories.Contains(info.Category)).ToList();\n                        }\n\n                        // 如果能顺利得到 TargetChanges 不报错则可以使用特征替换方式\n                        editor.TargetChanges = ModifyFinder.FindChanges(editor.FilePath, replacePatterns);\n                        continue;\n                    }\n                    else\n                    {\n                        // SHA1不匹配，连版本也不匹配，说明完全不支持\n                        if (matchingVersion == null)\n                        {\n                            throw new BusinessException(\"not_support\", $\"不支持的文件：名称 {editor.FileName} 版本 {editor.FileVersion}！\");\n                        }\n\n                        // SHA1不匹配，但是版本匹配，可能dll已经被其他补丁程序修改过\n                        if (matchingVersion != null)\n                        {\n                            throw new BusinessException(\"maybe_modified\", $\"程序支持此文件版本： {editor.FileName} - {editor.FileVersion}。但是文件校验不通过，请确认是否使用过其他补丁程序！\");\n                        }\n                    }\n                }\n            }\n        }\n\n        /// <summary>\n        /// c.根据补丁信息，安装补丁\n        /// 两种打补丁的方式：精准（指定位置替换）、通用（特征码替换）\n        /// </summary>\n        /// <returns></returns>\n        public bool Patch()\n        {\n            // 首先验证文件修改器是否没问题\n            if (editors.Count == 0)\n            {\n                throw new Exception(\"补丁安装失败，原因：无对应的文件修改器\");\n            }","sourceCodeStart":357,"sourceCodeEnd":393,"githubUrl":"https://github.com/huiyadanli/RevokeMsgPatcher/blob/89cbbb3f0cc896d5d092de0199a635c5c39944b6/RevokeMsgPatcher/Modifier/AppModifier.cs#L357-L393","documentation":"The file's SHA1 matched neither before nor after, but its version DID match a known ModifyInfo. AppModifier throws BusinessException('maybe_modified'): the version is supported yet the bytes differ, implying another tool (or manual edit) altered the DLL.","triggerScenarios":"A DLL of a supported version whose contents were changed outside this tool: a competing patcher, a manual hex edit, or a partial/corrupt write.","commonSituations":"Used a competing anti-recall/multi-open tool first; the DLL was patched and not restored.","solutions":["Restore a clean/original DLL of that version (from backup or a fresh install).","Remove other patchers' changes, then retry."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"static bool IsBusinessException(Exception e, string code) => e is BusinessException b && b.ErrorCode == code;\n\nstatic bool IsMaybeModified(Exception e) => IsBusinessException(e, \"maybe_modified\");","tryCatchPattern":"try\n{\n    modifier.ValidateAndFindModifyInfo(categories);\n}\ncatch (BusinessException ex) when (ex.ErrorCode == \"maybe_modified\")\n{\n    MessageBox.Show(\"文件版本受支持但校验不通过，请还原原始文件后重试。\");\n}","preventionTips":["Avoid using competing patchers that alter the target DLL.","Restore a clean DLL of the supported version before retrying.","Filter by ErrorCode 'maybe_modified' to guide the user toward a clean restore."],"tags":["app-modifier","business-exception","modified-file"],"backgroundTag":null,"analyzedSha":"89cbbb3f0cc896d5d092de0199a635c5c39944b6","analyzedAt":"2026-08-13T10:37:37.073Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}