flow.record 3.21.dev10__tar.gz → 3.21.dev12__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.21.dev10 → flow_record-3.21.dev12}/PKG-INFO +2 -2
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/fieldtypes/__init__.py +10 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/version.py +3 -3
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow.record.egg-info/PKG-INFO +2 -2
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow.record.egg-info/requires.txt +2 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/pyproject.toml +2 -2
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/record/test_record.py +9 -4
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/.git-blame-ignore-revs +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/.gitattributes +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/COPYRIGHT +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/LICENSE +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/MANIFEST.in +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/README.md +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/examples/__init__.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/examples/filesystem.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/examples/passivedns.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/examples/records.json +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/examples/selectors.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/examples/tcpconn.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/__init__.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/adapter/__init__.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/adapter/archive.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/adapter/avro.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/adapter/broker.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/adapter/csvfile.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/adapter/duckdb.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/adapter/elastic.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/adapter/jsonfile.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/adapter/line.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/adapter/mongo.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/adapter/split.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/adapter/splunk.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/adapter/sqlite.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/adapter/stream.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/adapter/text.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/adapter/xlsx.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/base.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/exceptions.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/fieldtypes/credential.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/fieldtypes/net/__init__.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/fieldtypes/net/ip.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/fieldtypes/net/ipv4.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/fieldtypes/net/tcp.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/fieldtypes/net/udp.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/jsonpacker.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/packer.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/selector.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/stream.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/tools/__init__.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/tools/geoip.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/tools/rdump.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/utils.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow/record/whitelist.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow.record.egg-info/SOURCES.txt +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow.record.egg-info/dependency_links.txt +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow.record.egg-info/entry_points.txt +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/flow.record.egg-info/top_level.txt +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/setup.cfg +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/__init__.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/_data/.gitkeep +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/_docs/Makefile +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/_docs/conf.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/_docs/index.rst +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/_utils.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/adapter/__init__.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/adapter/test_avro.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/adapter/test_csv.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/adapter/test_elastic.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/adapter/test_json.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/adapter/test_line.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/adapter/test_splunk.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/adapter/test_sqlite_duckdb.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/adapter/test_text.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/adapter/test_xlsx.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/fieldtypes/__init__.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/fieldtypes/test_fieldtypes.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/fieldtypes/test_ip.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/packer/__init__.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/packer/test_json_packer.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/packer/test_packer.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/record/__init__.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/record/test_adapter.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/record/test_descriptor.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/record/test_multi_timestamp.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/selector/__init__.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/selector/test_compiled.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/selector/test_selectors.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/test_deprecations.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/test_regressions.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/test_utils.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/tools/__init__.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tests/tools/test_rdump.py +0 -0
- {flow_record-3.21.dev10 → flow_record-3.21.dev12}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flow.record
|
|
3
|
-
Version: 3.21.
|
|
3
|
+
Version: 3.21.dev12
|
|
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-Expression: AGPL-3.0-or-later
|
|
@@ -23,8 +23,8 @@ Requires-Dist: msgpack>=0.5.2
|
|
|
23
23
|
Requires-Dist: tzdata; platform_system == "Windows"
|
|
24
24
|
Provides-Extra: compression
|
|
25
25
|
Requires-Dist: lz4; extra == "compression"
|
|
26
|
-
Requires-Dist: zstandard; extra == "compression"
|
|
27
26
|
Requires-Dist: zstandard==0.23.0; (platform_python_implementation == "PyPy" and python_version == "3.9") and extra == "compression"
|
|
27
|
+
Requires-Dist: zstandard; (platform_python_implementation != "PyPy" and python_version != "3.9") and extra == "compression"
|
|
28
28
|
Provides-Extra: elastic
|
|
29
29
|
Requires-Dist: elasticsearch; extra == "elastic"
|
|
30
30
|
Provides-Extra: geoip
|
|
@@ -722,6 +722,16 @@ class posix_path(pathlib.PurePosixPath, path):
|
|
|
722
722
|
class windows_path(pathlib.PureWindowsPath, path):
|
|
723
723
|
def __repr__(self) -> str:
|
|
724
724
|
s = str(self)
|
|
725
|
+
# Only use repr() if we have surrogates that need escaping
|
|
726
|
+
try:
|
|
727
|
+
s.encode("utf-8")
|
|
728
|
+
except UnicodeEncodeError:
|
|
729
|
+
# Has surrogates - use repr but fix the over-escaping
|
|
730
|
+
s = repr(s)[1:-1] # This escapes surrogates as \udcXX
|
|
731
|
+
s = s.replace("\\\\", "\\") # Fix double backslashes
|
|
732
|
+
s = s.replace("\\'", "'") # Fix over-escaped quotes
|
|
733
|
+
s = s.replace('\\"', '"') # Fix over-escaped double quotes
|
|
734
|
+
|
|
725
735
|
quote = "'"
|
|
726
736
|
if "'" in s:
|
|
727
737
|
if '"' in s:
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '3.21.
|
|
32
|
-
__version_tuple__ = version_tuple = (3, 21, '
|
|
31
|
+
__version__ = version = '3.21.dev12'
|
|
32
|
+
__version_tuple__ = version_tuple = (3, 21, 'dev12')
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'gc3447bd98'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flow.record
|
|
3
|
-
Version: 3.21.
|
|
3
|
+
Version: 3.21.dev12
|
|
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-Expression: AGPL-3.0-or-later
|
|
@@ -23,8 +23,8 @@ Requires-Dist: msgpack>=0.5.2
|
|
|
23
23
|
Requires-Dist: tzdata; platform_system == "Windows"
|
|
24
24
|
Provides-Extra: compression
|
|
25
25
|
Requires-Dist: lz4; extra == "compression"
|
|
26
|
-
Requires-Dist: zstandard; extra == "compression"
|
|
27
26
|
Requires-Dist: zstandard==0.23.0; (platform_python_implementation == "PyPy" and python_version == "3.9") and extra == "compression"
|
|
27
|
+
Requires-Dist: zstandard; (platform_python_implementation != "PyPy" and python_version != "3.9") and extra == "compression"
|
|
28
28
|
Provides-Extra: elastic
|
|
29
29
|
Requires-Dist: elasticsearch; extra == "elastic"
|
|
30
30
|
Provides-Extra: geoip
|
|
@@ -37,8 +37,8 @@ repository = "https://github.com/fox-it/flow.record"
|
|
|
37
37
|
# Note: these compression libraries do not work well with pypy
|
|
38
38
|
compression = [
|
|
39
39
|
"lz4",
|
|
40
|
-
"zstandard",
|
|
41
40
|
"zstandard==0.23.0; platform_python_implementation == 'PyPy' and python_version == '3.9'", # Pin to last working for PyPy3.9
|
|
41
|
+
"zstandard; platform_python_implementation != 'PyPy' and python_version != '3.9'", # Otherwise, pick the latest
|
|
42
42
|
]
|
|
43
43
|
elastic = [
|
|
44
44
|
"elasticsearch",
|
|
@@ -133,7 +133,7 @@ version_file = "flow/record/version.py"
|
|
|
133
133
|
compression = [
|
|
134
134
|
"lz4",
|
|
135
135
|
"zstandard==0.23.0; platform_python_implementation == 'PyPy' and python_version == '3.9'", # Pin to last working for PyPy3.9
|
|
136
|
-
"zstandard",
|
|
136
|
+
"zstandard; platform_python_implementation != 'PyPy' and python_version != '3.9'", # Otherwise, pick the latest
|
|
137
137
|
]
|
|
138
138
|
elastic = [
|
|
139
139
|
"elasticsearch",
|
|
@@ -29,6 +29,7 @@ from flow.record.base import (
|
|
|
29
29
|
set_ignored_fields_for_comparison,
|
|
30
30
|
)
|
|
31
31
|
from flow.record.exceptions import RecordDescriptorError
|
|
32
|
+
from flow.record.fieldtypes import windows_path
|
|
32
33
|
from flow.record.stream import RecordFieldRewriter
|
|
33
34
|
|
|
34
35
|
if TYPE_CHECKING:
|
|
@@ -307,7 +308,7 @@ def test_record_printer_stdout(capsys: pytest.CaptureFixture) -> None:
|
|
|
307
308
|
writer = RecordPrinter(getattr(sys.stdout, "buffer", sys.stdout))
|
|
308
309
|
writer.write(record)
|
|
309
310
|
|
|
310
|
-
out,
|
|
311
|
+
out, _ = capsys.readouterr()
|
|
311
312
|
expected = "<test/a a_string='hello' common='world' a_count=10>\n"
|
|
312
313
|
assert out == expected
|
|
313
314
|
|
|
@@ -317,9 +318,13 @@ def test_record_printer_stdout_surrogateescape(capsys: pytest.CaptureFixture) ->
|
|
|
317
318
|
"test/a",
|
|
318
319
|
[
|
|
319
320
|
("string", "name"),
|
|
321
|
+
("path", "value"),
|
|
320
322
|
],
|
|
321
323
|
)
|
|
322
|
-
record = Record(
|
|
324
|
+
record = Record(
|
|
325
|
+
b"R\xc3\xa9\xeamy",
|
|
326
|
+
windows_path(b"\x43\x3a\x5c\xc3\xa4\xc3\x84\xe4".decode(errors="surrogateescape")),
|
|
327
|
+
)
|
|
323
328
|
|
|
324
329
|
# fake capsys to be a tty.
|
|
325
330
|
def isatty() -> bool:
|
|
@@ -330,8 +335,8 @@ def test_record_printer_stdout_surrogateescape(capsys: pytest.CaptureFixture) ->
|
|
|
330
335
|
writer = RecordPrinter(getattr(sys.stdout, "buffer", sys.stdout))
|
|
331
336
|
writer.write(record)
|
|
332
337
|
|
|
333
|
-
out,
|
|
334
|
-
expected = "<test/a name='Ré\\udceamy'>\n"
|
|
338
|
+
out, _ = capsys.readouterr()
|
|
339
|
+
expected = "<test/a name='Ré\\udceamy' value='C:\\äÄ\\udce4'>\n"
|
|
335
340
|
assert out == expected
|
|
336
341
|
|
|
337
342
|
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|