CommandLine.h 969 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef CommandLine_h
  2. #define CommandLine_h
  3. #include "configs.h"
  4. #ifdef HAS_SCREEN
  5. #include "MenuFunctions.h"
  6. #include "Display.h"
  7. #endif
  8. #include "WiFiScan.h"
  9. #ifdef HAS_SCREEN
  10. extern MenuFunctions menu_function_obj;
  11. extern Display display_obj;
  12. #endif
  13. extern WiFiScan wifi_scan_obj;
  14. // Commands
  15. const char PROGMEM CH_CMD[] = "channel";
  16. const char PROGMEM SCANAP_CMD[] = "scanap";
  17. const char PROGMEM SNIFF_BEACON_CMD[] = "sniffbeacon";
  18. const char PROGMEM SNIFF_DEAUTH_CMD[] = "sniffdeauth";
  19. const char PROGMEM SNIFF_PMKID_CMD[] = "sniffpmkid";
  20. const char PROGMEM STOPSCAN_CMD[] = "stopscan";
  21. const char PROGMEM CLEARAP_CMD[] = "clearap";
  22. class CommandLine {
  23. private:
  24. String getSerialInput();
  25. LinkedList<String> parseCommand(String input);
  26. void runCommand(String input);
  27. int argSearch(LinkedList<String>* cmd_args, String key);
  28. public:
  29. CommandLine();
  30. void RunSetup();
  31. void main(uint32_t currentTime);
  32. };
  33. #endif