mirror of
https://github.com/SpacehuhnTech/esp8266_deauther.git
synced 2025-12-23 06:59:59 +01:00
Improved the way stations save their AP
There was the problem that when the AP list get's sorted (when starting an attack for example), the pointers to the stations would become messed up.
This commit is contained in:
@@ -27,13 +27,13 @@ void Scan::sniffer(uint8_t* buf, uint16_t len) {
|
||||
|
||||
if (macBroadcast(macTo) || macBroadcast(macFrom) || !macValid(macTo) || !macValid(macFrom) || macMulticast(macTo) || macMulticast(macFrom)) return;
|
||||
|
||||
int16_t accesspointNum = findAccesspoint(macFrom);
|
||||
int accesspointNum = findAccesspoint(macFrom);
|
||||
if (accesspointNum >= 0) {
|
||||
stations.add(macTo, accesspointNum);
|
||||
stations.add(macTo, accesspoints.getID(accesspointNum));
|
||||
} else {
|
||||
accesspointNum = findAccesspoint(macTo);
|
||||
if (accesspointNum >= 0) {
|
||||
stations.add(macFrom, accesspointNum);
|
||||
stations.add(macFrom, accesspoints.getID(accesspointNum));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user