Last active
August 7, 2020 03:38
-
-
Save TAbdiukov/a6b2297f25131d2fe43ebf34c69cee88 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!python3 | |
import re | |
import sys | |
try: | |
fn = sys.argv[1] | |
except IndexError: | |
fn = "MYOB Premier v7.msi" | |
fp = open(fn, "rb") | |
bs = fp.read() | |
fp.close() | |
r = re.compile(b'Operating System = (.*?)[\x00-\x10]') | |
matches = r.findall(bs) | |
print("OSs supported: ") | |
matches_in_str = [buf.decode('ascii') for buf in matches] | |
matches_in_str = sorted(matches_in_str) | |
[print(s, sep='\n') for s in matches_in_str] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment