Add some command line stuff

This commit is contained in:
Just Call Me Koko
2022-05-03 00:22:11 -04:00
parent 3b09650363
commit 2c4edd012d
8 changed files with 82 additions and 213 deletions

View File

@@ -1445,7 +1445,7 @@ void MenuFunctions::RunSetup()
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(WIFI_SCAN_PROBE, TFT_CYAN);
});
}, "probescan");
addNodes(&wifiSnifferMenu, "Beacon Sniff", TFT_MAGENTA, NULL, BEACON_SNIFF, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
@@ -1476,7 +1476,7 @@ void MenuFunctions::RunSetup()
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(WIFI_SCAN_TARGET_AP, TFT_MAGENTA);
});
}, "scanap");
// Build WiFi attack menu
wifiAttackMenu.parentMenu = &wifiMenu; // Main Menu is second menu parent
@@ -1804,10 +1804,10 @@ void MenuFunctions::showMenuList(Menu * menu, int layer)
// Function to add MenuNodes to a menu
void MenuFunctions::addNodes(Menu * menu, String name, uint16_t color, Menu * child, int place, std::function<void()> callable, bool selected)
void MenuFunctions::addNodes(Menu * menu, String name, uint16_t color, Menu * child, int place, std::function<void()> callable, bool selected, String command)
{
TFT_eSPI_Button new_button;
menu->list->add(MenuNode{name, color, place, &new_button, selected, callable});
menu->list->add(MenuNode{name, command, color, place, &new_button, selected, callable});
//menu->list->add(MenuNode{name, color, place, callable});
}