MCPcopy
hub / github.com/DanMcInerney/net-creds / parse_ntlm_chal

Function parse_ntlm_chal

net-creds.py:833–850  ·  view source on GitHub ↗

Parse server challenge

(msg2, ack)

Source from the content-addressed store, hash-verified

831 parse_ntlm_chal(msg2, ack)
832
833def parse_ntlm_chal(msg2, ack):
834 '''
835 Parse server challenge
836 '''
837 global challenge_acks
838
839 Signature = msg2[0:8]
840 try:
841 msg_type = struct.unpack("<I",msg2[8:12])[0]
842 assert(msg_type==2)
843 except Exception:
844 return
845 ServerChallenge = msg2[24:32].encode('hex')
846
847 # Keep the dict of ack:challenge to less than 50 chals
848 if len(challenge_acks) > 50:
849 challenge_acks.popitem(last=False)
850 challenge_acks[ack] = ServerChallenge
851
852def parse_netntlm_resp_msg(headers, resp_header, seq):
853 ''&#x27;

Callers 2

other_parserFunction · 0.85
parse_netntlm_chalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected