Coder Social home page Coder Social logo

knight5008055 / python-kismet-db Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kismetwireless/python-kismet-db

0.0 0.0 0.0 131 KB

Kismetdb database log helper library (mirrored from Kismet repos)

License: GNU General Public License v2.0

Python 97.48% Dockerfile 2.52%

python-kismet-db's Introduction

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 .

python-kismet-db's People

Contributors

ashmastaflash avatar dragorn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.