diff --git a/suite/patch_major_os_version.py b/suite/patch_major_os_version.py new file mode 100755 index 0000000000..c75ab41cf5 --- /dev/null +++ b/suite/patch_major_os_version.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python +# By Nguyen Anh Quynh + +import sys, struct + +if len(sys.argv) < 2: + print("Usage: %s " % sys.argv[0]) + sys.exit(0) + +pe_file_path = sys.argv[1] + +with open(pe_file_path, "rb") as f: + b = f.read() + +if not b.startswith("MZ"): + print("Not a PE file") + sys.exit(0) + +e_lfanew = struct.unpack_from("