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

Method test_decryptCredential

tests/misc/test_dpapi.py:217–224  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

215 self.assertEqual(decryptedKey, self.adminMasterKey)
216
217 def test_decryptCredential(self):
218 credFile = CredentialFile(self.credentialFile)
219 credFile.dump()
220 blob = DPAPI_BLOB(credFile['Data'])
221 decrypted = blob.decrypt(self.adminMasterKey)
222 creds = CREDENTIAL_BLOB(decrypted)
223 creds.dump()
224 self.assertEqual(creds['Username'], self.username.encode('utf-16le'))
225
226 @pytest.mark.skipif(os.name != "nt", reason="Only Windows")
227 def test_dumpBlobProtectAPI(self):

Callers

nothing calls this directly

Calls 7

decryptMethod · 0.95
dumpMethod · 0.95
CredentialFileClass · 0.90
DPAPI_BLOBClass · 0.90
CREDENTIAL_BLOBClass · 0.90
encodeMethod · 0.80
dumpMethod · 0.45

Tested by

no test coverage detected