Skip to content

Commit 9f0ac2c

Browse files
committed
Added fallback if build version is not available (yet)
1 parent 1d1c03b commit 9f0ac2c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

nxc/helpers/ntlm_parser.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@ def decoder(byte_string, decode_type):
1313

1414

1515
def parse_version(version_bytes):
16+
major_version = version_bytes[0]
17+
minor_version = version_bytes[1]
1618
product_build = decoder(version_bytes[2:4], "int")
17-
return f"{WIN_VERSIONS[product_build]} Build {product_build}"
19+
if product_build in WIN_VERSIONS:
20+
return f"{WIN_VERSIONS[product_build]} Build {product_build}"
21+
else:
22+
return f"Windows {major_version}.{minor_version} Build {product_build}"
1823

1924

2025
def parse_target_info(target_info_bytes):
@@ -93,7 +98,6 @@ def parse_challenge(challenge_message):
9398

9499
# TargetInfo
95100
target_info_bytes = challenge_message[target_info_offset:target_info_offset + target_info_len]
96-
97101
target_info = parse_target_info(target_info_bytes)
98102

99103
return {

0 commit comments

Comments
 (0)