Merge pull request #1126 from justcallmekoko/develop

Give other sniffers buttons
This commit is contained in:
Just Call Me Koko
2026-02-24 11:40:57 -05:00
committed by GitHub
2 changed files with 40 additions and 15 deletions
+3 -3
View File
@@ -202,8 +202,7 @@ void MenuFunctions::main(uint32_t currentTime)
(wifi_scan_obj.currentScanMode != WIFI_SCAN_GPS_NMEA))
{
// Stop the current scan
if ((wifi_scan_obj.currentScanMode == WIFI_SCAN_PROBE) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_SAE_COMMIT) ||
if ((wifi_scan_obj.currentScanMode == WIFI_SCAN_SAE_COMMIT) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_DETECT_FOLLOW) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_STATION_WAR_DRIVE) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_STATION) ||
@@ -227,7 +226,6 @@ void MenuFunctions::main(uint32_t currentTime)
(wifi_scan_obj.currentScanMode == WIFI_SCAN_MULTISSID) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ESPRESSIF) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ALL) ||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_DEAUTH) ||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_BEACON_SPAM) ||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_AP_SPAM) ||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_AUTH) ||
@@ -414,6 +412,8 @@ void MenuFunctions::main(uint32_t currentTime)
(wifi_scan_obj.currentScanMode != WIFI_SCAN_CHAN_ACT) &&
(wifi_scan_obj.currentScanMode != WIFI_SCAN_SIG_STREN) &&
(wifi_scan_obj.currentScanMode != WIFI_SCAN_AP) &&
(wifi_scan_obj.currentScanMode != WIFI_SCAN_PROBE) &&
(wifi_scan_obj.currentScanMode != WIFI_SCAN_DEAUTH) &&
(wifi_scan_obj.currentScanMode != WIFI_ATTACK_FUNNY_BEACON) &&
(wifi_scan_obj.currentScanMode != WIFI_SCAN_EAPOL) &&
(wifi_scan_obj.currentScanMode != WIFI_ATTACK_RICK_ROLL))
+37 -12
View File
@@ -4400,9 +4400,10 @@ void WiFiScan::RunEapolScan(uint8_t scan_mode, uint16_t color)
// display_obj.touchToExit();
//#endif
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
display_obj.setupScrollArea(display_obj.TOP_FIXED_AREA_2, BOT_FIXED_AREA);
//display_obj.setupScrollArea(display_obj.TOP_FIXED_AREA_2, BOT_FIXED_AREA);
display_obj.tftDrawChannelScaleButtons(set_channel, false);
display_obj.tftDrawExitScaleButtons(false);
display_obj.tftDrawChanHopButton(false, settings_obj.loadSetting<bool>("ChanHop"));
#endif
// #endif
@@ -5205,11 +5206,11 @@ void WiFiScan::RunDeauthScan(uint8_t scan_mode, uint16_t color)
display_obj.tft.fillRect(0,16,TFT_WIDTH,16, color);
display_obj.tft.drawCentreString(text_table4[39],TFT_WIDTH / 2,16,2);
#endif
#ifdef HAS_ILI9341
display_obj.touchToExit();
#endif
display_obj.tft.setTextColor(TFT_RED, TFT_BLACK);
display_obj.setupScrollArea(display_obj.TOP_FIXED_AREA_2, BOT_FIXED_AREA);
display_obj.tftDrawChannelScaleButtons(set_channel, false);
display_obj.tftDrawExitScaleButtons(false);
display_obj.tftDrawChanHopButton(false, settings_obj.loadSetting<bool>("ChanHop"));
#endif
esp_wifi_init(&cfg2);
@@ -5351,10 +5352,17 @@ void WiFiScan::RunProbeScan(uint8_t scan_mode, uint16_t color)
}
#endif
#ifdef HAS_ILI9341
display_obj.touchToExit();
if (scan_mode != WIFI_SCAN_PROBE)
display_obj.touchToExit();
#endif
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
display_obj.setupScrollArea(display_obj.TOP_FIXED_AREA_2, BOT_FIXED_AREA);
if (scan_mode != WIFI_SCAN_PROBE)
display_obj.setupScrollArea(display_obj.TOP_FIXED_AREA_2, BOT_FIXED_AREA);
else {
display_obj.tftDrawChannelScaleButtons(set_channel, false);
display_obj.tftDrawExitScaleButtons(false);
display_obj.tftDrawChanHopButton(false, settings_obj.loadSetting<bool>("ChanHop"));
}
#endif
esp_wifi_init(&cfg2);
@@ -10234,6 +10242,12 @@ bool WiFiScan::filterActive() {
this->orient_display = true;
return;
}
else if (b == CHAN_HOP_INDEX) {
settings_obj.toggleSetting("ChanHop");
this->channel_hop = settings_obj.loadSetting<bool>("ChanHop");
display_obj.tftDrawChanHopButton(false, this->channel_hop);
return;
}
// }
//}
@@ -10485,7 +10499,10 @@ void WiFiScan::channelHop(bool filtered, bool ranged)
int bot_chan = 0;
if ((!settings_obj.loadSetting<bool>("ChanHop")) &&
(this->currentScanMode == WIFI_SCAN_AP))
((this->currentScanMode == WIFI_SCAN_AP) ||
(this->currentScanMode == WIFI_SCAN_PROBE) ||
(this->currentScanMode == WIFI_SCAN_DEAUTH) ||
(this->currentScanMode == WIFI_SCAN_EAPOL)))
return;
if (!filtered) {
@@ -10968,7 +10985,7 @@ void WiFiScan::packetRateLoop(uint32_t tick) {
return;
}
#else
if (this->dual_band_channel_index > 1) {
if (this->dual_band_channel_index > 0) {
this->dual_band_channel_index--;
this->set_channel = this->dual_band_channels[this->dual_band_channel_index];
display_obj.tftDrawChannelScaleButtons(this->set_channel, false);
@@ -11000,6 +11017,12 @@ void WiFiScan::packetRateLoop(uint32_t tick) {
}
#endif
}
else if (b == CHAN_HOP_INDEX) {
settings_obj.toggleSetting("ChanHop");
this->channel_hop = settings_obj.loadSetting<bool>("ChanHop");
display_obj.tftDrawChanHopButton(false, this->channel_hop);
return;
}
#endif
}
@@ -11372,7 +11395,9 @@ void WiFiScan::main(uint32_t currentTime)
initTime = millis();
channelHop();
}
if (currentScanMode == WIFI_SCAN_AP) {
if ((currentScanMode == WIFI_SCAN_AP) ||
(currentScanMode == WIFI_SCAN_PROBE) ||
(currentScanMode == WIFI_SCAN_DEAUTH)){
#ifdef HAS_ILI9341
this->signalAnalyzerLoop(currentTime);
#endif
@@ -11688,12 +11713,12 @@ void WiFiScan::main(uint32_t currentTime)
eapolMonitorMain(currentTime);
#endif
#endif*/
#ifndef HAS_SCREEN
//#ifndef HAS_SCREEN
if (currentTime - initTime >= 2000) {
initTime = millis();
this->channelHop();
}
#endif
//#endif
this->packetRateLoop(currentTime);
}