dissect.cim 3.11.dev3__tar.gz → 3.12.dev1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/PKG-INFO +3 -2
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/dissect/cim/cim.py +5 -6
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/dissect/cim/classes.py +12 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/dissect.cim.egg-info/PKG-INFO +3 -2
- dissect_cim-3.12.dev1/tests/test_cim.py +15 -0
- dissect_cim-3.11.dev3/tests/test_cim.py +0 -10
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/.git-blame-ignore-revs +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/.gitattributes +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/COPYRIGHT +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/LICENSE +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/MANIFEST.in +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/README.md +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/dissect/cim/__init__.py +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/dissect/cim/c_cim.py +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/dissect/cim/exceptions.py +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/dissect/cim/index.py +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/dissect/cim/mappings.py +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/dissect/cim/objects.py +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/dissect/cim/utils.py +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/dissect.cim.egg-info/SOURCES.txt +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/dissect.cim.egg-info/dependency_links.txt +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/dissect.cim.egg-info/requires.txt +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/dissect.cim.egg-info/top_level.txt +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/pyproject.toml +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/setup.cfg +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/tests/__init__.py +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/tests/_data/INDEX.BTR.gz +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/tests/_data/MAPPING1.MAP.gz +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/tests/_data/MAPPING2.MAP.gz +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/tests/_data/MAPPING3.MAP.gz +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/tests/_data/OBJECTS.DATA.gz +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/tests/_docs/Makefile +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/tests/_docs/__init__.py +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/tests/_docs/conf.py +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/tests/_docs/index.rst +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/tests/conftest.py +0 -0
- {dissect_cim-3.11.dev3 → dissect_cim-3.12.dev1}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: dissect.cim
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.12.dev1
|
|
4
4
|
Summary: A Dissect module implementing a parser for the Windows Common Information Model (CIM) database, used in the Windows operating system
|
|
5
5
|
Author-email: Dissect Team <dissect@fox-it.com>
|
|
6
6
|
License: Affero General Public License v3
|
|
@@ -27,6 +27,7 @@ Requires-Dist: dissect.util<4,>=3
|
|
|
27
27
|
Provides-Extra: dev
|
|
28
28
|
Requires-Dist: dissect.cstruct<5.0.dev,>=4.0.dev; extra == "dev"
|
|
29
29
|
Requires-Dist: dissect.util<4.0.dev,>=3.0.dev; extra == "dev"
|
|
30
|
+
Dynamic: license-file
|
|
30
31
|
|
|
31
32
|
# dissect.cim
|
|
32
33
|
|
|
@@ -22,6 +22,7 @@ from dissect.cim.classes import (
|
|
|
22
22
|
ClassDefinition,
|
|
23
23
|
ClassDefinitionProperty,
|
|
24
24
|
ClassInstance,
|
|
25
|
+
ClassInstanceProperty,
|
|
25
26
|
InstanceKey,
|
|
26
27
|
PropertyDefaultValues,
|
|
27
28
|
Qualifier,
|
|
@@ -302,12 +303,6 @@ class Instance:
|
|
|
302
303
|
self.class_definition = class_.class_definition
|
|
303
304
|
self.class_instance = class_instance
|
|
304
305
|
|
|
305
|
-
def __getattr__(self, attr: str) -> Any:
|
|
306
|
-
try:
|
|
307
|
-
return getattr(self.class_instance, attr)
|
|
308
|
-
except AttributeError:
|
|
309
|
-
return object.__getattribute__(self, attr)
|
|
310
|
-
|
|
311
306
|
@property
|
|
312
307
|
def key(self) -> InstanceKey:
|
|
313
308
|
return self.class_instance.key
|
|
@@ -328,6 +323,10 @@ class Instance:
|
|
|
328
323
|
def ci(self) -> ClassInstance:
|
|
329
324
|
return self.class_instance
|
|
330
325
|
|
|
326
|
+
@property
|
|
327
|
+
def properties(self) -> dict[str, ClassInstanceProperty]:
|
|
328
|
+
return self.class_instance.properties
|
|
329
|
+
|
|
331
330
|
|
|
332
331
|
class Property:
|
|
333
332
|
def __init__(self, class_: Class, prop: ClassDefinitionProperty):
|
|
@@ -424,6 +424,18 @@ class DataRegion:
|
|
|
424
424
|
if t in (CIM_TYPES.STRING, CIM_TYPES.REFERENCE, CIM_TYPES.DATETIME):
|
|
425
425
|
return self.get_string(value)
|
|
426
426
|
|
|
427
|
+
if t in (
|
|
428
|
+
CIM_TYPES.INT8,
|
|
429
|
+
CIM_TYPES.UINT8,
|
|
430
|
+
CIM_TYPES.INT16,
|
|
431
|
+
CIM_TYPES.UINT16,
|
|
432
|
+
CIM_TYPES.INT32,
|
|
433
|
+
CIM_TYPES.UINT32,
|
|
434
|
+
CIM_TYPES.INT64,
|
|
435
|
+
CIM_TYPES.UINT64,
|
|
436
|
+
):
|
|
437
|
+
return value
|
|
438
|
+
|
|
427
439
|
if t == CIM_TYPES.BOOLEAN:
|
|
428
440
|
return value == BOOLEAN_STATES.TRUE
|
|
429
441
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: dissect.cim
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.12.dev1
|
|
4
4
|
Summary: A Dissect module implementing a parser for the Windows Common Information Model (CIM) database, used in the Windows operating system
|
|
5
5
|
Author-email: Dissect Team <dissect@fox-it.com>
|
|
6
6
|
License: Affero General Public License v3
|
|
@@ -27,6 +27,7 @@ Requires-Dist: dissect.util<4,>=3
|
|
|
27
27
|
Provides-Extra: dev
|
|
28
28
|
Requires-Dist: dissect.cstruct<5.0.dev,>=4.0.dev; extra == "dev"
|
|
29
29
|
Requires-Dist: dissect.util<4.0.dev,>=3.0.dev; extra == "dev"
|
|
30
|
+
Dynamic: license-file
|
|
30
31
|
|
|
31
32
|
# dissect.cim
|
|
32
33
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import BinaryIO
|
|
4
|
+
|
|
5
|
+
from dissect.cim.cim import CIM
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def test_cim(index_bin: BinaryIO, objects_bin: BinaryIO, mappings_bin: list[BinaryIO]) -> None:
|
|
9
|
+
repo = CIM(index_bin, objects_bin, mappings_bin)
|
|
10
|
+
assert repo
|
|
11
|
+
|
|
12
|
+
subscription_ns = repo.root.namespace("subscription")
|
|
13
|
+
binding = next(subscription_ns.class_("__filtertoconsumerbinding").instances)
|
|
14
|
+
consumer = subscription_ns.query(binding.properties["Consumer"].value)
|
|
15
|
+
assert consumer.properties["SourceName"].value == "Service Control Manager"
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from typing import BinaryIO
|
|
4
|
-
|
|
5
|
-
from dissect.cim.cim import CIM
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
def test_cim(index_bin: BinaryIO, objects_bin: BinaryIO, mappings_bin: list[BinaryIO]) -> None:
|
|
9
|
-
repo = CIM(index_bin, objects_bin, mappings_bin)
|
|
10
|
-
assert repo
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|