@@ -9,12 +9,14 @@ def decoder(byte_string, decode_type):
99 else :
1010 return int .from_bytes (byte_string , "little" )
1111
12- def parse_version (version_bytes ):
12+
13+ def parse_version (version_bytes ):
1314 major_version = version_bytes [0 ]
1415 minor_version = version_bytes [1 ]
1516 product_build = decoder (version_bytes [2 :4 ], "int" )
1617 return f"{ major_version } .{ minor_version } Build { product_build } "
1718
19+
1820def parse_target_info (target_info_bytes ):
1921 MsvAvEOL = 0x0000
2022 MsvAvNbComputerName = 0x0001
@@ -38,9 +40,9 @@ def parse_target_info(target_info_bytes):
3840 av_id = decoder (target_info_bytes [info_offset :info_offset + 2 ], "int" )
3941 av_len = decoder (target_info_bytes [info_offset + 2 :info_offset + 4 ], "int" )
4042 av_value = target_info_bytes [info_offset + 4 :info_offset + 4 + av_len ]
41-
43+
4244 info_offset = info_offset + 4 + av_len
43-
45+
4446 if av_id == MsvAvEOL :
4547 pass
4648 elif av_id == MsvAvNbComputerName :
@@ -68,6 +70,7 @@ def parse_target_info(target_info_bytes):
6870 target_info ["MsvAvChannelBindings" ] = av_value
6971 return target_info
7072
73+
7174def parse_challenge (challenge_message ):
7275 # TargetNameFields
7376 target_name_fields = challenge_message [12 :20 ]
@@ -97,4 +100,4 @@ def parse_challenge(challenge_message):
97100 "target_name" : target_name ,
98101 "version" : version ,
99102 "target_info" : target_info
100- }
103+ }
0 commit comments