Improving mac OS part
This commit is contained in:
parent
0fe7bd8eed
commit
9d42fb9b5e
@ -47,7 +47,7 @@ The tool returns an array with objects, each object representing a network with
|
||||
|
||||
* channel: WiFi channel
|
||||
* ssid: SSID of the network (if available)
|
||||
* mac: MAC Address of the network access point
|
||||
* mac: MAC Address of the network access point (if available, otherwise empty string)
|
||||
* rssi: signal strength
|
||||
|
||||
In contrary to other wifi scanners no information about security is returned. This is due to the very different implementation
|
||||
|
@ -20,11 +20,11 @@ function parseOutput(str, callback) {
|
||||
let lines = str.split('\n');
|
||||
|
||||
for (let i = 1, l = lines.length; i < l; i++) {
|
||||
if (lines[i] == '') continue;
|
||||
let elements = lines[i].substr(51).split(/[ ]+/);
|
||||
if (lines[i] === '') continue;
|
||||
let elements = lines[i].substring(51).split(/[ ]+/);
|
||||
wifis.push({
|
||||
'ssid' : lines[i].substr(0,32).trim(),
|
||||
'mac' : lines[i].substr(33,17).trim(),
|
||||
'ssid' : lines[i].substring(0, 32).trim(),
|
||||
'mac' : '', // There is no more mac on a mac
|
||||
'channel': parseInt(elements[1].trim(), 10),
|
||||
'rssi' : parseInt(elements[0].trim(), 10)
|
||||
});
|
||||
|
@ -35,12 +35,12 @@
|
||||
"test": "mocha test"
|
||||
},
|
||||
"dependencies": {
|
||||
"async": "3.1.0",
|
||||
"lodash": "4.17.15"
|
||||
"async": "3.2.4",
|
||||
"lodash": "4.17.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt": "^1.0.3",
|
||||
"grunt": "1.5.3",
|
||||
"grunt-bump": "0.8.0",
|
||||
"mocha": "6.2.0"
|
||||
"mocha": "10.2.0"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user