def parse_ntlm_chal(msg2, ack):
 global challenge_acks
 Signature = msg2[0:8]
 try:
  msg_type = struct.unpack('<I', msg2[8:12])[0]
 except Exception:
  return
 assert (msg_type == 2)
 ServerChallenge = msg2[24:32].encode('hex')
 if (len(challenge_acks) > 50):
  challenge_acks.popitem(last=False)
 challenge_acks[ack] = ServerChallenge

def parse_ntlm_chal ( msg2 , ack ) : global challenge_acks Signature = msg2 [ 0 : 8 ] try : msg_type = struct . unpack ( '<I' , msg2 [ 8 : 12 ] ) [ 0 ] except Exception : return assert ( msg_type == 2 ) ServerChallenge = msg2 [ 24 : 32 ] . encode ( 'hex' ) if ( len ( challenge_acks ) > 50 ) : challenge_acks . popitem ( last = False ) challenge_acks [ ack ] = ServerChallenge
parse server challenge .