The C2NOTIFY command sends a notification to the Cloud C² server (if one is connected). This will appear on the Cloud C² dashboard.
Options
C2NOTIFY expects two options: the type of notification, and the message itself.
C2NOTIFY INFO some message
C2NOTIFY ERROR some more severe message
Experimenting
You can experiment using the C2NOTIFY command live, either in the Web Shell in the web UI, or via ssh!
Examples
#!/bin/bash# Title: Cloud C2 Button## Description: A simple payload that notifies Cloud C2 when a button is pressed# Set the netmode to NAT, otherwise there is no connectivity at allNETMODENAT# Set the LED to blinking cyanLEDCSINGLE# Wait forever until the button is tappedBUTTON# Notify Cloud C2C2NOTIFYINFO"The button was pressed!"# Set the LED to blink blue in a triple patternLEDBTRIPLE
A more advanced payload using conditionals to check if the button was pressed:
#!/bin/bash# Title: More advanced Cloud C2 button## Description: React differently if the button was pressed or not# Set the netmode to NAT, otherwise there is no connectivity at allNETMODENAT# Set the LED to blinking cyanLEDCSINGLE# Wait 3 seconds, set the LED depending on if the user presses the buttonBUTTON3&& {C2NOTIFYINFO"The button was pressed!"LEDWSOLID} || {C2NOTIFYERROR"The button was not pressed!"LEDRDOUBLE}