Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

advlib

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

advlib - npm Package Compare versions

Comparing version 0.0.18 to 0.0.19

13

lib/ble/common/assignednumbers/companyidentifiercodes.js

@@ -1123,2 +1123,15 @@ var companyNames = {

"0461": "vhf electronik GmbH",
"0462": "Bonsai Systems GmbH",
"0463": "Fathom Systems Inc.",
"0464": "Bellman & Symfon",
"0465": "International Forte Group LLC",
"0466": "CycleLabs Solutions inc.",
"0467": "Codenex Oy",
"0468": "Kynesim Ltd",
"0469": "Palago AB",
"046a": "INSIGMA INC.",
"046b": "PMD Solutions",
"046c": "Qingdao Realtime Technology Co., Ltd.",
"046d": "BEGA Gantenbrink-Leuchten KG",
"046e": "Pambor Ltd.",
"ffff": "(Reserved) Default Vendor ID"

@@ -1125,0 +1138,0 @@ };

3

lib/ble/common/assignednumbers/memberservices.js

@@ -205,5 +205,6 @@ var companyNames = {

"fe35": "HUAWEI Technologies Co., Ltd",
"fe34": "SmallLoop LLC"
"fe34": "SmallLoop LLC",
"fe33": "CHIPOLO d.o.o."
};
module.exports.companyNames = companyNames;

@@ -10,12 +10,15 @@ /**

* @param {Object} advertiserData The object containing all parsed data.
* @param {Number} cursor The current index into the raw data.
*/
function process(advertiserData) {
function process(advertiserData, cursor) {
var airdrop = {};
var data = advertiserData.manufacturerSpecificData.data;
var length = parseInt(data.substr(2,2),16);
var length = parseInt(data.substr(cursor + 2, 2), 16);
airdrop.length = length;
airdrop.data = data.substr(4, length * 2); // TODO: decipher the data
airdrop.data = data.substr(cursor + 4, length * 2); // TODO: decipher
advertiserData.manufacturerSpecificData.airdrop = airdrop;
return cursor + 4 + (length * 2);
}

@@ -22,0 +25,0 @@

@@ -10,12 +10,15 @@ /**

* @param {Object} advertiserData The object containing all parsed data.
* @param {Number} cursor The current index into the raw data.
*/
function process(advertiserData) {
function process(advertiserData, cursor) {
var airplay = {};
var data = advertiserData.manufacturerSpecificData.data;
var length = parseInt(data.substr(2,2),16);
var length = parseInt(data.substr(cursor + 2, 2), 16);
airplay.length = length;
airplay.data = data.substr(4, length * 2); // TODO: decipher the data
airplay.data = data.substr(cursor + 4, length * 2); // TODO: decipher
advertiserData.manufacturerSpecificData.airplay = airplay;
return cursor + 4 + (length * 2);
}

@@ -22,0 +25,0 @@

/**
* Copyright reelyActive 2015-2016
* Copyright reelyActive 2015-2017
* We believe in an open Internet of Things

@@ -20,2 +20,3 @@ */

"536d6172742043697479204e74776b73": "Eventpath",
"74278bdab64445208f0c720eaf059935": "Minew",
"8deefbb9f7384297804096668bb44281": "Roximity",

@@ -27,3 +28,4 @@ "b9407f30f5f8466eaff925556b57fe6d": "Estimote",

"f3077abe93ac465aacf167f080cb7aef": "The Bubbles Company inc.",
"f7826da64fa24e988024bc5b71e0893e": "Kontakt.io"
"f7826da64fa24e988024bc5b71e0893e": "Kontakt.io",
"fda50693a4e24fb1afcfc6eb07647825": "Minew (WeChat)"
};

@@ -35,4 +37,5 @@

* @param {Object} advertiserData The object containing all parsed data.
* @param {Number} cursor The current index into the raw data.
*/
function process(advertiserData) {
function process(advertiserData, cursor) {
var iBeacon = {};

@@ -53,2 +56,4 @@ var data = advertiserData.manufacturerSpecificData.data;

advertiserData.manufacturerSpecificData.iBeacon = iBeacon;
return cursor + 46;
}

@@ -55,0 +60,0 @@

@@ -17,3 +17,4 @@ /**

function process(advertiserData) {
var data = advertiserData.manufacturerSpecificData.data.substr(0);
var data = advertiserData.manufacturerSpecificData.data;
var cursor = 0;

@@ -23,36 +24,31 @@ // TODO: handle and decipher service type 0x01

// Apple sometimes includes more than one service data
while(data && (data !== '')) {
var appleType = data.substr(0,2);
while(cursor < data.length) {
var appleType = data.substr(cursor,2);
// Service types 0x02 and higher all seem to include length as second byte
if(parseInt(appleType,16) >= 2) {
var length = parseInt(data.substr(2,2),16);
switch(appleType) {
case '02':
ibeacon.process(advertiserData);
break;
case '05':
airdrop.process(advertiserData);
break;
case '08':
service.process(advertiserData); // TODO: decipher observed service
break;
case '09':
service.process(advertiserData); // TODO: decipher observed service
break;
case '0a':
airplay.process(advertiserData);
break;
case '0c':
service.process(advertiserData); // TODO: decipher observed service
break;
case '10':
service.process(advertiserData); // TODO: decipher observed service
break;
default:
service.process(advertiserData);
}
data = data.substr(4 + (length * 2)); // Trim down to any remaining data
switch(appleType) {
case '02':
cursor = ibeacon.process(advertiserData, cursor);
break;
case '05':
cursor = airdrop.process(advertiserData, cursor);
break;
case '08':
cursor = service.process(advertiserData, cursor); // TODO: decipher
break;
case '09':
cursor = service.process(advertiserData, cursor); // TODO: decipher
break;
case '0a':
cursor = airplay.process(advertiserData, cursor);
break;
case '0c':
cursor = service.process(advertiserData, cursor); // TODO: decipher
break;
case '10':
cursor = service.process(advertiserData, cursor); // TODO: decipher
break;
default:
if(parseInt(appleType,16) >= 2) { // Service types 0x02 and higher
service.process(advertiserData); // use second byte as length
} // (at least so it seems!)
}

@@ -59,0 +55,0 @@ }

@@ -10,13 +10,16 @@ /**

* @param {Object} advertiserData The object containing all parsed data.
* @param {Number} cursor The current index into the raw data.
*/
function process(advertiserData) {
function process(advertiserData, cursor) {
var service = {};
var data = advertiserData.manufacturerSpecificData.data;
var length = parseInt(data.substr(2,2),16);
var length = parseInt(data.substr(cursor + 2, 2), 16);
service.type = parseInt(data.substr(0,2),16);
service.type = parseInt(data.substr(cursor, 2), 16);
service.length = length;
service.data = data.substr(4, length * 2);
service.data = data.substr(cursor + 4, length * 2);
advertiserData.manufacturerSpecificData.service = service;
return cursor + 4 + (length * 2);
}

@@ -23,0 +26,0 @@

@@ -13,3 +13,3 @@ {

],
"version": "0.0.18",
"version": "0.0.19",
"engines": {

@@ -16,0 +16,0 @@ "node": ">=0.10.0"

@@ -83,5 +83,5 @@ /**

var EXPECTED_DATA_SERVICE_0C_AND_10 = {
type: 12,
length: 14,
data: "0026487bd5d243b3614ae30fddeb"
type: 16,
length: 2,
data: "0b00"
};

@@ -88,0 +88,0 @@ var EXPECTED_DATA_ALTBEACON = {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc