Created
January 13, 2021 22:32
-
-
Save jaredpar/3b07653bfbc7633f987d45f6d366f575 to your computer and use it in GitHub Desktop.
Program to check if files were compiled with the determinism flag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection.PortableExecutable; | |
foreach (var filePath in args) | |
{ | |
using var stream = File.OpenRead(filePath); | |
var peReader = new PEReader(stream); | |
var any = peReader.ReadDebugDirectory().Any(x => x.Type == DebugDirectoryEntryType.Reproducible); | |
var not = any ? "" :"not "; | |
Console.WriteLine($"{filePath} is {not}reproducible"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment