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

node-opcua-packet-analyzer

Package Overview
Dependencies
Maintainers
1
Versions
186
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-opcua-packet-analyzer - npm Package Compare versions

Comparing version 2.49.0 to 2.51.0

26

dist/source/packet_analyzer/packet_analyzer.js

@@ -40,3 +40,3 @@ "use strict";

const n = end - start;
const strBuf = node_opcua_utils_1.buffer_ellipsis(buffer);
const strBuf = (0, node_opcua_utils_1.buffer_ellipsis)(buffer);
return (chalk.cyan("s:") + f(start, 4) + chalk.cyan(" e:") + f(end, 4) + chalk.cyan(" n:") + f(n, 4) + " " + chalk.yellow(strBuf));

@@ -64,5 +64,5 @@ }

const stream = new node_opcua_binary_stream_1.BinaryStream(bufferExtract);
const nodeId = node_opcua_basic_types_1.decodeNodeId(stream);
const encodingMask = node_opcua_basic_types_1.decodeByte(stream); // 1 bin 2: xml
const length = node_opcua_basic_types_1.decodeUInt32(stream);
const nodeId = (0, node_opcua_basic_types_1.decodeNodeId)(stream);
const encodingMask = (0, node_opcua_basic_types_1.decodeByte)(stream); // 1 bin 2: xml
const length = (0, node_opcua_basic_types_1.decodeUInt32)(stream);
display(chalk.green(" ExpandedNodId =") + " " + nodeId);

@@ -77,3 +77,3 @@ display(chalk.green(" encoding mask =") + " " + encodingMask);

encoding_byte: (encodingMask, valueEnum, start, end) => {
node_opcua_assert_1.assert(valueEnum);
(0, node_opcua_assert_1.assert)(valueEnum);
const b = buffer.slice(start, end);

@@ -114,3 +114,3 @@ display(" 012345678", hex_block(start, end, b));

if (value instanceof Buffer) {
_hexDump = node_opcua_debug_1.hexDump(value);
_hexDump = (0, node_opcua_debug_1.hexDump)(value);
console.log(_hexDump);

@@ -147,4 +147,4 @@ value = "<BUFFER>";

try {
id = node_opcua_basic_types_1.decodeExpandedNodeId(stream);
objMessage = node_opcua_factory_1.constructObject(id);
id = (0, node_opcua_basic_types_1.decodeExpandedNodeId)(stream);
objMessage = (0, node_opcua_factory_1.constructObject)(id);
}

@@ -174,8 +174,10 @@ catch (err) {

console.log(" Error in ", err);
console.log(" Error in ", err.stack);
console.log(" objMessage ", util_1.inspect(objMessage, { colors: true }));
if (err instanceof Error) {
console.log(" Error in ", err.stack);
}
console.log(" objMessage ", (0, util_1.inspect)(objMessage, { colors: true }));
}
}
function analyze_object_binary_encoding(obj) {
node_opcua_assert_1.assert(obj);
(0, node_opcua_assert_1.assert)(obj);
const size = obj.binaryStoreSize();

@@ -189,3 +191,3 @@ console.log("-------------------------------------------------");

if (stream.buffer.length < 256) {
console.log(node_opcua_debug_1.hexDump(stream.buffer));
console.log((0, node_opcua_debug_1.hexDump)(stream.buffer));
console.log("-------------------------------------------------");

@@ -192,0 +194,0 @@ }

@@ -15,4 +15,4 @@ "use strict";

if (process.env.DEBUG) {
console.log(node_opcua_debug_1.hexDump(buffer));
source_1.analyzePacket(buffer, id, 0, 0, options);
console.log((0, node_opcua_debug_1.hexDump)(buffer));
(0, source_1.analyzePacket)(buffer, id, 0, 0, options);
}

@@ -39,3 +39,3 @@ }

if (isArrayOrTypedArray(obj[p])) {
node_opcua_test_helpers_1.assert_arrays_are_equal(objReloaded[p], obj[p]);
(0, node_opcua_test_helpers_1.assert_arrays_are_equal)(objReloaded[p], obj[p]);
}

@@ -95,5 +95,5 @@ else {

const expandedNodeId = obj.encodingDefaultBinary;
const objReloaded = expandedNodeId ? node_opcua_factory_1.constructObject(expandedNodeId) : new obj.constructor();
const objReloaded = expandedNodeId ? (0, node_opcua_factory_1.constructObject)(expandedNodeId) : new obj.constructor();
objReloaded.decode(stream, options);
redirectToNull(() => source_1.analyze_object_binary_encoding(obj));
redirectToNull(() => (0, source_1.analyze_object_binary_encoding)(obj));
compare(objReloaded, obj);

@@ -100,0 +100,0 @@ return objReloaded;

{
"name": "node-opcua-packet-analyzer",
"version": "2.49.0",
"version": "2.51.0",
"description": "pure nodejs OPCUA SDK - module -packet-analyzer",

@@ -15,9 +15,9 @@ "main": "./dist/source/index.js",

"dependencies": {
"chalk": "4.1.1",
"node-opcua-assert": "2.42.0",
"node-opcua-basic-types": "2.47.0",
"node-opcua-binary-stream": "2.42.0",
"node-opcua-debug": "2.42.0",
"node-opcua-factory": "2.49.0",
"node-opcua-utils": "2.44.0"
"chalk": "4.1.2",
"node-opcua-assert": "2.51.0",
"node-opcua-basic-types": "2.51.0",
"node-opcua-binary-stream": "2.51.0",
"node-opcua-debug": "2.51.0",
"node-opcua-factory": "2.51.0",
"node-opcua-utils": "2.51.0"
},

@@ -41,3 +41,3 @@ "devDependencies": {

"homepage": "http://node-opcua.github.io/",
"gitHead": "81654553c6d317fd918ca99b749550eb5e951c23"
"gitHead": "75feb111daf7ec65fa0111e4fa5beb8987fd4945"
}

@@ -205,3 +205,5 @@ // tslint:disable:no-bitwise

console.log(" Error in ", err);
console.log(" Error in ", err.stack);
if (err instanceof Error) {
console.log(" Error in ", err.stack);
}
console.log(" objMessage ", inspect(objMessage, { colors: true }));

@@ -208,0 +210,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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