Devices

class kismetdb.Devices(file_location)

This object covers devices tracked in the Kismet DB.

Unlike other abstractions which contain the object detail under the json key, this abstraction contains the details under the key named device. The Keyword Arguments section below applies only to methods which support them (as noted below), not to object instantiation.

Parameters:

file_location (str) – Path to Kismet log file.

Keyword Arguments:
 
  • first_time_lt (str, datetime.datetime) – Match devices where the first observation timestamp is before this time.
  • first_time_gt (str, datetime.datetime) – Match devices where the first observation timestamp is after this time.
  • last_time_lt (str, datetime.datetime) – Match devices where the most recent observation timestamp is before this time.
  • last_time_gt (str, datetime.datetime) – Match devices where the most recent observation timestamp is after this time.
  • devkey (str, list) – Exact match for this devkey.
  • phyname (str, list) – Exact match for this phyname.
  • devmac (str, list) – Exact match for this device MAC.
  • type (str, list) – Exact match for this device type.
  • strongest_signal_gt (str, int) – Match devices where the strongest signal is greater than the integer representation of this string.
  • strongest_signal_lt (str, int) – Match devices where the strongest signal is less than the integer representation of this string.
  • bytes_data_gt (str, int) – Match devices where we’ve seen at least this many bytes of data (converted to int).
  • bytes_data_lt (str, int) – Match devices where we’ve seen at most this many bytes of data (converted to int).
get_all(**kwargs)

Get all objects represented by this class from Kismet DB.

Keyword arguments are described above, near the beginning of the class documentation.

Returns:List of each json object from all rows returned from query.
Return type:list
get_meta(**kwargs)

Get metadata columns from DB, excluding bulk data columns.

Keyword arguments are described above, near the beginning of the class documentation.

Returns:List of each json object from all rows returned from query.
Return type:list
yield_all(**kwargs)

Get all objects represented by this class from Kismet DB.

Yields one row at a time. Keyword arguments are described above, near the beginning of the class documentation.

Yields:dict – Dict representing one row from query.
yield_meta(**kwargs)

Yield metadata from DB, excluding bulk data columns.

Yields one row at a time. Keyword arguments are described above, near the beginning of the class documentation.

Returns:Dict representing one row from query.
Return type:dict