|
9 | 9 | import logging |
10 | 10 | from minidump.common_structs import * |
11 | 11 |
|
| 12 | +MINIDUMP_WIN_BUILDNO_TO_VERSION = { |
| 13 | + 103: 'Windows 3.1', |
| 14 | + 102: 'Windows 3.1 - Sparta', |
| 15 | + 528: 'Windiws NT 3.1', |
| 16 | + 300: 'Windows NT 3.11 - Snowball', |
| 17 | + 153: 'Windows 3.2', |
| 18 | + 807: 'Windows NT 3.5', |
| 19 | + 1057: 'Windows NT 3.51', |
| 20 | + 1381: 'Windows NT 4.0', |
| 21 | + 950: 'Windows 95', |
| 22 | + 1998 : 'Windows 98', |
| 23 | + 2222: 'Windows 98 SE', |
| 24 | + 2195: 'Windows 2000', |
| 25 | + 3000: 'Windows ME', |
| 26 | + 2600: 'Windows XP', |
| 27 | + 2700: 'Windows XP - Media Center Edition 2005', |
| 28 | + 2710: 'Windows XP - Media Center Edition 2005 Update Rollup 2', |
| 29 | + 3790: 'Windows XP x64 / Server 2003 / Server 2003 R2', |
| 30 | + 6002: 'Windows Vista / Server 2008', |
| 31 | + 7601: 'Windows 7 / Server 2008 R2', |
| 32 | + 9200: 'Windows 8 / Server 2012', |
| 33 | + 9600: 'Windows 8.1 / Server 2012 R2', |
| 34 | + 10240: 'Windows 10 - 1507', |
| 35 | + 10586: 'Windows 10 - 1511', |
| 36 | + 14393: 'Windows 10 - 1607 / Server 2016', |
| 37 | + 15063: 'Windows 10 - 1703', |
| 38 | + 16299: 'Windows 10 - 1709 / Server 2016', |
| 39 | + 17134: 'Windows 10 - 1803 / Server 2016', |
| 40 | + 17763: 'Windows 10 - 1809 / Server 2019', |
| 41 | + 18362: 'Windows 10 - 1903 / Server 2019', |
| 42 | + 18363: 'Windows 10 - 1909 / Server 2019', |
| 43 | + 19041: 'Windows 10 - 2004 / Server 2019', |
| 44 | + 19042: 'Windows 10 - 20H2 / Server 2019', |
| 45 | + 19043: 'Windows 10 - 21H1', |
| 46 | + 19044: 'Windows 10 - 21H2', |
| 47 | + 19045: 'Windows 10 - 22H2', |
| 48 | + 22000: 'Windows 11 - 21H2', |
| 49 | + 20348: 'Windows Server 2022', |
| 50 | + 22621: 'Windows 11 - 22H2', |
| 51 | +} |
| 52 | + |
| 53 | + |
12 | 54 | # https://msdn.microsoft.com/en-us/library/windows/desktop/ms680396(v=vs.85).aspx |
13 | 55 | class PROCESSOR_ARCHITECTURE(enum.Enum): |
14 | 56 | AMD64 = 9 #x64 (AMD or Intel) |
@@ -191,7 +233,9 @@ def __init__(self): |
191 | 233 | self.OperatingSystem = None |
192 | 234 |
|
193 | 235 | def guess_os(self): |
194 | | - if self.MajorVersion == 10 and self.MinorVersion == 0 and self.ProductType == PRODUCT_TYPE.VER_NT_WORKSTATION: |
| 236 | + if self.BuildNumber in MINIDUMP_WIN_BUILDNO_TO_VERSION: |
| 237 | + self.OperatingSystem = MINIDUMP_WIN_BUILDNO_TO_VERSION[self.BuildNumber] |
| 238 | + elif self.MajorVersion == 10 and self.MinorVersion == 0 and self.ProductType == PRODUCT_TYPE.VER_NT_WORKSTATION: |
195 | 239 | self.OperatingSystem = "Windows 10" |
196 | 240 | elif self.MajorVersion == 10 and self.MinorVersion == 0 and self.ProductType != self.ProductType.VER_NT_WORKSTATION: |
197 | 241 | self.OperatingSystem = "Windows Server 2016 Technical Preview" |
|
0 commit comments