summaryrefslogtreecommitdiff
path: root/foreign/client_handling/lazagne/config/DPAPI/system.py
diff options
context:
space:
mode:
Diffstat (limited to 'foreign/client_handling/lazagne/config/DPAPI/system.py')
-rw-r--r--foreign/client_handling/lazagne/config/DPAPI/system.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/foreign/client_handling/lazagne/config/DPAPI/system.py b/foreign/client_handling/lazagne/config/DPAPI/system.py
new file mode 100644
index 0000000..aaf53f8
--- /dev/null
+++ b/foreign/client_handling/lazagne/config/DPAPI/system.py
@@ -0,0 +1,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")