Skip to content

Commit 0387910

Browse files
authored
Merge pull request #50 from nikaiw/master
Fix leading zero on DPAPI MK GUID
2 parents 9062ba0 + 57fc03e commit 0387910

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pypykatz/commons/win_datatypes.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,11 @@ def __init__(self, reader):
206206
self.Data3 = WORD(reader).value
207207
self.Data4 = reader.read(8)
208208
self.value = '-'.join([
209-
hex(self.Data1)[2:],
210-
hex(self.Data2)[2:],
211-
hex(self.Data3)[2:],
212-
hex(int.from_bytes(self.Data4[:2], byteorder = 'big', signed = False))[2:],
213-
hex(int.from_bytes(self.Data4[2:], byteorder = 'big', signed = False))[2:]
209+
hex(self.Data1)[2:].zfill(8),
210+
hex(self.Data2)[2:].zfill(4),
211+
hex(self.Data3)[2:].zfill(4),
212+
hex(int.from_bytes(self.Data4[:2], byteorder = 'big', signed = False))[2:].zfill(4),
213+
hex(int.from_bytes(self.Data4[2:], byteorder = 'big', signed = False))[2:].zfill(12)
214214
])
215215

216216
class PLIST_ENTRY(POINTER):
@@ -222,4 +222,4 @@ def __init__(self, reader):
222222
self.location = reader.tell()
223223
self.Flink = PLIST_ENTRY(reader)
224224
self.Blink = PLIST_ENTRY(reader)
225-
225+

0 commit comments

Comments
 (0)