blob: aaf53f8a89f2ffe7533cf619b596cc524446bb2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Code based from these two awesome projects:
- DPAPICK : https://bitbucket.org/jmichel/dpapick
- DPAPILAB : https://github.com/dfirfpi/dpapilab
"""
from .eater import DataStruct
class CredSystem(DataStruct):
"""
This represents the DPAPI_SYSTEM token which is stored as an LSA secret.
Sets 2 properties:
self.machine
self.user
"""
def __init__(self, raw=None):
self.revision = None
self.machine = None
self.user = None
DataStruct.__init__(self, raw)
def parse(self, data):
"""Parses the given data. May raise exceptions if incorrect data are
given. You should not call this function yourself; DataStruct does
data is a DataStruct object.
Returns nothing.
"""
self.revision = data.eat("L")
self.machine = data.eat("20s")
self.user = data.eat("20s")
|