Adjust packet monitor response

This commit is contained in:
Just Call Me Koko
2020-03-06 12:05:26 -05:00
parent 80cc78e4a6
commit 1897819939
2 changed files with 68 additions and 54 deletions

View File

@@ -814,13 +814,15 @@ void WiFiScan::wifiSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type)
}
}
void WiFiScan::packetMonitorMain()
void WiFiScan::packetMonitorMain(uint32_t currentTime)
{
//---------MAIN 'FOR' LOOP! THIS IS WHERE ALL THE ACTION HAPPENS! HAS TO BE FAST!!!!!---------\\
for (x_pos = (11 + x_scale); x_pos <= 320; x_pos += x_scale) //go along every point on the x axis and do something, start over when finished
// for (x_pos = (11 + x_scale); x_pos <= 320; x_pos += x_scale) //go along every point on the x axis and do something, start over when finished
for (x_pos = (11 + x_scale); x_pos <= 320; x_pos = x_pos)
{
currentTime = millis();
do_break = false;
y_pos_x = 0;
@@ -963,9 +965,18 @@ void WiFiScan::packetMonitorMain()
}
}
y_pos_x = ((-num_beacon * (y_scale * 10)) + (HEIGHT_1 - 2)); // GREEN
y_pos_y = ((-num_deauth * (y_scale * 10)) + (HEIGHT_1 - 2)); // RED
y_pos_z = ((-num_probe * (y_scale * 10)) + (HEIGHT_1 - 2)); // BLUE
if (currentTime - initTime >= GRAPH_REFRESH) {
//Serial.println("-----------------------------------------");
//Serial.println("Time elapsed: " + (String)(currentTime - initTime) + "ms");
x_pos += x_scale;
initTime = millis();
y_pos_x = ((-num_beacon * (y_scale * 5)) + (HEIGHT_1 - 2)); // GREEN
y_pos_y = ((-num_deauth * (y_scale * 5)) + (HEIGHT_1 - 2)); // RED
y_pos_z = ((-num_probe * (y_scale * 5)) + (HEIGHT_1 - 2)); // BLUE
//Serial.println("num_beacon: " + (String)num_beacon);
//Serial.println("num_deauth: " + (String)num_deauth);
//Serial.println(" num_probe: " + (String)num_probe);
num_beacon = 0;
num_probe = 0;
@@ -1014,6 +1025,7 @@ void WiFiScan::packetMonitorMain()
y_pos_z_old = y_pos_z;
//delay(50);
}
}
@@ -1071,7 +1083,7 @@ void WiFiScan::main(uint32_t currentTime)
}
else if (currentScanMode == WIFI_PACKET_MONITOR)
{
packetMonitorMain();
packetMonitorMain(currentTime);
}
else if ((currentScanMode == WIFI_ATTACK_BEACON_SPAM))
{

View File

@@ -30,6 +30,8 @@
#define BT_SCAN_ALL 9
#define BT_SCAN_SKIMMERS 10
#define GRAPH_REFRESH 50
#define MAX_CHANNEL 14
extern Display display_obj;
@@ -109,7 +111,7 @@ class WiFiScan
/*36*/ 0x00
};
void packetMonitorMain();
void packetMonitorMain(uint32_t currentTime);
void changeChannel();
void updateMidway();
void tftDrawXScalButtons();