mirror of
https://github.com/SpacehuhnTech/esp8266_deauther.git
synced 2025-12-21 14:09:59 +01:00
Fixed APScan select bug + Attack status bug
- fixed: APScan select wasn't working when Multiple AP selection was disbaled. - fixed: Attack stati wasn't shown - improved: design of select,deselect all buttons
This commit is contained in:
@@ -226,7 +226,8 @@ String APScan::getResultsJSON() {
|
||||
void APScan::sort() {
|
||||
if (debug) Serial.println("sorting APs ");
|
||||
|
||||
//bubble sort
|
||||
/* I know, it's bubble sort... but it works and that's the main thing! ;) (feel free to improve it tho) */
|
||||
|
||||
for (int i = 0; i < results - 1; i++) {
|
||||
Serial.println("--------------");
|
||||
for (int h = 0; h < results - i - 1; h++) {
|
||||
@@ -281,13 +282,13 @@ void APScan::select(int num) {
|
||||
} else if(!settings.multiAPs) {
|
||||
for (int i = 0; i < maxAPScanResults; i++){
|
||||
if(i != num) selected[i] = false;
|
||||
selected[num] = !selected[num];
|
||||
selectedSum = 1;
|
||||
else selected[num] = !selected[num];
|
||||
}
|
||||
selectedSum = 1;
|
||||
} else {
|
||||
selected[num] = !selected[num];
|
||||
if(selected[num]) selectedSum--;
|
||||
else selectedSum++;
|
||||
selected[num] = !selected[num];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -259,10 +259,10 @@ void Attack::stop(int num) {
|
||||
if (debug) Serial.println("stopping " + (String)attackNames[num] + " attack...");
|
||||
if (num == 0) attackMode = "START";
|
||||
isRunning[num] = false;
|
||||
stati[num] = "ready";
|
||||
prevTime[num] = millis();
|
||||
refreshLed();
|
||||
}
|
||||
stati[num] = "ready";
|
||||
}
|
||||
|
||||
void Attack::stopAll() {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -31,6 +31,11 @@
|
||||
<span id="networksFound">0</span>
|
||||
<br />
|
||||
MAC: <span id="apMAC"></span>
|
||||
<span id="selectAllBtns">
|
||||
<br />
|
||||
<button class="marginNull button-primary left" onclick="select(-2)">deselect all</button>
|
||||
<button class="marginNull button-primary right" onclick="select(-1)">select all</button>
|
||||
</span>
|
||||
</p>
|
||||
<br />
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ var networkInfo = getE('networksFound');
|
||||
var scanInfo = getE('scanInfo');
|
||||
var apMAC = getE('apMAC');
|
||||
var startStopScan = getE('startStopScan');
|
||||
var selectAllBtns = getE('selectAllBtns');
|
||||
var autoScan = false;
|
||||
|
||||
function toggleScan(onoff) {
|
||||
@@ -32,12 +33,13 @@ function getResults() {
|
||||
networkInfo.innerHTML = res.aps.length;
|
||||
apMAC.innerHTML = "";
|
||||
|
||||
if (res.multiAPs == 1) selectAllBtns.style.visibility = 'visible';
|
||||
else selectAllBtns.style.visibility = 'hidden';
|
||||
|
||||
var tr = '';
|
||||
if (res.aps.length > 0) {
|
||||
tr += '<tr><th>Ch</th><th>SSID</th><th>RSSI</th><th>Encrypt.</th>';
|
||||
|
||||
if (res.multiAPs == 1) tr += '<th><button class="marginNull button-primary" onclick="select(-1)">select</button> | <button class="marginNull button-primary" onclick="select(-2)">deselect</button> all</th></tr>';
|
||||
else tr += '<th>Select</th></tr>'
|
||||
tr += '<th>Select</th></tr>'
|
||||
}
|
||||
|
||||
for (var i = 0; i < res.aps.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user