flow.record 3.19.dev2__tar.gz → 3.19.dev4__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.19.dev2/flow.record.egg-info → flow_record-3.19.dev4}/PKG-INFO +2 -2
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/adapter/elastic.py +7 -2
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/version.py +2 -2
- {flow_record-3.19.dev2 → flow_record-3.19.dev4/flow.record.egg-info}/PKG-INFO +2 -2
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/COPYRIGHT +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/LICENSE +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/MANIFEST.in +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/README.md +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/examples/filesystem.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/examples/passivedns.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/examples/records.json +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/examples/tcpconn.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/__init__.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/adapter/__init__.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/adapter/archive.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/adapter/avro.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/adapter/broker.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/adapter/csvfile.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/adapter/duckdb.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/adapter/jsonfile.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/adapter/line.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/adapter/mongo.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/adapter/split.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/adapter/splunk.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/adapter/sqlite.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/adapter/stream.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/adapter/text.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/adapter/xlsx.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/base.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/exceptions.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/fieldtypes/__init__.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/fieldtypes/credential.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/fieldtypes/net/__init__.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/fieldtypes/net/ip.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/fieldtypes/net/ipv4.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/fieldtypes/net/tcp.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/fieldtypes/net/udp.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/jsonpacker.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/packer.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/selector.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/stream.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/tools/__init__.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/tools/geoip.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/tools/rdump.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/utils.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow/record/whitelist.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow.record.egg-info/SOURCES.txt +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow.record.egg-info/dependency_links.txt +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow.record.egg-info/entry_points.txt +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow.record.egg-info/requires.txt +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/flow.record.egg-info/top_level.txt +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/pyproject.toml +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/setup.cfg +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/__init__.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/_utils.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/docs/Makefile +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/docs/conf.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/docs/index.rst +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/selector_explain_example.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/standalone_test.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/test_adapter_line.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/test_adapter_text.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/test_avro.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/test_avro_adapter.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/test_compiled_selector.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/test_csv_adapter.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/test_deprecations.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/test_elastic_adapter.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/test_fieldtype_ip.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/test_fieldtypes.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/test_json_packer.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/test_json_record_adapter.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/test_multi_timestamp.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/test_packer.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/test_rdump.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/test_record.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/test_record_adapter.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/test_record_descriptor.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/test_regression.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/test_selector.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/test_splunk_adapter.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/test_sqlite_duckdb_adapter.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tests/test_xlsx_adapter.py +0 -0
- {flow_record-3.19.dev2 → flow_record-3.19.dev4}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: flow.record
|
|
3
|
-
Version: 3.19.
|
|
3
|
+
Version: 3.19.dev4
|
|
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
|
|
@@ -25,6 +25,7 @@ Read usage: rdump elastic+[PROTOCOL]://[IP]:[PORT]?index=[INDEX]
|
|
|
25
25
|
|
|
26
26
|
Optional arguments:
|
|
27
27
|
[API_KEY]: base64 encoded api key to authenticate with (default: False)
|
|
28
|
+
[QUEUE_SIZE]: maximum queue size for writing records; limits memory usage (default: 100000)
|
|
28
29
|
[INDEX]: name of the index to use (default: records)
|
|
29
30
|
[VERIFY_CERTS]: verify certs of Elasticsearch instance (default: True)
|
|
30
31
|
[HASH_RECORD]: make record unique by hashing record [slow] (default: False)
|
|
@@ -43,6 +44,7 @@ class ElasticWriter(AbstractWriter):
|
|
|
43
44
|
http_compress: str | bool = True,
|
|
44
45
|
hash_record: str | bool = False,
|
|
45
46
|
api_key: str | None = None,
|
|
47
|
+
queue_size: int = 100000,
|
|
46
48
|
**kwargs,
|
|
47
49
|
) -> None:
|
|
48
50
|
self.index = index
|
|
@@ -50,11 +52,12 @@ class ElasticWriter(AbstractWriter):
|
|
|
50
52
|
verify_certs = str(verify_certs).lower() in ("1", "true")
|
|
51
53
|
http_compress = str(http_compress).lower() in ("1", "true")
|
|
52
54
|
self.hash_record = str(hash_record).lower() in ("1", "true")
|
|
55
|
+
queue_size = int(queue_size)
|
|
53
56
|
|
|
54
57
|
if not uri.lower().startswith(("http://", "https://")):
|
|
55
58
|
uri = "http://" + uri
|
|
56
59
|
|
|
57
|
-
self.queue: queue.Queue[Record | StopIteration] = queue.Queue()
|
|
60
|
+
self.queue: queue.Queue[Record | StopIteration] = queue.Queue(maxsize=queue_size)
|
|
58
61
|
self.event = threading.Event()
|
|
59
62
|
|
|
60
63
|
self.es = elasticsearch.Elasticsearch(
|
|
@@ -128,6 +131,8 @@ class ElasticWriter(AbstractWriter):
|
|
|
128
131
|
record = self.queue.get()
|
|
129
132
|
if record is StopIteration:
|
|
130
133
|
break
|
|
134
|
+
if not record:
|
|
135
|
+
continue
|
|
131
136
|
yield self.record_to_document(record, index=self.index)
|
|
132
137
|
|
|
133
138
|
def streaming_bulk_thread(self) -> None:
|
|
@@ -145,7 +150,7 @@ class ElasticWriter(AbstractWriter):
|
|
|
145
150
|
self.event.set()
|
|
146
151
|
|
|
147
152
|
def write(self, record: Record) -> None:
|
|
148
|
-
self.queue.
|
|
153
|
+
self.queue.put(record)
|
|
149
154
|
|
|
150
155
|
def flush(self) -> None:
|
|
151
156
|
pass
|
|
@@ -12,5 +12,5 @@ __version__: str
|
|
|
12
12
|
__version_tuple__: VERSION_TUPLE
|
|
13
13
|
version_tuple: VERSION_TUPLE
|
|
14
14
|
|
|
15
|
-
__version__ = version = '3.19.
|
|
16
|
-
__version_tuple__ = version_tuple = (3, 19, '
|
|
15
|
+
__version__ = version = '3.19.dev4'
|
|
16
|
+
__version_tuple__ = version_tuple = (3, 19, 'dev4')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: flow.record
|
|
3
|
-
Version: 3.19.
|
|
3
|
+
Version: 3.19.dev4
|
|
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
|
|
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
|