dissect.target 3.21.dev4__py3-none-any.whl → 3.21.dev6__py3-none-any.whl
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/target/helpers/regutil.py +28 -11
- dissect/target/plugins/os/windows/network.py +7 -4
- {dissect.target-3.21.dev4.dist-info → dissect.target-3.21.dev6.dist-info}/METADATA +1 -1
- {dissect.target-3.21.dev4.dist-info → dissect.target-3.21.dev6.dist-info}/RECORD +9 -9
- {dissect.target-3.21.dev4.dist-info → dissect.target-3.21.dev6.dist-info}/COPYRIGHT +0 -0
- {dissect.target-3.21.dev4.dist-info → dissect.target-3.21.dev6.dist-info}/LICENSE +0 -0
- {dissect.target-3.21.dev4.dist-info → dissect.target-3.21.dev6.dist-info}/WHEEL +0 -0
- {dissect.target-3.21.dev4.dist-info → dissect.target-3.21.dev6.dist-info}/entry_points.txt +0 -0
- {dissect.target-3.21.dev4.dist-info → dissect.target-3.21.dev6.dist-info}/top_level.txt +0 -0
@@ -12,7 +12,7 @@ from io import BytesIO
|
|
12
12
|
from pathlib import Path
|
13
13
|
from typing import BinaryIO, Iterator, Optional, TextIO, Union
|
14
14
|
|
15
|
-
from dissect.regf import regf
|
15
|
+
from dissect.regf import c_regf, regf
|
16
16
|
|
17
17
|
from dissect.target.exceptions import (
|
18
18
|
RegistryError,
|
@@ -31,16 +31,33 @@ ValueType = Union[int, str, bytes, list[str]]
|
|
31
31
|
|
32
32
|
|
33
33
|
class RegistryValueType(IntEnum):
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
34
|
+
"""Registry value types as defined in ``winnt.h``.
|
35
|
+
|
36
|
+
Resources:
|
37
|
+
- https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry-value-types
|
38
|
+
- https://github.com/fox-it/dissect.regf/blob/main/dissect/regf/c_regf.py
|
39
|
+
"""
|
40
|
+
|
41
|
+
NONE = c_regf.REG_NONE
|
42
|
+
SZ = c_regf.REG_SZ
|
43
|
+
EXPAND_SZ = c_regf.REG_EXPAND_SZ
|
44
|
+
BINARY = c_regf.REG_BINARY
|
45
|
+
DWORD = c_regf.REG_DWORD
|
46
|
+
DWORD_BIG_ENDIAN = c_regf.REG_DWORD_BIG_ENDIAN
|
47
|
+
LINK = c_regf.REG_LINK
|
48
|
+
MULTI_SZ = c_regf.REG_MULTI_SZ
|
49
|
+
RESOURCE_LIST = c_regf.REG_RESOURCE_LIST
|
50
|
+
FULL_RESOURCE_DESCRIPTOR = c_regf.REG_FULL_RESOURCE_DESCRIPTOR
|
51
|
+
RESOURCE_REQUIREMENTS_LIST = c_regf.REG_RESOURCE_REQUIREMENTS_LIST
|
52
|
+
QWORD = c_regf.REG_QWORD
|
53
|
+
|
54
|
+
@classmethod
|
55
|
+
def _missing_(cls, value: int) -> IntEnum:
|
56
|
+
# Allow values other than defined members
|
57
|
+
member = int.__new__(cls, value)
|
58
|
+
member._name_ = None
|
59
|
+
member._value_ = value
|
60
|
+
return member
|
44
61
|
|
45
62
|
|
46
63
|
class RegistryHive:
|
@@ -1,5 +1,6 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
+
import re
|
3
4
|
from enum import IntEnum
|
4
5
|
from functools import lru_cache
|
5
6
|
from typing import Iterator
|
@@ -224,11 +225,13 @@ def _try_value(subkey: RegistryKey, value: str) -> str | list | None:
|
|
224
225
|
return None
|
225
226
|
|
226
227
|
|
227
|
-
def _get_config_value(key: RegistryKey, name: str) -> set:
|
228
|
+
def _get_config_value(key: RegistryKey, name: str, sep: str | None = None) -> set:
|
228
229
|
value = _try_value(key, name)
|
229
230
|
if not value or value in ("", "0.0.0.0", None, [], ["0.0.0.0"]):
|
230
231
|
return set()
|
231
|
-
|
232
|
+
if sep and isinstance(value, str):
|
233
|
+
re_sep = "|".join(map(re.escape, sep))
|
234
|
+
value = re.split(re_sep, value)
|
232
235
|
if isinstance(value, list):
|
233
236
|
return set(value)
|
234
237
|
|
@@ -355,11 +358,11 @@ class WindowsNetworkPlugin(NetworkPlugin):
|
|
355
358
|
dhcp_config["ip"].update(_get_config_value(key, "DhcpIPAddress"))
|
356
359
|
dhcp_config["subnetmask"].update(_get_config_value(key, "DhcpSubnetMask"))
|
357
360
|
dhcp_config["search_domain"].update(_get_config_value(key, "DhcpDomain"))
|
358
|
-
dhcp_config["dns"].update(_get_config_value(key, "DhcpNameServer"))
|
361
|
+
dhcp_config["dns"].update(_get_config_value(key, "DhcpNameServer", " ,"))
|
359
362
|
|
360
363
|
# Extract static configuration from the registry
|
361
364
|
static_config["gateway"].update(_get_config_value(key, "DefaultGateway"))
|
362
|
-
static_config["dns"].update(_get_config_value(key, "NameServer"))
|
365
|
+
static_config["dns"].update(_get_config_value(key, "NameServer", " ,"))
|
363
366
|
static_config["search_domain"].update(_get_config_value(key, "Domain"))
|
364
367
|
static_config["ip"].update(_get_config_value(key, "IPAddress"))
|
365
368
|
static_config["subnetmask"].update(_get_config_value(key, "SubnetMask"))
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: dissect.target
|
3
|
-
Version: 3.21.
|
3
|
+
Version: 3.21.dev6
|
4
4
|
Summary: This module ties all other Dissect modules together, it provides a programming API and command line tools which allow easy access to various data sources inside disk images or file collections (a.k.a. targets)
|
5
5
|
Author-email: Dissect Team <dissect@fox-it.com>
|
6
6
|
License: Affero General Public License v3
|
@@ -62,7 +62,7 @@ dissect/target/helpers/polypath.py,sha256=h8p7m_OCNiQljGwoZh5Aflr9H2ot6CZr6WKq1O
|
|
62
62
|
dissect/target/helpers/protobuf.py,sha256=b4DsnqrRLrefcDjx7rQno-_LBcwtJXxuKf5RdOegzfE,1537
|
63
63
|
dissect/target/helpers/record.py,sha256=VRwPE8OIotWzfxw-_ep_eXG-Iml6xzhodwPlbQYYaoY,6540
|
64
64
|
dissect/target/helpers/record_modifier.py,sha256=cRNDhUYMmx4iEKyEr5Pqy9xiFgxr_GBNJPp_omkQsEU,4094
|
65
|
-
dissect/target/helpers/regutil.py,sha256=
|
65
|
+
dissect/target/helpers/regutil.py,sha256=y-zT4h_zo4MEW-rTqkuFPevlhGhG-ZGljNjYuoLIrQU,28963
|
66
66
|
dissect/target/helpers/shell_application_ids.py,sha256=hYxrP-YtHK7ZM0ectJFHfoMB8QUXLbYNKmKXMWLZRlA,38132
|
67
67
|
dissect/target/helpers/shell_folder_ids.py,sha256=Behhb8oh0kMxrEk6YYKYigCDZe8Hw5QS6iK_d2hTs2Y,24978
|
68
68
|
dissect/target/helpers/utils.py,sha256=1UZNTUVBmtS2clbyIsi6mHOVw0jqPktM8OwCxCbOiY0,4587
|
@@ -290,7 +290,7 @@ dissect/target/plugins/os/windows/generic.py,sha256=RJ1znzsIa4CFxmdMh91SjMY_pnjw
|
|
290
290
|
dissect/target/plugins/os/windows/jumplist.py,sha256=3gZk6O1B3lKK2Jxe0B-HapOCEehk94CYNvCVDpQC9nQ,11773
|
291
291
|
dissect/target/plugins/os/windows/lnk.py,sha256=KTqhw0JMW-KjAxe4xlRDNSRSx-th-_nPVgTGyBaKmW0,7891
|
292
292
|
dissect/target/plugins/os/windows/locale.py,sha256=QiLWGgWrGBGHiXgep5iSOo6VNim4YC-xd4MdW0BUJPA,2486
|
293
|
-
dissect/target/plugins/os/windows/network.py,sha256=
|
293
|
+
dissect/target/plugins/os/windows/network.py,sha256=epbRPt_Aa6xPV_fCd2tbHpbHAi_JG1jWrtHsDrqCrlM,11507
|
294
294
|
dissect/target/plugins/os/windows/notifications.py,sha256=xxfMEY_noDxMVqvT3QS1a3j-X3qAYikOtT6v2owxuCY,17480
|
295
295
|
dissect/target/plugins/os/windows/prefetch.py,sha256=wbbYoy05gWbJfRsM2ci4wPG7kM58OocVwXD3hkQlbRw,10647
|
296
296
|
dissect/target/plugins/os/windows/recyclebin.py,sha256=zx58hDCvcrD_eJl9nJmr_i80krSN03ya8nQzWFr2Tw0,4917
|
@@ -381,10 +381,10 @@ dissect/target/volumes/luks.py,sha256=OmCMsw6rCUXG1_plnLVLTpsvE1n_6WtoRUGQbpmu1z
|
|
381
381
|
dissect/target/volumes/lvm.py,sha256=wwQVR9I3G9YzmY6UxFsH2Y4MXGBcKL9aayWGCDTiWMU,2269
|
382
382
|
dissect/target/volumes/md.py,sha256=7ShPtusuLGaIv27SvEETtgsuoQyAa4iAAeOR1NEaajI,1689
|
383
383
|
dissect/target/volumes/vmfs.py,sha256=-LoUbn9WNwTtLi_4K34uV_-wDw2W5hgaqxZNj4UmqAQ,1730
|
384
|
-
dissect.target-3.21.
|
385
|
-
dissect.target-3.21.
|
386
|
-
dissect.target-3.21.
|
387
|
-
dissect.target-3.21.
|
388
|
-
dissect.target-3.21.
|
389
|
-
dissect.target-3.21.
|
390
|
-
dissect.target-3.21.
|
384
|
+
dissect.target-3.21.dev6.dist-info/COPYRIGHT,sha256=m-9ih2RVhMiXHI2bf_oNSSgHgkeIvaYRVfKTwFbnJPA,301
|
385
|
+
dissect.target-3.21.dev6.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
386
|
+
dissect.target-3.21.dev6.dist-info/METADATA,sha256=y20uM3xEziZVCXj48rhG1H4o0gITbJyiu6gQ4gBDTiE,13186
|
387
|
+
dissect.target-3.21.dev6.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
388
|
+
dissect.target-3.21.dev6.dist-info/entry_points.txt,sha256=BWuxAb_6AvUAQpIQOQU0IMTlaF6TDht2AIZK8bHd-zE,492
|
389
|
+
dissect.target-3.21.dev6.dist-info/top_level.txt,sha256=Mn-CQzEYsAbkxrUI0TnplHuXnGVKzxpDw_po_sXpvv4,8
|
390
|
+
dissect.target-3.21.dev6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|