dissect.target 3.21.dev5__py3-none-any.whl → 3.21.dev6__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.dev5
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
@@ -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=lziv_oqmRaVKLW-Ep8CZqfd160eVmL1RswTlPgoVapg,11336
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.dev5.dist-info/COPYRIGHT,sha256=m-9ih2RVhMiXHI2bf_oNSSgHgkeIvaYRVfKTwFbnJPA,301
385
- dissect.target-3.21.dev5.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
386
- dissect.target-3.21.dev5.dist-info/METADATA,sha256=oMOLUYFMxQ46sqPrj-9HKNt3PXyHC2XVkboVju0RLWw,13186
387
- dissect.target-3.21.dev5.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
388
- dissect.target-3.21.dev5.dist-info/entry_points.txt,sha256=BWuxAb_6AvUAQpIQOQU0IMTlaF6TDht2AIZK8bHd-zE,492
389
- dissect.target-3.21.dev5.dist-info/top_level.txt,sha256=Mn-CQzEYsAbkxrUI0TnplHuXnGVKzxpDw_po_sXpvv4,8
390
- dissect.target-3.21.dev5.dist-info/RECORD,,
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,,