Skip to content

Commit

Permalink
fix vault for py3 (thanks to @byehack)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessandroZ committed Mar 3, 2020
1 parent e48f382 commit 02378ce
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Windows/lazagne/config/DPAPI/vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ def __init__(self, raw=None):

def parse(self, data):
self.version = data.eat("L")
self.guid = "%0x-%0x-%0x-%0x%0x-%0x%0x%0x%0x%0x%0x" % data.eat("L2H8B") # data.eat("16s")
self.guid = b"%0x-%0x-%0x-%0x%0x-%0x%0x%0x%0x%0x%0x" % data.eat("L2H8B") # data.eat("16s")
self.description = data.eat_length_and_string("L").replace(b"\x00", b"") # Unicode
self.unknown1 = data.eat("L")
self.unknown2 = data.eat("L")
self.unknown3 = data.eat("L")
# VPOL_STORE
self.size = data.eat("L")
self.unknown4 = "%0x-%0x-%0x-%0x%0x-%0x%0x%0x%0x%0x%0x" % data.eat("L2H8B") # data.eat("16s")
self.unknown5 = "%0x-%0x-%0x-%0x%0x-%0x%0x%0x%0x%0x%0x" % data.eat("L2H8B") # data.eat("16s")
self.unknown4 = b"%0x-%0x-%0x-%0x%0x-%0x%0x%0x%0x%0x%0x" % data.eat("L2H8B") # data.eat("16s")
self.unknown5 = b"%0x-%0x-%0x-%0x%0x-%0x%0x%0x%0x%0x%0x" % data.eat("L2H8B") # data.eat("16s")
# DPAPI_BLOB_STORE
self.blob_store_size = data.eat("L")
if self.blob_store_size > 0:
Expand Down Expand Up @@ -229,7 +229,7 @@ def __init__(self, raw=None):

def parse(self, data):
self.version = data.eat("L")
self.schema_guid = "%0x-%0x-%0x-%0x%0x-%0x%0x%0x%0x%0x%0x" % data.eat("L2H8B")
self.schema_guid = b"%0x-%0x-%0x-%0x%0x-%0x%0x%0x%0x%0x%0x" % data.eat("L2H8B")
self.vault_vsch_unknown_1 = data.eat("L")
self.count = data.eat("L")
self.schema_name = data.eat_length_and_string("L").replace(b"\x00", b"")
Expand Down Expand Up @@ -389,7 +389,7 @@ def decrypt_vault_attribute(self, vault_attr, key_aes128, key_aes256):
Helper to decrypt VAULT attributes.
"""
if not vault_attr.size:
return '', False
return b'', False

if vault_attr.has_iv:
cipher = AESModeOfOperationCBC(key_aes256, iv=vault_attr.iv)
Expand Down

0 comments on commit 02378ce

Please sign in to comment.