flow.record 3.18.dev2__tar.gz → 3.19.dev2__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.
- {flow_record-3.18.dev2/flow.record.egg-info → flow_record-3.19.dev2}/PKG-INFO +1 -1
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/adapter/elastic.py +2 -2
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/fieldtypes/__init__.py +16 -9
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/version.py +2 -2
- {flow_record-3.18.dev2 → flow_record-3.19.dev2/flow.record.egg-info}/PKG-INFO +1 -1
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/test_fieldtypes.py +10 -2
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/COPYRIGHT +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/LICENSE +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/MANIFEST.in +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/README.md +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/examples/filesystem.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/examples/passivedns.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/examples/records.json +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/examples/tcpconn.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/__init__.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/adapter/__init__.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/adapter/archive.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/adapter/avro.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/adapter/broker.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/adapter/csvfile.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/adapter/duckdb.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/adapter/jsonfile.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/adapter/line.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/adapter/mongo.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/adapter/split.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/adapter/splunk.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/adapter/sqlite.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/adapter/stream.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/adapter/text.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/adapter/xlsx.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/base.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/exceptions.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/fieldtypes/credential.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/fieldtypes/net/__init__.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/fieldtypes/net/ip.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/fieldtypes/net/ipv4.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/fieldtypes/net/tcp.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/fieldtypes/net/udp.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/jsonpacker.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/packer.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/selector.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/stream.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/tools/__init__.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/tools/geoip.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/tools/rdump.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/utils.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow/record/whitelist.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow.record.egg-info/SOURCES.txt +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow.record.egg-info/dependency_links.txt +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow.record.egg-info/entry_points.txt +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow.record.egg-info/requires.txt +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/flow.record.egg-info/top_level.txt +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/pyproject.toml +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/setup.cfg +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/__init__.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/_utils.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/docs/Makefile +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/docs/conf.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/docs/index.rst +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/selector_explain_example.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/standalone_test.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/test_adapter_line.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/test_adapter_text.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/test_avro.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/test_avro_adapter.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/test_compiled_selector.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/test_csv_adapter.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/test_deprecations.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/test_elastic_adapter.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/test_fieldtype_ip.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/test_json_packer.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/test_json_record_adapter.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/test_multi_timestamp.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/test_packer.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/test_rdump.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/test_record.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/test_record_adapter.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/test_record_descriptor.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/test_regression.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/test_selector.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/test_splunk_adapter.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/test_sqlite_duckdb_adapter.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tests/test_xlsx_adapter.py +0 -0
- {flow_record-3.18.dev2 → flow_record-3.19.dev2}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: flow.record
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.19.dev2
|
|
4
4
|
Summary: A library for defining and creating structured data (called records) that can be streamed to disk or piped to other tools that use flow.record
|
|
5
5
|
Author-email: Dissect Team <dissect@fox-it.com>
|
|
6
6
|
License: Affero General Public License v3
|
|
@@ -83,8 +83,8 @@ class ElasticWriter(AbstractWriter):
|
|
|
83
83
|
self.metadata_fields[arg_key[6:]] = arg_val
|
|
84
84
|
|
|
85
85
|
def excepthook(self, exc: threading.ExceptHookArgs, *args, **kwargs) -> None:
|
|
86
|
-
log.error("Exception in thread: %s", exc
|
|
87
|
-
self.exception = exc
|
|
86
|
+
log.error("Exception in thread: %s", exc)
|
|
87
|
+
self.exception = getattr(exc, "exc_value", exc)
|
|
88
88
|
self.event.set()
|
|
89
89
|
self.close()
|
|
90
90
|
|
|
@@ -33,6 +33,7 @@ UTC = timezone.utc
|
|
|
33
33
|
|
|
34
34
|
PY_311_OR_HIGHER = sys.version_info >= (3, 11, 0)
|
|
35
35
|
PY_312_OR_HIGHER = sys.version_info >= (3, 12, 0)
|
|
36
|
+
PY_313_OR_HIGHER = sys.version_info >= (3, 13, 0)
|
|
36
37
|
|
|
37
38
|
TYPE_POSIX = 0
|
|
38
39
|
TYPE_WINDOWS = 1
|
|
@@ -600,12 +601,18 @@ class record(FieldType):
|
|
|
600
601
|
return data
|
|
601
602
|
|
|
602
603
|
|
|
603
|
-
def _is_posixlike_path(path: Any):
|
|
604
|
-
|
|
604
|
+
def _is_posixlike_path(path: Any) -> bool:
|
|
605
|
+
if isinstance(path, pathlib.PurePath):
|
|
606
|
+
obj = getattr(path, "parser", None) or path._flavour
|
|
607
|
+
return "\\" not in (obj.sep, obj.altsep)
|
|
608
|
+
return False
|
|
605
609
|
|
|
606
610
|
|
|
607
|
-
def _is_windowslike_path(path: Any):
|
|
608
|
-
|
|
611
|
+
def _is_windowslike_path(path: Any) -> bool:
|
|
612
|
+
if isinstance(path, pathlib.PurePath):
|
|
613
|
+
obj = getattr(path, "parser", None) or path._flavour
|
|
614
|
+
return "\\" in (obj.sep, obj.altsep)
|
|
615
|
+
return False
|
|
609
616
|
|
|
610
617
|
|
|
611
618
|
class path(pathlib.PurePath, FieldType):
|
|
@@ -684,17 +691,17 @@ class path(pathlib.PurePath, FieldType):
|
|
|
684
691
|
return repr(str(self))
|
|
685
692
|
|
|
686
693
|
@property
|
|
687
|
-
def parent(self):
|
|
694
|
+
def parent(self) -> path:
|
|
688
695
|
if self._empty_path:
|
|
689
696
|
return self
|
|
690
697
|
return super().parent
|
|
691
698
|
|
|
692
|
-
def _pack(self):
|
|
699
|
+
def _pack(self) -> tuple[str, int]:
|
|
693
700
|
path_type = TYPE_WINDOWS if isinstance(self, windows_path) else TYPE_POSIX
|
|
694
701
|
return (str(self), path_type)
|
|
695
702
|
|
|
696
703
|
@classmethod
|
|
697
|
-
def _unpack(cls, data: tuple[str, str]):
|
|
704
|
+
def _unpack(cls, data: tuple[str, str]) -> posix_path | windows_path:
|
|
698
705
|
path_, path_type = data
|
|
699
706
|
if path_type == TYPE_POSIX:
|
|
700
707
|
return posix_path(path_)
|
|
@@ -705,12 +712,12 @@ class path(pathlib.PurePath, FieldType):
|
|
|
705
712
|
return posix_path(path_)
|
|
706
713
|
|
|
707
714
|
@classmethod
|
|
708
|
-
def from_posix(cls, path_: str):
|
|
715
|
+
def from_posix(cls, path_: str) -> posix_path:
|
|
709
716
|
"""Initialize a path instance from a posix path string using / as a separator."""
|
|
710
717
|
return posix_path(path_)
|
|
711
718
|
|
|
712
719
|
@classmethod
|
|
713
|
-
def from_windows(cls, path_: str):
|
|
720
|
+
def from_windows(cls, path_: str) -> windows_path:
|
|
714
721
|
"""Initialize a path instance from a windows path string using \\ or / as a separator."""
|
|
715
722
|
return windows_path(path_)
|
|
716
723
|
|
|
@@ -12,5 +12,5 @@ __version__: str
|
|
|
12
12
|
__version_tuple__: VERSION_TUPLE
|
|
13
13
|
version_tuple: VERSION_TUPLE
|
|
14
14
|
|
|
15
|
-
__version__ = version = '3.
|
|
16
|
-
__version_tuple__ = version_tuple = (3,
|
|
15
|
+
__version__ = version = '3.19.dev2'
|
|
16
|
+
__version_tuple__ = version_tuple = (3, 19, 'dev2')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: flow.record
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.19.dev2
|
|
4
4
|
Summary: A library for defining and creating structured data (called records) that can be streamed to disk or piped to other tools that use flow.record
|
|
5
5
|
Author-email: Dissect Team <dissect@fox-it.com>
|
|
6
6
|
License: Affero General Public License v3
|
|
@@ -15,6 +15,7 @@ import flow.record.fieldtypes
|
|
|
15
15
|
from flow.record import RecordDescriptor, RecordReader, RecordWriter, fieldtypes
|
|
16
16
|
from flow.record.fieldtypes import (
|
|
17
17
|
PY_312_OR_HIGHER,
|
|
18
|
+
PY_313_OR_HIGHER,
|
|
18
19
|
TYPE_POSIX,
|
|
19
20
|
TYPE_WINDOWS,
|
|
20
21
|
_is_posixlike_path,
|
|
@@ -557,8 +558,15 @@ def custom_pure_path(sep: str, altsep: str) -> pathlib.PurePath:
|
|
|
557
558
|
instance.altsep = altsep
|
|
558
559
|
return instance
|
|
559
560
|
|
|
560
|
-
|
|
561
|
-
|
|
561
|
+
if PY_313_OR_HIGHER:
|
|
562
|
+
|
|
563
|
+
class PureCustomPath(pathlib.PurePath):
|
|
564
|
+
parser = CustomFlavour()
|
|
565
|
+
|
|
566
|
+
else:
|
|
567
|
+
|
|
568
|
+
class PureCustomPath(pathlib.PurePath):
|
|
569
|
+
_flavour = CustomFlavour()
|
|
562
570
|
|
|
563
571
|
return PureCustomPath
|
|
564
572
|
|
|
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
|
|
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
|
|
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
|