def parse_netntlm_chal(headers, chal_header, ack):
 try:
  header_val2 = headers[chal_header]
 except KeyError:
  return
 header_val2 = header_val2.split(' ', 1)
 if ((header_val2[0] == 'NTLM') or (header_val2[0] == 'Negotiate')):
  msg2 = header_val2[1]
  msg2 = base64.decodestring(msg2)
  parse_ntlm_chal(ack, msg2)

def parse_netntlm_chal ( headers , chal_header , ack ) : try : header_val2 = headers [ chal_header ] except KeyError : return header_val2 = header_val2 . split ( ' ' , 1 ) if ( ( header_val2 [ 0 ] == 'NTLM' ) or ( header_val2 [ 0 ] == 'Negotiate' ) ) : msg2 = header_val2 [ 1 ] msg2 = base64 . decodestring ( msg2 ) parse_ntlm_chal ( ack , msg2 )
parse the netntlm server challenge URL .