Messages
Kismet uses an internal messagebus system (an extension of the event bus) for communicating messages from various components to the UI.
The messagebus is used to pass error, status, and debug messages, as well as notifications to the user about detected devices, alerts, etc.
For real-time messages, see the eventbus. The Kismet UI uses a combination of the messages API to load previous content, and the eventbus to receive pushed future messages immediately.
All messages
readonly/messagebus/all_messages.json/messagebus/all_messages.ekjson/messagebus/all_messages.prettyjsonGETRecent messages
TIMESTAMP.readonly/messagebus/last-time/{TIMESTAMP}/messages.json/messagebus/last-time/{TIMESTAMP}/messages.ekjson/messagebus/last-time/{TIMESTAMP}/messages.prettyjsonGETPARAMETERS
TIMESTAMP
number
REQUIREDTimestamps can be absolute (UNIX epochal) timestamps, or they can be relative negativ numbers, indiciating "number of seconds before now".
You can read more about timestamp handling and how to use it here.
TIMESTAMP.All messages (marked)
The same as /messagebus/all_messages; messages which name something identifying also
carry kismet.messagebus.message_marked, the message with those parts marked.
Marked text holds the same text as the plain field, with each part that identifies a
device, network, person, or place wrapped in control characters: \u0001 (SOH), the
kind, \u0002 (STX), the text, and \u0003 (ETX). The kinds are mac (a MAC
address), key (a device key), ssid, name (a device or user name), id (other
identifiers such as cell IDs), ip, and loc (a location). Marker characters which
appear in untrusted text, such as an SSID, are replaced with the literal text \u0001,
\u0002, or \u0003, so markers can’t be forged. Removing the markers gives the
plain text exactly. A client which doesn’t recognize a kind should hide that part.
The web UI uses the marked text to censor messages and alerts by kind.
kismet.messagebus.message_string, the existing endpoints, the console, and the logs
always hold plain text.
readonly/messagebus/marked/all_messages.json/messagebus/marked/all_messages.ekjson/messagebus/marked/all_messages.prettyjsonGETRecent messages (marked)
/messagebus/last-time/{TIMESTAMP}/messages, with
kismet.messagebus.message_marked as described in the
marked messages endpoint.readonly/messagebus/marked/last-time/{TIMESTAMP}/messages.json/messagebus/marked/last-time/{TIMESTAMP}/messages.ekjson/messagebus/marked/last-time/{TIMESTAMP}/messages.prettyjsonGETPARAMETERS
TIMESTAMP
number
REQUIREDTimestamps can be absolute (UNIX epochal) timestamps, or they can be relative negativ numbers, indiciating "number of seconds before now".
You can read more about timestamp handling and how to use it here.
TIMESTAMP.Post a message
Put a message on the message console, for API clients such as helper tools to report what they do. The message goes to the console, the logs and the eventbus like Kismet’s own messages.
Untrusted text in the message can’t forge marked spans; only mac is marked. Messages over
the info rate limit are dropped like Kismet’s own.
admin/messagebus/post.cmdPOSTPARAMETERS
This endpoint takes additional parameters by using a `POST` request and supplying a
JSON document or json form variable.
You can find more information about API parameters here.
msg
string
REQUIREDThe message, 1 to 512 bytes, with no control characters (no newlines).
source
string
REQUIREDWho sent it, shown before the message (source: msg); 1 to 32 letters, digits, -, _ and ..
level
string
OPTIONALinfo (the default), error or alert.
mac
string
OPTIONALA device MAC address the message is about, as AA:BB:CC:DD:EE:FF. It’s shown after the
message in parentheses, and marked as a MAC, so censor mode hides it.