Skip to main content

A python wrapper for the Kismet database

Project description

Kismet database wrapper

Documentation Status

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

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.

Project details


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.3.tar.gz (16.6 kB view details)

Uploaded Source

File details

Details for the file kismetdb-2019.5.3.tar.gz.

File metadata

  • Download URL: kismetdb-2019.5.3.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for kismetdb-2019.5.3.tar.gz
Algorithm Hash digest
SHA256 3ae14bab0dec67001f3c354be13efea46cae94ee280947db2d3af2d90823401b
MD5 368655594abb2736b696438d03b015f8
BLAKE2b-256 9b865cb91c82f7579e94649ed43e75d5a3930261bc5575a4ed631906179e7128

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page