Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
de5cde2ca9 | |||
7cf077d527 | |||
253b375923 | |||
f22300b438 | |||
a15dd29c53 |
8
.travis.yml
Normal file
8
.travis.yml
Normal file
@ -0,0 +1,8 @@
|
||||
language: node_js
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
node_js:
|
||||
- "4"
|
||||
- "5"
|
@ -1,5 +1,9 @@
|
||||
#node-wifi-scanner
|
||||
|
||||
[](https://travis-ci.org/ancasicolica/node-wifi-scanner)
|
||||
[]()
|
||||
[](https://www.npmjs.com/package/node-wifi-scanner)
|
||||
|
||||
This module for node.js scans available wifi networks. The main purpose was to enhance my node.js based
|
||||
[ZigBee Site Survey Tool](http://ancasicolica.github.io/ZigBeeSiteSurvey/) with WiFi coexistence charts. This tool
|
||||
claims to be compatible with current versions of Mac OS-X, Windows and Linux so I'll fix bugs as fast as possible.
|
||||
@ -81,3 +85,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
@ -18,9 +18,13 @@ function parseOutput(str, callback) {
|
||||
var wifis = [];
|
||||
var err = null;
|
||||
try {
|
||||
if (blocks.length < 2) {
|
||||
// 2nd try, with \r\n
|
||||
blocks = str.split('\r\n\r\n')
|
||||
}
|
||||
if (!blocks || blocks.length === 1) {
|
||||
// No WiFis found
|
||||
return [];
|
||||
return callback(null, []);
|
||||
}
|
||||
|
||||
// Each block has the same structure, while some parts might be available and others
|
||||
|
17
package.json
17
package.json
@ -1,19 +1,27 @@
|
||||
{
|
||||
"name": "node-wifi-scanner",
|
||||
"version": "0.0.4",
|
||||
"version": "0.0.5",
|
||||
"description": "node.js module for WiFi network detection",
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
"WiFi",
|
||||
"Node.js",
|
||||
"scanner"
|
||||
"scanner",
|
||||
"airport",
|
||||
"netsh",
|
||||
"iwlist",
|
||||
"nmcli"
|
||||
],
|
||||
"author": {
|
||||
"name": "Christian Kuster, CH-8342 Wernetshausen",
|
||||
"email": "info@kusti.ch",
|
||||
"url": "http://www.kusti.ch/"
|
||||
},
|
||||
"homepage": "http://www.ferropoly.ch/",
|
||||
"homepage": "https://github.com/ancasicolica/node-wifi-scanner",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ancasicolica/node-wifi-scanner/issues",
|
||||
"email": "info@ancasicolica.ch"
|
||||
},
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -31,6 +39,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt": "0.4.5",
|
||||
"grunt-bump": "0.7.0"
|
||||
"grunt-bump": "0.7.0",
|
||||
"mocha": "2.2.5"
|
||||
}
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ describe('netsh', function () {
|
||||
netsh.parseOutput(fs.readFileSync(path.join(__dirname, 'fixtures', 'netsh', 'netsh_sp.txt'), {encoding: 'utf8'}), (err, info) => {
|
||||
assert.ok(info);
|
||||
assert.equal(info.length, 8);
|
||||
console.log(info);
|
||||
|
||||
var ap = info[0];
|
||||
assert.equal(ap.mac, '98:fc:11:b6:88:9e');
|
||||
assert.equal(ap.ssid, 'CARAMANZANAS_BAJA');
|
||||
|
Reference in New Issue
Block a user