/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */ #pragma once #include "Arduino.h" extern String str(const char* ptr); extern String keyword(const char* keywordPtr); extern bool eqls(const char* str, const char* keywordPtr); extern bool eqls(String str, const char* keywordPtr); extern String b2s(bool input); extern String b2a(bool input); extern bool s2b(String input); extern void prnt(const String s); extern void prnt(const bool b); extern void prnt(const char c); extern void prnt(const char* ptr); extern void prnt(const char* ptr, int len); extern void prnt(const int i); extern void prnt(const uint32_t i); extern void prntln(); extern void prntln(const String s); extern void prntln(const bool b); extern void prntln(const char c); extern void prntln(const char* ptr); extern void prntln(const char* ptr, int len); extern void prntln(const int i); extern void prntln(const uint32_t i); /* The following variables are the strings used for the serial interface, display interface and settings. The keywords for the serial CLI have a simple structure to save a bit of memory and CPU time: - every keyword has a unique string - / is used for optional characters, i.e. 'enable/d' makes 'enable' and 'enabled' - , is used for seperations, i.e. 'select/ed,-s' makes 'select', 'selected' and '-s' - everything is in lowercase */ // ===== GLOBAL STRINGS ===== // // Often used characters, therefor in the RAM const char CURSOR = '|'; const char SPACE = ' '; const char DOUBLEPOINT = ':'; const char EQUALS = '='; const char HASHSIGN = '#'; const char ASTERIX = '*'; const char PERCENT = '%'; const char DASH = '-'; const char QUESTIONMARK = '?'; const char ZERO = '0'; const char S = 's'; const char M = 'm'; const char D = 'd'; const char DOUBLEQUOTES = '\"'; const char SLASH = '/'; const char NEWLINE = '\n'; const char CARRIAGERETURN = '\r'; const char SEMICOLON = ';'; const char BACKSLASH = '\\'; const char POINT = '.'; const char VERTICALBAR = '|'; const char COMMA = ','; const char ENDOFLINE = '\0'; const char OPEN_BRACKET = '['; const char CLOSE_BRACKET = ']'; const char OPEN_CURLY_BRACKET = '{'; const char CLOSE_CURLY_BRACKET = '}'; const char STR_TRUE[] PROGMEM = "true"; const char STR_FALSE[] PROGMEM = "false"; const char STR_MIN[] PROGMEM = "min"; // ===== SETUP ===== // const char SETUP_OK[] PROGMEM = "OK"; const char SETUP_ERROR[] PROGMEM = "ERROR"; const char SETUP_MOUNT_SPIFFS[] PROGMEM = "Mounting SPIFFS..."; const char SETUP_FORMAT_SPIFFS[] PROGMEM = "Formatting SPIFFS..."; const char SETUP_FORMAT_EEPROM[] PROGMEM = "Formatting EEPROM..."; const char SETUP_SERIAL_WARNING[] PROGMEM = "Warning: Serial deactivated"; const char SETUP_STARTED[] PROGMEM = "STARTED! \\o/"; const char SETUP_COPYING[] PROGMEM = "Copying "; const char SETUP_PROGMEM_TO_SPIFFS[] PROGMEM = " from PROGMEM to SPIFFS..."; // ===== SERIAL COMMAND LINE INTERFACE ===== // const char CLI_SCAN[] PROGMEM = "scan"; // scan const char CLI_REBOOT[] PROGMEM = "reboot"; // reboot const char CLI_STATUS[] PROGMEM = "status"; // status const char CLI_SHOW[] PROGMEM = "show"; // show const char CLI_REMOVE[] PROGMEM = "remove"; // remove const char CLI_SET[] PROGMEM = "set"; // set const char CLI_STOP[] PROGMEM = "stop"; // stop const char CLI_LOAD[] PROGMEM = "load"; // load const char CLI_SAVE[] PROGMEM = "save"; // save const char CLI_ADD[] PROGMEM = "add"; // add const char CLI_DESELECT[] PROGMEM = "deselect"; // deselect const char CLI_CLEAR[] PROGMEM = "clear"; // clear const char CLI_SYSINFO[] PROGMEM = "sysinfo"; // sysinfo const char CLI_RESET[] PROGMEM = "reset"; // reset const char CLI_ON[] PROGMEM = "on"; // on const char CLI_OFF[] PROGMEM = "off"; // off const char CLI_RANDOM[] PROGMEM = "random"; // random const char CLI_GET[] PROGMEM = "get"; // get const char CLI_INFO[] PROGMEM = "info"; // info const char CLI_HELP[] PROGMEM = "help"; // help const char CLI_RICE[] PROGMEM = "rice"; // rice const char CLI_FORMAT[] PROGMEM = "format"; // format const char CLI_DELETE[] PROGMEM = "delete"; // delete const char CLI_PRINT[] PROGMEM = "print"; // print const char CLI_RUN[] PROGMEM = "run"; // run const char CLI_WRITE[] PROGMEM = "write"; // write const char CLI_LED[] PROGMEM = "led"; // led const char CLI_SEND[] PROGMEM = "send"; // send const char CLI_CUSTOM[] PROGMEM = "custom"; // custom const char CLI_DELAY[] PROGMEM = "delay"; // delay const char CLI_REPLACE[] PROGMEM = "replace"; // replace const char CLI_DRAW[] PROGMEM = "draw"; // draw const char CLI_SCRIPT[] PROGMEM = "script"; // script const char CLI_STARTAP[] PROGMEM = "startap"; // startap const char CLI_STOPAP[] PROGMEM = "stopap"; // stopap const char CLI_RENAME[] PROGMEM = "rename"; // rename const char CLI_COPY[] PROGMEM = "copy"; // copy const char CLI_ENABLE[] PROGMEM = "enable/d"; // enable, enabled const char CLI_DISABLE[] PROGMEM = "disable/d"; // disable, disabled const char CLI_WPA2[] PROGMEM = "wpa/2,-wpa/2"; // wpa, wpa2, -wpa, -wpa2 const char CLI_ATTACK[] PROGMEM = "attack/s"; // attack, attacks const char CLI_CHICKEN[] PROGMEM = "chicken/s"; // chicken, chickens const char CLI_SETTING[] PROGMEM = "setting/s"; // setting, settings const char CLI_ID[] PROGMEM = "id,-i/d"; // id, -i, -id const char CLI_ALL[] PROGMEM = "all,-a"; // all, -a const char CLI_TIME[] PROGMEM = "time,-t"; // time, -t const char CLI_CONTINUE[] PROGMEM = "continue,-c"; // continue, -c const char CLI_CHANNEL[] PROGMEM = "channel,-ch"; // channel, -ch const char CLI_MAC[] PROGMEM = "mac,-m"; // mac, -m const char CLI_BSSID[] PROGMEM = "bssid,-b"; // bssid, -b const char CLI_BEACON[] PROGMEM = "beacon,-b"; // bssid, -b const char CLI_DEAUTH[] PROGMEM = "deauth,-d"; // deauth, -d const char CLI_DEAUTHALL[] PROGMEM = "deauthall,-da"; // deauthall, -da const char CLI_PROBE[] PROGMEM = "probe,-p"; // probe, -p const char CLI_NOOUTPUT[] PROGMEM = "nooutput,-no"; // nooutput, -no const char CLI_FORCE[] PROGMEM = "force,-f"; // force, -f const char CLI_TIMEOUT[] PROGMEM = "timeout,-t"; // timeout, -t const char CLI_WIFI[] PROGMEM = "wifi,-w"; // wifi, -w const char CLI_CLONES[] PROGMEM = "clones,-cl"; // clones, -cl const char CLI_PATH[] PROGMEM = "path,-p"; // path, -p const char CLI_PASSWORD[] PROGMEM = "password,-ps/wd"; // password, -ps, -pswd const char CLI_HIDDEN[] PROGMEM = "hidden,-h"; // hidden, -h const char CLI_CAPTIVEPORTAL[] PROGMEM = "captiveportal,-cp"; // captiveportal, -cp const char CLI_SELECT[] PROGMEM = "select/ed,-s"; // select, selected, -s const char CLI_SSID[] PROGMEM = "ssid/s,-s/s"; // ssid, ssids, -s, -ss const char CLI_AP[] PROGMEM = "ap/s,-ap/s"; // ap, aps, -ap, -aps const char CLI_STATION[] PROGMEM = "station/s,-st"; // station, stations, -st const char CLI_NAME[] PROGMEM = "name/s,-n"; // name, names, -n const char CLI_LINE[] PROGMEM = "line/s,-l"; // line, lines, -l const char CLI_COMMENT[] PROGMEM = "//"; // // const char CLI_SCREEN[] PROGMEM = "screen"; // screen const char CLI_MODE[] PROGMEM = "mode,-m"; // mode const char CLI_MODE_BUTTONTEST[] PROGMEM = "buttontest"; // buttontest const char CLI_MODE_PACKETMONITOR[] PROGMEM = "packetmonitor"; // packetmonitor const char CLI_MODE_LOADINGSCREEN[] PROGMEM = "loadingscreen"; // loading const char CLI_MODE_MENU[] PROGMEM = "menu"; // menu const char CLI_HELP_HELP[] PROGMEM = "help"; const char CLI_HELP_SCAN[] PROGMEM = "scan [] [-t