DataPackets

class kismetdb.DataPackets(file_location)

This object covers non-packet data stored in the Kismet DB.

The actual packet is stored in the json field of the dictionary returned for every row. This can be a very expensive abstraction to use if you don’t employ some sort of filtering on your query. Consider using the Packets.get_meta() method to retrieve only the metadata (not the actual packet capture), which will preserve performance. 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:
 
  • ts_sec_lt (str, datetime.datetime) – Match packets where the timestamp is before this.
  • ts_sec_gt (str, datetime.datetime) – Match packets where the timestamp is after this.
  • phyname (str or list) – Exact match against phy type
  • devmac (str or list) – Exact match against device mac.
  • datasource (str or list) – Exact match against datasource UUID.
  • type (str or list) – Exact match against reported data type
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