MCPcopy
hub / github.com/fortra/impacket / setUp

Method setUp

tests/SMB_RPC/test_ntlm.py:22–40  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

20class NTLMTests(unittest.TestCase):
21
22 def setUp(self):
23 # Turn test case mode on
24 ntlm.TEST_CASE = True
25 self.user = "User"
26 self.domain = "Domain"
27 self.password = "Password"
28 self.serverName = "Server"
29 self.workstationName = "COMPUTER"
30 self.randomSessionKey = b("U"*16)
31 self.time = b('\x00'*8)
32 self.clientChallenge = b("\xaa"*8)
33 self.serverChallenge = b("\x01\x23\x45\x67\x89\xab\xcd\xef")
34 self.flags = ntlm.NTLMSSP_NEGOTIATE_KEY_EXCH | ntlm.NTLMSSP_NEGOTIATE_56 | ntlm.NTLMSSP_NEGOTIATE_128 | ntlm.NTLMSSP_NEGOTIATE_VERSION | ntlm.NTLMSSP_TARGET_TYPE_SERVER | ntlm.NTLMSSP_NEGOTIATE_ALWAYS_SIGN | ntlm.NTLMSSP_NEGOTIATE_NTLM | ntlm.NTLMSSP_NEGOTIATE_SEAL | ntlm.NTLMSSP_NEGOTIATE_SIGN | ntlm.NTLM_NEGOTIATE_OEM | ntlm.NTLMSSP_NEGOTIATE_UNICODE
35 self.seqNum = 0
36 self.nonce = b('\x00'*16)
37 self.plaintext = 'Plaintext'.encode('utf-16le')
38
39 print("Flags")
40 hexdump(struct.pack('<L',self.flags))
41
42 def test_ntlmv1(self):
43 print("####### 4.2.2 NTLMv1 Authentication")

Callers

nothing calls this directly

Calls 3

hexdumpFunction · 0.90
encodeMethod · 0.80
packMethod · 0.45

Tested by

no test coverage detected