Say which signatures failed if a patch is not found

This commit is contained in:
beerpsi 2024-04-11 16:12:39 +07:00
parent 7d4951e529
commit 8f3258e39d
2 changed files with 5 additions and 2 deletions

View File

@ -40,10 +40,11 @@ foreach (var patch in patches)
.Zip(scanner.FindPatternsCached(signatures)!)
.GroupBy(p => p.First)
.ToDictionary(g => g.Key, g => g.First().Second);
var nonMatches = matches.Where(p => !p.Value.Found).ToList();
if (matches.Any(p => !p.Value.Found))
if (nonMatches.Count > 0)
{
Console.WriteLine($"No offset found for patch {patch.Name}");
Console.WriteLine($"No offset found for patch {patch.Name}, signatures {string.Join(",", nonMatches.Select(p => p.Key))}");
continue;
}

View File

@ -4,6 +4,8 @@ A shittily written patch finder hacked together with
Originally written for CHUNITHM, hence the name, but can be used
with pretty much anything as long as you have the signatures.
Does not do any patch validation for now.
## Usage
```sh
./CHUNITHM-Patch-Finder <PATH TO EXE>