Creates a sqlite db from zeek logs
Project description
Description
Creates a sqlite db from zeek logs
Installation
pip install zeek_to_sqlite
Usage
From command line:
python -m zeek_to_sqlite [-h] [--name NAME] --path PATH [--result RESULT] [--separator SEPARATOR]
| Option | Short | Type | Default | Description |
|---|---|---|---|---|
| --name | -n | String | zeek.db | Name of the sqlite database written to result |
| --path | -p | String | - | Path to folder where the zeek logs are located |
| --result | -r | String | .\zeek-sqlite | Directory to write the resulting sqlite db |
| --separator | -s | String | \t | The separator used in zeek files |
Example
The following command reads the zeek logs located in ./zeek and creates a sqlite db with
the name zeek-logs.db under ./zeek-sqlite-db
python -m zeek_to_sqlite -p ./zeek -n zeek-logs.db -r ./zeek-sqlite-db
Result:
################################################################################
zeek_to_sqlite by 5f0
Converts zeek logs into a sqlite database
Current working directory: path/to/dir
Datetime: 01/01/1970 10:20:30
################################################################################
Separator:
Location of zeek logs: ./zeek
Location of sqlite db: ./zeek-sqlite-db/zeek-logs.db
---
File to convert: ./zeek/conn.log
Table Name: conn
Columns: ['ts', 'uid', 'id.orig_h', 'id.orig_p', 'id.resp_h', 'id.resp_p', 'proto', 'service', 'duration', 'orig_bytes', 'resp_bytes', 'conn_state', 'local_orig', 'local_resp', 'missed_bytes', 'history', 'orig_pkts', 'orig_ip_bytes', 'resp_pkts', 'resp_ip_bytes', 'tunnel_parents']
Inserted rows: 193411
---
[other zeek logs]
---
################################################################################
Execution Time: 3.464370 sec
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zeek_to_sqlite-1.0.0.tar.gz.
File metadata
- Download URL: zeek_to_sqlite-1.0.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45d155a5aa53912603c24b47b331814b1cfc0238aa8e4e997f95479931af8a9c
|
|
| MD5 |
d11d3b8d7ae902d03c1c00d8f8097640
|
|
| BLAKE2b-256 |
0601f4b82fa9dbf807f9c038ec3475f4e9f4d5504039fa698ff0e7e13ebab523
|
File details
Details for the file zeek_to_sqlite-1.0.0-py3-none-any.whl.
File metadata
- Download URL: zeek_to_sqlite-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ea36df88ed722bae05143efba3f46895a8c15301491a363a22ebac48512b3ef
|
|
| MD5 |
4d695fa0de2f8c7680dc83180e3a94ef
|
|
| BLAKE2b-256 |
2b7c30792400b3839336a313e876421a7c546fb8061b10b0bed3a3db9bd981b3
|