code: def get_ntlmv2_response(domain, user, password, server_challenge, client_challenge, timestamp, target_info):
          
          lo_response_version = b'\x01'
          hi_response_version = b'\x01'
          reserved_dword = b'\x00' * 4
          reserved_bytes = b'\x00' * 6
  
          response_key = PasswordAuthentication.ntowfv2(domain, user, password)
          proof_material = lo_response_version
          proof_material += hi_response_version
          proof_material += reserved_bytes
          proof_material += timestamp
          proof_material += client_challenge
          proof_material += reserved_dword
          proof_material += target_info.get_data()
          proof_material += reserved_dword
          proof = PasswordAuthentication._compute_response(response_key, server_challenge, proof_material)
  
          # The master session key derivation
          session_key = hmac.HMAC(response_key, hashes.MD5(), backend=default_backend())
          session_key.update(proof)
          session_master_key = session_key.finalize()
          return proof + proof_material, session_master_key, target_info
docs: [MS-NLMP] v20140502 NT LAN Manager (NTLM) Authentication Protocol
          3.3.2 NTLM v2 Authentication
  
          Computes an appropriate NTLMv2 response. The algorithm is based on jCIFS and the ComputeResponse()
          implementation the protocol documentation.
          Note: The MS ComputeResponse() implementation refers to a variable called ServerName, this is for
          historical reasons and is misleading. ServerName refers to the bytes that compose the AV_PAIRS
          structure called target_info. The reserved constants below are defined in the documentation
  
          :param response_key: The return value from NTOWF()
          :param server_challenge: The 8-byte challenge message generated by the server
          :param client_challenge: The 8-byte challenge message generated by the client
          :param timestamp: The 8-byte little-endian time in GMT
          :param target_info: The AttributeValuePairs structure to be returned to the server
          :return: NTLMv2 Response