mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-10-01 19:22:10 +00:00
Better split matching code, fix UPX name
This commit is contained in:
@@ -22,7 +22,7 @@ namespace BurnOutSharp.PackerType
|
||||
}, "Caphyon Advanced Installer"),
|
||||
};
|
||||
|
||||
return Utilities.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
return MatchUtil.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace BurnOutSharp.PackerType
|
||||
new Matcher(new byte?[] { 0x41, 0x52, 0x4D, 0x44, 0x45, 0x42, 0x55, 0x47 }, "Armadillo"),
|
||||
};
|
||||
|
||||
return Utilities.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
return MatchUtil.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace BurnOutSharp.PackerType
|
||||
}, end: 200), "CExe"),
|
||||
};
|
||||
|
||||
return Utilities.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
return MatchUtil.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace BurnOutSharp.PackerType
|
||||
}, "EXE Stealth"),
|
||||
};
|
||||
|
||||
return Utilities.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
return MatchUtil.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace BurnOutSharp.PackerType
|
||||
"Inno Setup"),
|
||||
};
|
||||
|
||||
return Utilities.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
return MatchUtil.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace BurnOutSharp.PackerType
|
||||
}, "NSIS"),
|
||||
};
|
||||
|
||||
return Utilities.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
return MatchUtil.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
}
|
||||
|
||||
public static string GetVersion(string file, byte[] fileContent, int index)
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace BurnOutSharp.PackerType
|
||||
}, "PE Compact 2"),
|
||||
};
|
||||
|
||||
return Utilities.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
return MatchUtil.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
}
|
||||
|
||||
public static string GetVersion(string file, byte[] fileContent, int position)
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace BurnOutSharp.PackerType
|
||||
// }, GetVersion, "Setup Factory"),
|
||||
};
|
||||
|
||||
return Utilities.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
return MatchUtil.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace BurnOutSharp.PackerType
|
||||
var matchers = new List<Matcher>
|
||||
{
|
||||
// UPX!
|
||||
new Matcher(new byte?[] { 0x55, 0x50, 0x58, 0x21 }, GetVersion, "Inno Setup"),
|
||||
new Matcher(new byte?[] { 0x55, 0x50, 0x58, 0x21 }, GetVersion, "UPX"),
|
||||
|
||||
// NOS
|
||||
new Matcher(new byte?[] { 0x4E, 0x4F, 0x53, 0x20 }, GetVersion, "UPX (NOS Variant)"),
|
||||
@@ -42,7 +42,7 @@ namespace BurnOutSharp.PackerType
|
||||
),
|
||||
};
|
||||
|
||||
return Utilities.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
return MatchUtil.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
}
|
||||
|
||||
public static string GetVersion(string file, byte[] fileContent, int index)
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace BurnOutSharp.PackerType
|
||||
}, "WinRAR SFX"),
|
||||
};
|
||||
|
||||
return Utilities.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
return MatchUtil.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
}
|
||||
|
||||
public Dictionary<string, List<string>> Scan(Scanner scanner, string file)
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace BurnOutSharp.PackerType
|
||||
new Matcher(new byte?[] { 0x5F, 0x77, 0x69, 0x6E, 0x7A, 0x69, 0x70, 0x5F }, GetVersion, "WinZip SFX"),
|
||||
};
|
||||
|
||||
return Utilities.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
return MatchUtil.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace BurnOutSharp.PackerType
|
||||
new Matcher(new byte?[] { 0x57, 0x69, 0x73, 0x65, 0x4D, 0x61, 0x69, 0x6E }, "Wise Installation Wizard Module"),
|
||||
};
|
||||
|
||||
return Utilities.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
return MatchUtil.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace BurnOutSharp.PackerType
|
||||
}, "dotFuscator"),
|
||||
};
|
||||
|
||||
return Utilities.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
return MatchUtil.GetFirstContentMatch(file, fileContent, matchers, includePosition);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user