huiyadanli/RevokeMsgPatcher · error · BusinessException
maybe_modified
maybe_modified
Error message
程序支持此文件版本: {editor.FileName} - {editor.FileVersion}。但是文件校验不通过,请确认是否使用过其他补丁程序! What it means
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.
Source
Thrown at RevokeMsgPatcher/Modifier/AppModifier.cs:375
replacePatterns = editor.FileCommonModifyInfo.ReplacePatterns.Where(info => categories.Contains(info.Category)).ToList();
}
// 如果能顺利得到 TargetChanges 不报错则可以使用特征替换方式
editor.TargetChanges = ModifyFinder.FindChanges(editor.FilePath, replacePatterns);
continue;
}
else
{
// SHA1不匹配,连版本也不匹配,说明完全不支持
if (matchingVersion == null)
{
throw new BusinessException("not_support", $"不支持的文件:名称 {editor.FileName} 版本 {editor.FileVersion}!");
}
// SHA1不匹配,但是版本匹配,可能dll已经被其他补丁程序修改过
if (matchingVersion != null)
{
throw new BusinessException("maybe_modified", $"程序支持此文件版本: {editor.FileName} - {editor.FileVersion}。但是文件校验不通过,请确认是否使用过其他补丁程序!");
}
}
}
}
}
/// <summary>
/// c.根据补丁信息,安装补丁
/// 两种打补丁的方式:精准(指定位置替换)、通用(特征码替换)
/// </summary>
/// <returns></returns>
public bool Patch()
{
// 首先验证文件修改器是否没问题
if (editors.Count == 0)
{
throw new Exception("补丁安装失败,原因:无对应的文件修改器");
}View on GitHub (pinned to 89cbbb3f0c)
Solutions
- Restore a clean/original DLL of that version (from backup or a fresh install).
- Remove other patchers' changes, then retry.
Defensive patterns
Strategy: try-catch
Type guard
static bool IsBusinessException(Exception e, string code) => e is BusinessException b && b.ErrorCode == code; static bool IsMaybeModified(Exception e) => IsBusinessException(e, "maybe_modified");
Try / catch
try
{
modifier.ValidateAndFindModifyInfo(categories);
}
catch (BusinessException ex) when (ex.ErrorCode == "maybe_modified")
{
MessageBox.Show("文件版本受支持但校验不通过,请还原原始文件后重试。");
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: Used a competing anti-recall/multi-open tool first; the DLL was patched and not restored.
Related errors
AI-assisted analysis of huiyadanli/RevokeMsgPatcher@89cbbb3f0c (2026-08-13).
Data as JSON: /api/errors/7ed796c83a2bfb69.
Report an issue: GitHub.