Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

🌉 A Java client for Kismet RESTful API.

License

Notifications You must be signed in to change notification settings

mrdrivingduck/kismet-Jclient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kismet-Jclient (ARCHIVED: no longer maintained!)

🌉 A Java client for Kismet RESTful API.

Created by : Mr Dk.

@2018.10, Nanjing, Jiangsu, China


About

A Java client to get information from Kismet server by Kismet's RESTful API

Environment

  • Kismet release 2018-08-beta1 - Supporting RESTful API
  • Java 8

Dependency

  • HttpClient - A part of Apache HttpComponentsâ„¢ - link
  • fastjson - A fast JSON parser/generator for Java - link
  • Commons-csv - A CSV parser of Apache Commons CSVâ„¢ - link

Usage

  1. Instantiation a JClientConnector with host & port on which Kismet httpd service is running
  2. Instantiation a JClientListener and override methods onMessage() & onTerminate()
  3. Subscribe specific message types for JClientListener
  4. Register the JClientListener onto the JClientConnector
public class Main {
    
    public static void main(String[] args) {
        JClientConnector conn = new JClientConnector("localhost", 2501);
        JClientListener listener = new JClientListener() {
            
            @Override
            public void onTerminate(String reason) {
                System.out.println(reason);
            }
        
            @Override
            public void onMessage(KismetMessage msg) {
                System.out.println(msg);
            }
        };
        
        listener.subscribe(TimeMessage.class);
        // subscribe more messages
        conn.register(listener);
        
        // conn.kill();
    }
    
}

Features

  • The subscription for different types of message can be customized by calling listener.subscribe(XXX.class);
  • The operation to different types of message can be customized by instantiate different JclientListener and override method onMessage & onTerminate
  • Can be integrated into another Java project easily

Extension

You can develop your own message types according to your need. View doc/dev.md to see how to develop a new message type with current framework.

License

Copyright © 2018-2019, Jingtang Zhang. (MIT License)


About

🌉 A Java client for Kismet RESTful API.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages