flow.record 3.21.dev5__tar.gz → 3.21.dev6__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.dev5 → flow_record-3.21.dev6}/PKG-INFO +1 -1
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/adapter/csvfile.py +3 -1
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/version.py +2 -2
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow.record.egg-info/PKG-INFO +1 -1
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_regression.py +10 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/.git-blame-ignore-revs +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/COPYRIGHT +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/LICENSE +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/MANIFEST.in +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/README.md +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/examples/__init__.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/examples/filesystem.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/examples/passivedns.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/examples/records.json +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/examples/tcpconn.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/__init__.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/adapter/__init__.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/adapter/archive.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/adapter/avro.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/adapter/broker.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/adapter/duckdb.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/adapter/elastic.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/adapter/jsonfile.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/adapter/line.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/adapter/mongo.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/adapter/split.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/adapter/splunk.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/adapter/sqlite.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/adapter/stream.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/adapter/text.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/adapter/xlsx.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/base.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/exceptions.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/fieldtypes/__init__.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/fieldtypes/credential.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/fieldtypes/net/__init__.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/fieldtypes/net/ip.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/fieldtypes/net/ipv4.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/fieldtypes/net/tcp.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/fieldtypes/net/udp.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/jsonpacker.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/packer.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/selector.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/stream.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/tools/__init__.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/tools/geoip.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/tools/rdump.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/utils.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow/record/whitelist.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow.record.egg-info/SOURCES.txt +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow.record.egg-info/dependency_links.txt +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow.record.egg-info/entry_points.txt +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow.record.egg-info/requires.txt +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/flow.record.egg-info/top_level.txt +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/pyproject.toml +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/setup.cfg +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/__init__.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/_utils.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/docs/Makefile +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/docs/conf.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/docs/index.rst +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/selector_explain_example.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/standalone_test.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_adapter_line.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_adapter_text.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_avro.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_avro_adapter.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_compiled_selector.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_csv_adapter.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_deprecations.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_elastic_adapter.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_fieldtype_ip.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_fieldtypes.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_json_packer.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_json_record_adapter.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_multi_timestamp.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_packer.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_rdump.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_record.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_record_adapter.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_record_descriptor.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_selector.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_splunk_adapter.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_sqlite_duckdb_adapter.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_utils.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/tests/test_xlsx_adapter.py +0 -0
- {flow_record-3.21.dev5 → flow_record-3.21.dev6}/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.dev6
|
|
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
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import contextlib
|
|
3
4
|
import csv
|
|
4
5
|
import sys
|
|
5
6
|
from pathlib import Path
|
|
@@ -89,7 +90,8 @@ class CsvfileReader(AbstractReader):
|
|
|
89
90
|
|
|
90
91
|
self.dialect = "excel"
|
|
91
92
|
if self.fp.seekable():
|
|
92
|
-
|
|
93
|
+
with contextlib.suppress(csv.Error):
|
|
94
|
+
self.dialect = csv.Sniffer().sniff(self.fp.read(1024))
|
|
93
95
|
self.fp.seek(0)
|
|
94
96
|
self.reader = csv.reader(self.fp, dialect=self.dialect)
|
|
95
97
|
|
|
@@ -17,5 +17,5 @@ __version__: str
|
|
|
17
17
|
__version_tuple__: VERSION_TUPLE
|
|
18
18
|
version_tuple: VERSION_TUPLE
|
|
19
19
|
|
|
20
|
-
__version__ = version = '3.21.
|
|
21
|
-
__version_tuple__ = version_tuple = (3, 21, '
|
|
20
|
+
__version__ = version = '3.21.dev6'
|
|
21
|
+
__version_tuple__ = version_tuple = (3, 21, 'dev6')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flow.record
|
|
3
|
-
Version: 3.21.
|
|
3
|
+
Version: 3.21.dev6
|
|
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
|
|
@@ -711,5 +711,15 @@ def test_rdump_selected_fields(capsysbinary: pytest.CaptureFixture) -> None:
|
|
|
711
711
|
assert captured.out == b"Q42eWSaF,A sample pastebin record,text\r\n"
|
|
712
712
|
|
|
713
713
|
|
|
714
|
+
def test_rdump_csv_sniff(tmp_path: Path, capsysbinary: pytest.CaptureFixture) -> None:
|
|
715
|
+
csv_path = tmp_path / "test.csv"
|
|
716
|
+
csv_path.write_text("ip,common_name,vulnerable\n127.0.0.1,localhost,1\n192.168.4.20,")
|
|
717
|
+
rdump.main([str(csv_path)])
|
|
718
|
+
|
|
719
|
+
captured = capsysbinary.readouterr()
|
|
720
|
+
assert b"<csv/reader ip='127.0.0.1' common_name='localhost' vulnerable='1'>" in captured.out
|
|
721
|
+
assert b"<csv/reader ip='192.168.4.20' common_name='' vulnerable=None>" in captured.out
|
|
722
|
+
|
|
723
|
+
|
|
714
724
|
if __name__ == "__main__":
|
|
715
725
|
__import__("standalone_test").main(globals())
|
|
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
|