Kismet database wrapper
Quickstart
Install from PyPI with pip install kismetdb
Install from source with 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
v2020.06.01
Assume the last version of the db-specific fields and converters if no other version found [Mike Kershaw / Dragorn]
v2019.05.05
Handle missing SYSTEM snapshots during Kismet processing [Mike Kershaw / Dragorn]
v2019.05.04
Add DataPackets handler [Mike Kershaw / Dragorn]
v2019.05.03
Fix JSON blob type extractor for DataSources [Ash Wilson]
Closes #3
Add JSON blob type extractor for Snapshots [Mike Kershaw / Dragorn]
v2019.05.02
Make RST doc levels happy. [Mike Kershaw / Dragorn]
Hopefully make docs happy. [Mike Kershaw / Dragorn]
Add self to docs. [Mike Kershaw / Dragorn]
Fix changelog. [Mike Kershaw / Dragorn]
Fix RST? [Mike Kershaw / Dragorn]
Docs. [Mike Kershaw / Dragorn]
Ignore vim. [Mike Kershaw / Dragorn]
Enable classes Bump version Add integer version. [Mike Kershaw / Dragorn]
Add snapshots class Add kismet class for server info derived from snapshots. [Mike Kershaw / Dragorn]
Add float comparators Add string LIKE comparators. [Mike Kershaw / Dragorn]
Add defaults for db6. [Mike Kershaw / Dragorn]
Add support for database version 6. [Mike Kershaw / Dragorn]
Add license file now that it’s a submodule. [Mike Kershaw / Dragorn]
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.
Release files for kismetdb 2021.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kismetdb-2021.6.1.tar.gz | 18.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kismetdb-2021.6.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.5 kB
Release files / kismetdb-2021.6.1.tar.gz
| Download URL | kismetdb-2021.6.1.tar.gz |
|---|---|
| Size | 18.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a8d8cc54fdde8888f27ce87cf122440907f960b78346443c7710260b89c4436b
|
|
BLAKE2b-256 checksum How to use checksums |
00fa29ac46ef3f342f3624cabe99e42b0350d0f1ea824e2c90fe15958f77d862
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.6
|
Release files / kismetdb-2021.6.1-py3-none-any.whl
| Download URL | kismetdb-2021.6.1-py3-none-any.whl |
|---|---|
| Size | 29.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e111fe603640ede0ba208496566bc0039d05ef80de05de1e40d02a86da4e73ff
|
|
BLAKE2b-256 checksum How to use checksums |
b2805de8e7225685bfdf4f50c15a33dda269767749a573af78e18c8ee1faa28e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.6
|