Rename position flag -> debug flag

This commit is contained in:
Matt Nadareski
2021-08-24 15:19:23 -07:00
parent a2a0e5c2ee
commit 43845cf722
62 changed files with 136 additions and 137 deletions

View File

@@ -6,7 +6,7 @@ namespace BurnOutSharp.ProtectionType
public class ActiveMARK : IContentCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -22,7 +22,7 @@ namespace BurnOutSharp.ProtectionType
}, "ActiveMARK 5"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
}
}

View File

@@ -6,7 +6,7 @@ namespace BurnOutSharp.ProtectionType
public class AlphaROM : IContentCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -14,7 +14,7 @@ namespace BurnOutSharp.ProtectionType
new ContentMatchSet(new byte?[] { 0x53, 0x45, 0x54, 0x54, 0x45, 0x43 }, "Alpha-ROM"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
}
}

View File

@@ -13,7 +13,7 @@ namespace BurnOutSharp.ProtectionType
public class Bitpool : IContentCheck, IPathCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -26,7 +26,7 @@ namespace BurnOutSharp.ProtectionType
}, "Bitpool"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
/// <inheritdoc/>

View File

@@ -6,7 +6,7 @@ namespace BurnOutSharp.ProtectionType
public class CDCheck : IContentCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -21,11 +21,11 @@ namespace BurnOutSharp.ProtectionType
new ContentMatchSet(new byte?[] { 0x43, 0x44, 0x43, 0x68, 0x65, 0x63, 0x6B }, "Executable-Based CD Check"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
// These content checks are too broad to be useful
private static string CheckContentsBroad(string file, byte[] fileContent, bool includePosition = false)
private static string CheckContentsBroad(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -45,7 +45,7 @@ namespace BurnOutSharp.ProtectionType
}, "Executable-Based CD Check"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
}
}

View File

@@ -9,7 +9,7 @@ namespace BurnOutSharp.ProtectionType
public class CDCops : IContentCheck, IPathCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -24,7 +24,7 @@ namespace BurnOutSharp.ProtectionType
new ContentMatchSet(new byte?[] { 0x2E, 0x67, 0x72, 0x61, 0x6E, 0x64, 0x00 }, "CD-Cops"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
/// <inheritdoc/>

View File

@@ -6,7 +6,7 @@ namespace BurnOutSharp.ProtectionType
public class CDKey : IContentCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -21,7 +21,7 @@ namespace BurnOutSharp.ProtectionType
}, Utilities.GetFileVersion, "CD-Key / Serial"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
}
}

View File

@@ -7,7 +7,7 @@ namespace BurnOutSharp.ProtectionType
public class CDLock : IContentCheck, IPathCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -21,7 +21,7 @@ namespace BurnOutSharp.ProtectionType
}, "CD-Lock"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
/// <inheritdoc/>

View File

@@ -6,7 +6,7 @@ namespace BurnOutSharp.ProtectionType
public class CDSHiELDSE : IContentCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -14,7 +14,7 @@ namespace BurnOutSharp.ProtectionType
new ContentMatchSet(new byte?[] { 0x7E, 0x30, 0x30, 0x31, 0x37, 0x2E, 0x74, 0x6D, 0x70 }, "CDSHiELD SE"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
}
}

View File

@@ -11,7 +11,7 @@ namespace BurnOutSharp.ProtectionType
public class CactusDataShield : IContentCheck, IPathCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -25,7 +25,7 @@ namespace BurnOutSharp.ProtectionType
new ContentMatchSet(new byte?[] { 0x43, 0x44, 0x53, 0x50, 0x6C, 0x61, 0x79, 0x65, 0x72 }, "Cactus Data Shield 200"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
/// <inheritdoc/>

View File

@@ -6,7 +6,7 @@ namespace BurnOutSharp.ProtectionType
public class CengaProtectDVD : IContentCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -14,7 +14,7 @@ namespace BurnOutSharp.ProtectionType
new ContentMatchSet(new byte?[] { 0x2E, 0x63, 0x65, 0x6E, 0x65, 0x67, 0x61 }, "Cenega ProtectDVD"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
}
}

View File

@@ -6,7 +6,7 @@ namespace BurnOutSharp.ProtectionType
public class CodeLock : IContentCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
// TODO: Verify if these are OR or AND
var matchers = new List<ContentMatchSet>
@@ -25,7 +25,7 @@ namespace BurnOutSharp.ProtectionType
}, "Code Lock"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
}
}

View File

@@ -7,7 +7,7 @@ namespace BurnOutSharp.ProtectionType
public class CopyKiller : IContentCheck, IPathCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -19,7 +19,7 @@ namespace BurnOutSharp.ProtectionType
}, "CopyKiller"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
/// <inheritdoc/>

View File

@@ -8,7 +8,7 @@ namespace BurnOutSharp.ProtectionType
public class DVDCops : IContentCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -20,7 +20,7 @@ namespace BurnOutSharp.ProtectionType
}, GetVersion, "DVD-Cops"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
public static string GetVersion(string file, byte[] fileContent, List<int> positions)

View File

@@ -10,7 +10,7 @@ namespace BurnOutSharp.ProtectionType
// - Reference to `EASTL` and `EAStdC` are standard for EA products and does not indicate Cucko by itself
// - There's little information outside of PiD detection that actually knows about Cucko
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -96,7 +96,7 @@ namespace BurnOutSharp.ProtectionType
}, "EA DRM Protection"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
}
}

View File

@@ -7,7 +7,7 @@ namespace BurnOutSharp.ProtectionType
public class GFWL : IContentCheck, IPathCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -44,7 +44,7 @@ namespace BurnOutSharp.ProtectionType
}, Utilities.GetFileVersion, "Games for Windows LIVE"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
/// <inheritdoc/>

View File

@@ -7,7 +7,7 @@ namespace BurnOutSharp.ProtectionType
public class ImpulseReactor : IContentCheck, IPathCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -42,7 +42,7 @@ namespace BurnOutSharp.ProtectionType
}, "Impulse Reactor"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
/// <inheritdoc/>

View File

@@ -22,7 +22,7 @@ namespace BurnOutSharp.ProtectionType
*/
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -30,7 +30,7 @@ namespace BurnOutSharp.ProtectionType
new ContentMatchSet(new byte?[] { 0x54, 0x72, 0x69, 0x61, 0x6C, 0x00, 0x50 }, "INTENIUM Trial & Buy Protection"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
}
}

View File

@@ -8,7 +8,7 @@ namespace BurnOutSharp.ProtectionType
public class JoWooDXProt : IContentCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -34,7 +34,7 @@ namespace BurnOutSharp.ProtectionType
new ContentMatchSet(new byte?[] { 0x2E, 0x65, 0x78, 0x74, 0x20, 0x20, 0x20, 0x20 }, "JoWooD X-Prot v1"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
public static string GetVersion(string file, byte[] fileContent, List<int> positions)

View File

@@ -6,7 +6,7 @@ namespace BurnOutSharp.ProtectionType
public class KeyLock : IContentCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -18,7 +18,7 @@ namespace BurnOutSharp.ProtectionType
}, "Key-Lock (Dongle)"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
}
}

View File

@@ -11,7 +11,7 @@ namespace BurnOutSharp.ProtectionType
public class LaserLock : IContentCheck, IPathCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
// "Packed by SPEEnc V2 Asterios Parlamentas.PE"
byte?[] check = new byte?[] { 0x50, 0x61, 0x63, 0x6B, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x53, 0x50, 0x45, 0x45, 0x6E, 0x63, 0x20, 0x56, 0x32, 0x20, 0x41, 0x73, 0x74, 0x65, 0x72, 0x69, 0x6F, 0x73, 0x20, 0x50, 0x61, 0x72, 0x6C, 0x61, 0x6D, 0x65, 0x6E, 0x74, 0x61, 0x73, 0x2E, 0x50, 0x45 };
@@ -22,14 +22,14 @@ namespace BurnOutSharp.ProtectionType
bool containsCheck2 = fileContent.FirstPosition(check2, out int position2);
if (containsCheck && containsCheck2)
return $"LaserLock {GetVersion(fileContent, position2)} {GetBuild(fileContent, true)}" + (includePosition ? $" (Index {position}, {position2})" : string.Empty);
return $"LaserLock {GetVersion(fileContent, position2)} {GetBuild(fileContent, true)}" + (includeDebug ? $" (Index {position}, {position2})" : string.Empty);
else if (containsCheck && !containsCheck2)
return $"LaserLock Marathon {GetBuild(fileContent, false)}" + (includePosition ? $" (Index {position})" : string.Empty);
return $"LaserLock Marathon {GetBuild(fileContent, false)}" + (includeDebug ? $" (Index {position})" : string.Empty);
else if (!containsCheck && containsCheck2)
return $"LaserLock {GetVersion(fileContent, --position2)} {GetBuild(fileContent, false)}" + (includePosition ? $" (Index {position2})" : string.Empty);
return $"LaserLock {GetVersion(fileContent, --position2)} {GetBuild(fileContent, false)}" + (includeDebug ? $" (Index {position2})" : string.Empty);
if (file != null && string.Equals(Path.GetFileName(file), "NOMOUSE.SP", StringComparison.OrdinalIgnoreCase))
return $"LaserLock {GetVersion16Bit(fileContent)}" + (includePosition ? $" (Index 71)" : string.Empty);
return $"LaserLock {GetVersion16Bit(fileContent)}" + (includeDebug ? $" (Index 71)" : string.Empty);
var matchers = new List<ContentMatchSet>
{
@@ -59,7 +59,7 @@ namespace BurnOutSharp.ProtectionType
}, "LaserLock 5"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
/// <inheritdoc/>

View File

@@ -7,7 +7,7 @@ namespace BurnOutSharp.ProtectionType
public class MediaMaxCD3 : IContentCheck, IPathCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -22,7 +22,7 @@ namespace BurnOutSharp.ProtectionType
}, "MediaMax CD-3"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
/// <inheritdoc/>

View File

@@ -6,7 +6,7 @@ namespace BurnOutSharp.ProtectionType
public class OnlineRegistration : IContentCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -21,7 +21,7 @@ namespace BurnOutSharp.ProtectionType
}, Utilities.GetFileVersion, "Executable-Based Online Registration"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
}
}

View File

@@ -7,7 +7,7 @@ namespace BurnOutSharp.ProtectionType
public class Origin : IContentCheck, IPathCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -15,7 +15,7 @@ namespace BurnOutSharp.ProtectionType
new ContentMatchSet(new byte?[] { 0x4F, 0x00, 0x72, 0x00, 0x69, 0x00, 0x67, 0x00, 0x69, 0x00, 0x6E, 0x00, 0x53, 0x00, 0x65, 0x00, 0x74, 0x00, 0x75, 0x00, 0x70, 0x00, 0x2E, 0x00, 0x65, 0x00, 0x78, 0x00, 0x65, 0x00 }, "Origin"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
/// <inheritdoc/>

View File

@@ -8,7 +8,7 @@ namespace BurnOutSharp.ProtectionType
// TODO: Figure out PSX binary header so this can be checked explicitly
// TODO: Detect Red Hand protection
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -42,7 +42,7 @@ namespace BurnOutSharp.ProtectionType
}, "PlayStation Anti-modchip (Japanese)"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
}
}

View File

@@ -11,7 +11,7 @@ namespace BurnOutSharp.ProtectionType
public class ProtectDisc : IContentCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -22,7 +22,7 @@ namespace BurnOutSharp.ProtectionType
new ContentMatchSet(new byte?[] { 0x41, 0x43, 0x45, 0x2D, 0x50, 0x43, 0x44 }, GetVersion6till8, "ProtectDisc"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
public static string GetVersion6till8(string file, byte[] fileContent, List<int> positions)

View File

@@ -6,7 +6,7 @@ namespace BurnOutSharp.ProtectionType
public class RingPROTECH : IContentCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -18,7 +18,7 @@ namespace BurnOutSharp.ProtectionType
}, "Ring PROTECH [Check disc for physical ring]"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
}
}

View File

@@ -6,7 +6,7 @@ namespace BurnOutSharp.ProtectionType
public class SVKProtector : IContentCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -14,7 +14,7 @@ namespace BurnOutSharp.ProtectionType
new ContentMatchSet(new byte?[] { 0x3F, 0x53, 0x56, 0x4B, 0x50, 0x00, 0x00 }, "SVK Protector"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
}
}

View File

@@ -39,7 +39,7 @@ namespace BurnOutSharp.ProtectionType
};
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -81,7 +81,7 @@ namespace BurnOutSharp.ProtectionType
new ContentMatchSet(new byte?[] { 0x73, 0x74, 0x78, 0x74, 0x33, 0x37, 0x31 }, Get320to4xVersion, "SafeDisc"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
/// <inheritdoc/>

View File

@@ -7,7 +7,7 @@ namespace BurnOutSharp.ProtectionType
public class SafeLock : IContentCheck, IPathCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -15,7 +15,7 @@ namespace BurnOutSharp.ProtectionType
new ContentMatchSet(new byte?[] { 0x53, 0x61, 0x66, 0x65, 0x4C, 0x6F, 0x63, 0x6B }, "SafeLock"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
/// <inheritdoc/>

View File

@@ -9,7 +9,7 @@ namespace BurnOutSharp.ProtectionType
public class SecuROM : IContentCheck, IPathCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -53,7 +53,7 @@ namespace BurnOutSharp.ProtectionType
new ContentMatchSet(new byte?[] { 0x2E, 0x63, 0x6D, 0x73, 0x5F, 0x64, 0x00 }, "SecuROM 1-3"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
/// <inheritdoc/>

View File

@@ -8,7 +8,7 @@ namespace BurnOutSharp.ProtectionType
public class SmartE : IContentCheck, IPathCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -16,7 +16,7 @@ namespace BurnOutSharp.ProtectionType
new ContentMatchSet(new byte?[] { 0x42, 0x49, 0x54, 0x41, 0x52, 0x54, 0x53 }, "SmartE"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
/// <inheritdoc/>

View File

@@ -20,7 +20,7 @@ namespace BurnOutSharp.ProtectionType
};
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -90,7 +90,7 @@ namespace BurnOutSharp.ProtectionType
}, "SolidShield"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
/// <inheritdoc/>

View File

@@ -8,7 +8,7 @@ namespace BurnOutSharp.ProtectionType
public class StarForce : IContentCheck, IPathCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -114,7 +114,7 @@ namespace BurnOutSharp.ProtectionType
}, "StarForce 5"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
/// <inheritdoc/>

View File

@@ -6,7 +6,7 @@ namespace BurnOutSharp.ProtectionType
public class Sysiphus : IContentCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -25,7 +25,7 @@ namespace BurnOutSharp.ProtectionType
}, GetVersion, "Sysiphus"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
public static string GetVersion(string file, byte[] fileContent, List<int> positions)

View File

@@ -11,7 +11,7 @@ namespace BurnOutSharp.ProtectionType
public class Tages : IContentCheck, IPathCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -36,7 +36,7 @@ namespace BurnOutSharp.ProtectionType
new ContentMatchSet(new byte?[] { 0xE8, 0x75, 0x00, 0x00, 0x00, 0xE8 }, GetVersion, "TAGES"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
/// <inheritdoc/>

View File

@@ -6,7 +6,7 @@ namespace BurnOutSharp.ProtectionType
public class ThreePLock : IContentCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -28,7 +28,7 @@ namespace BurnOutSharp.ProtectionType
// }, "3PLock"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
}
}

View File

@@ -6,7 +6,7 @@ namespace BurnOutSharp.ProtectionType
public class ThreeTwoOneStudios : IContentCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -22,7 +22,7 @@ namespace BurnOutSharp.ProtectionType
}, "321Studios Online Activation"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
}
}

View File

@@ -12,7 +12,7 @@ namespace BurnOutSharp.ProtectionType
public class VOBProtectCDDVD : IContentCheck, IPathCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -30,7 +30,7 @@ namespace BurnOutSharp.ProtectionType
new ContentMatchSet(new byte?[] { 0x2E, 0x76, 0x6F, 0x62, 0x2E, 0x70, 0x63, 0x64 }, "VOB ProtectCD"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
/// <inheritdoc/>

View File

@@ -7,7 +7,7 @@ namespace BurnOutSharp.ProtectionType
public class WTMCDProtect : IContentCheck, IPathCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -35,7 +35,7 @@ namespace BurnOutSharp.ProtectionType
}, "WTM Protection Viewer"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
/// <inheritdoc/>

View File

@@ -12,7 +12,7 @@ namespace BurnOutSharp.ProtectionType
public class XCP : IContentCheck, IPathCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -43,7 +43,7 @@ namespace BurnOutSharp.ProtectionType
}, "XCP"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
/// <inheritdoc/>

View File

@@ -6,7 +6,7 @@ namespace BurnOutSharp.ProtectionType
public class XtremeProtector : IContentCheck
{
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = new List<ContentMatchSet>
{
@@ -14,7 +14,7 @@ namespace BurnOutSharp.ProtectionType
new ContentMatchSet(new byte?[] { 0x58, 0x50, 0x52, 0x4F, 0x54, 0x20, 0x20, 0x20 }, "Xtreme-Protector"),
};
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
}
}