A python wrapper for the Kismet database
Project description
Kismet database wrapper
_______________________
.. image:: https://readthedocs.org/projects/kismetdb/badge/?version=latest
:target: https://kismetdb.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
Quickstart
----------
Install with `pip install .`
In the Python interpreter:
::
import json
import kismetdb
kismet_log_file = "kismet/database.here"
alerts = kismetdb.Alerts(kismet_log_file)
# Get alert metadata
all_alerts_meta = alerts.get_meta()
for alert in all_alerts_meta:
print(alert["header"])
# Get payload from all alerts
all_alerts = alerts.get_all()
for alert in all_alerts:
print(json.loads(alert["json"])["kismet.alert.text"])
Included scripts
----------------
Alongside the Python library, several commands are installed:
* ``kismet_log_devices_to_json``
* ``kismet_log_to_csv``
* ``kismet_log_to_kml``
* ``kismet_log_to_pcap``
* ``kismet_log_devices_to_filebeat_json``
Following any of the prior commands with ``--help`` will provide details on
usage.
Testing
-------
In order to test, you must place a kismet sqlite log file at
``tests/assets/testdata.kismet_4`` and ``tests/assets/testdata.kismet_5``,
which are Kismet version 4 and 5 databases, respectively.
Testing happens in a Docker build process:
Testing for Python 2.7:
``docker build .``
Testing for Python 3.6:
``docker build --build-arg PY_VER=3.6 .``
Testing for Python 3.7:
``docker build --build-arg PY_VER=3.7 .``
Changelog
=========
v2019.05.01
-----------
- Update for version 6 of the database. [Mike Kershaw / Dragorn ]
v2019.02.01
-----------
- Minor commit to trigger mirror. [Mike Kershaw / Dragorn]
v5.1.0 (2019-02-16)
-------------------
New
~~~
- Include version-specific converters. [Ash Wilson]
This allows us to, for instance, ensure that all
GPS coordinates are returned as float-type values,
across all database versions, no matter how they
were originally stored in the database.
Closes #22
- Support v4 as well as v5 Kismet databases. [Ash Wilson]
Closes #19
- Add ``kismet_log_devices_to_filebeat_json``. [Ash Wilson]
Closes #17
v5.0.0 (2019-02-12)
-------------------
New
~~~
- Support v5 schema. [Ash Wilson]
v4.0.3 (2019-02-05)
-------------------
Changes
~~~~~~~
- Updated docs, added simplekml requirement. [Ash Wilson]
Closes #8
Closes #7
- Adding docs to be built by Sphinx. [Ash Wilson]
- Scripts automatically install with Python package. [Ash Wilson]
Added generator function yield_rows() to all abstractions.
- Initial working commit. [Ash Wilson]
In order to run integration tests, you need a
Kismet db at tests/assets/testdata.kismet.
_______________________
.. image:: https://readthedocs.org/projects/kismetdb/badge/?version=latest
:target: https://kismetdb.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
Quickstart
----------
Install with `pip install .`
In the Python interpreter:
::
import json
import kismetdb
kismet_log_file = "kismet/database.here"
alerts = kismetdb.Alerts(kismet_log_file)
# Get alert metadata
all_alerts_meta = alerts.get_meta()
for alert in all_alerts_meta:
print(alert["header"])
# Get payload from all alerts
all_alerts = alerts.get_all()
for alert in all_alerts:
print(json.loads(alert["json"])["kismet.alert.text"])
Included scripts
----------------
Alongside the Python library, several commands are installed:
* ``kismet_log_devices_to_json``
* ``kismet_log_to_csv``
* ``kismet_log_to_kml``
* ``kismet_log_to_pcap``
* ``kismet_log_devices_to_filebeat_json``
Following any of the prior commands with ``--help`` will provide details on
usage.
Testing
-------
In order to test, you must place a kismet sqlite log file at
``tests/assets/testdata.kismet_4`` and ``tests/assets/testdata.kismet_5``,
which are Kismet version 4 and 5 databases, respectively.
Testing happens in a Docker build process:
Testing for Python 2.7:
``docker build .``
Testing for Python 3.6:
``docker build --build-arg PY_VER=3.6 .``
Testing for Python 3.7:
``docker build --build-arg PY_VER=3.7 .``
Changelog
=========
v2019.05.01
-----------
- Update for version 6 of the database. [Mike Kershaw / Dragorn ]
v2019.02.01
-----------
- Minor commit to trigger mirror. [Mike Kershaw / Dragorn]
v5.1.0 (2019-02-16)
-------------------
New
~~~
- Include version-specific converters. [Ash Wilson]
This allows us to, for instance, ensure that all
GPS coordinates are returned as float-type values,
across all database versions, no matter how they
were originally stored in the database.
Closes #22
- Support v4 as well as v5 Kismet databases. [Ash Wilson]
Closes #19
- Add ``kismet_log_devices_to_filebeat_json``. [Ash Wilson]
Closes #17
v5.0.0 (2019-02-12)
-------------------
New
~~~
- Support v5 schema. [Ash Wilson]
v4.0.3 (2019-02-05)
-------------------
Changes
~~~~~~~
- Updated docs, added simplekml requirement. [Ash Wilson]
Closes #8
Closes #7
- Adding docs to be built by Sphinx. [Ash Wilson]
- Scripts automatically install with Python package. [Ash Wilson]
Added generator function yield_rows() to all abstractions.
- Initial working commit. [Ash Wilson]
In order to run integration tests, you need a
Kismet db at tests/assets/testdata.kismet.
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
kismetdb-2019.5.1.tar.gz
(13.8 kB
view details)
Built Distribution
File details
Details for the file kismetdb-2019.5.1.tar.gz
.
File metadata
- Download URL: kismetdb-2019.5.1.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d34309a99dff2b80fd2977fd906478b531a42dfe73d5409c9368eb568266fdd |
|
MD5 | abd0a58bb25d536b4468106c15ba6296 |
|
BLAKE2b-256 | 8508057afe0a47ec2635dae3c2b96a3d713a364b4dbda9d072104ca3d1b8fef6 |
File details
Details for the file kismetdb-2019.5.1-py2-none-any.whl
.
File metadata
- Download URL: kismetdb-2019.5.1-py2-none-any.whl
- Upload date:
- Size: 21.1 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a59bda91a31fafca5a0c606fa509056e9a480d605b5ed5cdaa0f9a265e7e5db0 |
|
MD5 | f691d824466b227c3b0f187969fead89 |
|
BLAKE2b-256 | 1712bdc6191ec945b89f3db69a1a7b449de80e9326cee3bc7ebe04822737dabf |