MCPcopy Create free account
hub / github.com/fortra/impacket / set_credentials

Method set_credentials

impacket/http.py:71–92  ·  view source on GitHub ↗
(self, username, password, domain='', lmhash='', nthash='', aesKey='', TGT=None, TGS=None)

Source from the content-addressed store, hash-verified

69 return self.__ntlmssp_info
70
71 def set_credentials(self, username, password, domain='', lmhash='', nthash='', aesKey='', TGT=None, TGS=None):
72 self.__username = username
73 self.__password = password
74 self.__domain = domain
75
76 if lmhash != '' or nthash != '':
77 if len(lmhash) % 2:
78 lmhash = '0%s' % lmhash
79 if len(nthash) % 2:
80 nthash = '0%s' % nthash
81
82 try: # just in case they were converted already
83 self.__lmhash = binascii.unhexlify(lmhash)
84 self.__nthash = binascii.unhexlify(nthash)
85 except:
86 self.__lmhash = lmhash
87 self.__nthash = nthash
88 pass
89
90 self.__aesKey = aesKey
91 self.__TGT = TGT
92 self.__TGS = TGS
93
94 def parse_www_authenticate(self, header):
95 ret = []

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected