dissect.target 3.19.dev51__py3-none-any.whl → 3.19.dev53__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/plugins/os/unix/bsd/freebsd/_os.py +3 -5
- dissect/target/plugins/os/unix/linux/_os.py +11 -13
- {dissect.target-3.19.dev51.dist-info → dissect.target-3.19.dev53.dist-info}/METADATA +1 -1
- {dissect.target-3.19.dev51.dist-info → dissect.target-3.19.dev53.dist-info}/RECORD +9 -9
- {dissect.target-3.19.dev51.dist-info → dissect.target-3.19.dev53.dist-info}/WHEEL +1 -1
- {dissect.target-3.19.dev51.dist-info → dissect.target-3.19.dev53.dist-info}/COPYRIGHT +0 -0
- {dissect.target-3.19.dev51.dist-info → dissect.target-3.19.dev53.dist-info}/LICENSE +0 -0
- {dissect.target-3.19.dev51.dist-info → dissect.target-3.19.dev53.dist-info}/entry_points.txt +0 -0
- {dissect.target-3.19.dev51.dist-info → dissect.target-3.19.dev53.dist-info}/top_level.txt +0 -0
@@ -1,7 +1,5 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
-
from typing import Optional
|
4
|
-
|
5
3
|
from dissect.target.filesystem import Filesystem
|
6
4
|
from dissect.target.plugin import export
|
7
5
|
from dissect.target.plugins.os.unix.bsd._os import BsdPlugin
|
@@ -14,13 +12,13 @@ class FreeBsdPlugin(BsdPlugin):
|
|
14
12
|
self._os_release = self._parse_os_release("/bin/freebsd-version*")
|
15
13
|
|
16
14
|
@classmethod
|
17
|
-
def detect(cls, target: Target) ->
|
15
|
+
def detect(cls, target: Target) -> Filesystem | None:
|
18
16
|
for fs in target.filesystems:
|
19
|
-
if fs.exists("/net")
|
17
|
+
if fs.exists("/net") and (fs.exists("/.sujournal") or fs.exists("/entropy")):
|
20
18
|
return fs
|
21
19
|
|
22
20
|
return None
|
23
21
|
|
24
22
|
@export(property=True)
|
25
|
-
def version(self) ->
|
23
|
+
def version(self) -> str | None:
|
26
24
|
return self._os_release.get("USERLAND_VERSION")
|
@@ -1,5 +1,6 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
|
1
3
|
import logging
|
2
|
-
from typing import Optional
|
3
4
|
|
4
5
|
from dissect.target.filesystem import Filesystem
|
5
6
|
from dissect.target.helpers.network_managers import (
|
@@ -8,6 +9,8 @@ from dissect.target.helpers.network_managers import (
|
|
8
9
|
)
|
9
10
|
from dissect.target.plugin import OperatingSystem, export
|
10
11
|
from dissect.target.plugins.os.unix._os import UnixPlugin
|
12
|
+
from dissect.target.plugins.os.unix.bsd.osx._os import MacPlugin
|
13
|
+
from dissect.target.plugins.os.windows._os import WindowsPlugin
|
11
14
|
from dissect.target.target import Target
|
12
15
|
|
13
16
|
log = logging.getLogger(__name__)
|
@@ -20,17 +23,13 @@ class LinuxPlugin(UnixPlugin, LinuxNetworkManager):
|
|
20
23
|
self.network_manager.discover()
|
21
24
|
|
22
25
|
@classmethod
|
23
|
-
def detect(cls, target: Target) ->
|
26
|
+
def detect(cls, target: Target) -> Filesystem | None:
|
24
27
|
for fs in target.filesystems:
|
25
28
|
if (
|
26
|
-
fs.exists("/var")
|
27
|
-
|
28
|
-
|
29
|
-
or (fs.exists("/sys") or fs.exists("/proc"))
|
30
|
-
and not fs.exists("/Library")
|
31
|
-
):
|
29
|
+
(fs.exists("/var") and fs.exists("/etc") and fs.exists("/opt"))
|
30
|
+
or (fs.exists("/sys/module") or fs.exists("/proc/sys"))
|
31
|
+
) and not (MacPlugin.detect(target) or WindowsPlugin.detect(target)):
|
32
32
|
return fs
|
33
|
-
return None
|
34
33
|
|
35
34
|
@export(property=True)
|
36
35
|
def ips(self) -> list[str]:
|
@@ -68,7 +67,7 @@ class LinuxPlugin(UnixPlugin, LinuxNetworkManager):
|
|
68
67
|
return self.network_manager.get_config_value("netmask")
|
69
68
|
|
70
69
|
@export(property=True)
|
71
|
-
def version(self) -> str:
|
70
|
+
def version(self) -> str | None:
|
72
71
|
distrib_description = self._os_release.get("DISTRIB_DESCRIPTION", "")
|
73
72
|
name = self._os_release.get("NAME", "") or self._os_release.get("DISTRIB_ID", "")
|
74
73
|
version = (
|
@@ -78,10 +77,9 @@ class LinuxPlugin(UnixPlugin, LinuxNetworkManager):
|
|
78
77
|
)
|
79
78
|
|
80
79
|
if len(f"{name} {version}") > len(distrib_description):
|
81
|
-
|
80
|
+
distrib_description = f"{name} {version}"
|
82
81
|
|
83
|
-
|
84
|
-
return distrib_description
|
82
|
+
return distrib_description or None
|
85
83
|
|
86
84
|
@export(property=True)
|
87
85
|
def os(self) -> str:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: dissect.target
|
3
|
-
Version: 3.19.
|
3
|
+
Version: 3.19.dev53
|
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
|
@@ -206,7 +206,7 @@ dissect/target/plugins/os/unix/bsd/citrix/__init__.py,sha256=47DEQpj8HBSa-_TImW-
|
|
206
206
|
dissect/target/plugins/os/unix/bsd/citrix/_os.py,sha256=u9agLXoMt_k-nARtSJ78_-ScJae4clZhkqFiEVsB9b8,7910
|
207
207
|
dissect/target/plugins/os/unix/bsd/citrix/history.py,sha256=cXMA4rZQBsOMwd_aLbXjW_CAEzNnsr2bUZB9cPufnQo,4498
|
208
208
|
dissect/target/plugins/os/unix/bsd/freebsd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
209
|
-
dissect/target/plugins/os/unix/bsd/freebsd/_os.py,sha256=
|
209
|
+
dissect/target/plugins/os/unix/bsd/freebsd/_os.py,sha256=_r8htCB6wWNAU1siGKu4SSsKxSNR1KZ5j0mCF0ZAJDg,782
|
210
210
|
dissect/target/plugins/os/unix/bsd/ios/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
211
211
|
dissect/target/plugins/os/unix/bsd/ios/_os.py,sha256=VlJXGxkQZ4RbGbSC-FlbR2YWOJp2kLf9nrJaWCURdW4,1193
|
212
212
|
dissect/target/plugins/os/unix/bsd/openbsd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -219,7 +219,7 @@ dissect/target/plugins/os/unix/esxi/_os.py,sha256=s6pAgUyfHh3QcY6sgvk5uVMmLvqK1t
|
|
219
219
|
dissect/target/plugins/os/unix/etc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
220
220
|
dissect/target/plugins/os/unix/etc/etc.py,sha256=px_UwtPuk_scD-3nKJQZ0ao5lus9-BrSU4lPZWelYzI,2541
|
221
221
|
dissect/target/plugins/os/unix/linux/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
222
|
-
dissect/target/plugins/os/unix/linux/_os.py,sha256=
|
222
|
+
dissect/target/plugins/os/unix/linux/_os.py,sha256=DF4UV-s6XupV8bWck2Mkm4seFRb0oKjzeM-PtU8OV0k,2940
|
223
223
|
dissect/target/plugins/os/unix/linux/cmdline.py,sha256=AyMfndt3UsmJtoOyZYC8nWq2GZg9oPvn8SiI3M4NxnE,1622
|
224
224
|
dissect/target/plugins/os/unix/linux/environ.py,sha256=UOQD7Xmu754u2oAh3L5g5snuz-gv4jbWbVy46qszYjo,1881
|
225
225
|
dissect/target/plugins/os/unix/linux/iptables.py,sha256=qTzY5PHHXA33WnPYb5NESgoSwI7ECZ8YPoEe_Fmln-8,6045
|
@@ -356,10 +356,10 @@ dissect/target/volumes/luks.py,sha256=OmCMsw6rCUXG1_plnLVLTpsvE1n_6WtoRUGQbpmu1z
|
|
356
356
|
dissect/target/volumes/lvm.py,sha256=wwQVR9I3G9YzmY6UxFsH2Y4MXGBcKL9aayWGCDTiWMU,2269
|
357
357
|
dissect/target/volumes/md.py,sha256=7ShPtusuLGaIv27SvEETtgsuoQyAa4iAAeOR1NEaajI,1689
|
358
358
|
dissect/target/volumes/vmfs.py,sha256=-LoUbn9WNwTtLi_4K34uV_-wDw2W5hgaqxZNj4UmqAQ,1730
|
359
|
-
dissect.target-3.19.
|
360
|
-
dissect.target-3.19.
|
361
|
-
dissect.target-3.19.
|
362
|
-
dissect.target-3.19.
|
363
|
-
dissect.target-3.19.
|
364
|
-
dissect.target-3.19.
|
365
|
-
dissect.target-3.19.
|
359
|
+
dissect.target-3.19.dev53.dist-info/COPYRIGHT,sha256=m-9ih2RVhMiXHI2bf_oNSSgHgkeIvaYRVfKTwFbnJPA,301
|
360
|
+
dissect.target-3.19.dev53.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
361
|
+
dissect.target-3.19.dev53.dist-info/METADATA,sha256=9Bx6bb3QUXpRP7XxDfw0BeR-YI59jgL9i0eKCzVGrY0,12897
|
362
|
+
dissect.target-3.19.dev53.dist-info/WHEEL,sha256=ixB2d4u7mugx_bCBycvM9OzZ5yD7NmPXFRtKlORZS2Y,91
|
363
|
+
dissect.target-3.19.dev53.dist-info/entry_points.txt,sha256=BWuxAb_6AvUAQpIQOQU0IMTlaF6TDht2AIZK8bHd-zE,492
|
364
|
+
dissect.target-3.19.dev53.dist-info/top_level.txt,sha256=Mn-CQzEYsAbkxrUI0TnplHuXnGVKzxpDw_po_sXpvv4,8
|
365
|
+
dissect.target-3.19.dev53.dist-info/RECORD,,
|
File without changes
|
File without changes
|
{dissect.target-3.19.dev51.dist-info → dissect.target-3.19.dev53.dist-info}/entry_points.txt
RENAMED
File without changes
|
File without changes
|