mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-11-07 12:52:54 -05:00
Security improvements.
This commit is contained in:
@@ -17,12 +17,6 @@ var CreateWsmanComm = function (host, port, user, pass, tls, tlsoptions, parent,
|
||||
obj.noncecounter = 1;
|
||||
obj.authcounter = 0;
|
||||
|
||||
obj.Address = '/wsman';
|
||||
obj.challengeParams = null;
|
||||
obj.noncecounter = 1;
|
||||
obj.authcounter = 0;
|
||||
obj.cnonce = Math.random().toString(36).substring(7); // Generate a random client nonce
|
||||
|
||||
obj.net = require('net');
|
||||
obj.tls = require('tls');
|
||||
obj.crypto = require('crypto');
|
||||
@@ -32,6 +26,12 @@ var CreateWsmanComm = function (host, port, user, pass, tls, tlsoptions, parent,
|
||||
obj.kerberosDone = 0;
|
||||
obj.amtVersion = null;
|
||||
|
||||
obj.Address = '/wsman';
|
||||
obj.challengeParams = null;
|
||||
obj.noncecounter = 1;
|
||||
obj.authcounter = 0;
|
||||
obj.cnonce = obj.crypto.randomBytes(16).toString('hex'); // Generate a random client nonce
|
||||
|
||||
obj.host = host;
|
||||
obj.port = port;
|
||||
obj.user = user;
|
||||
|
||||
Reference in New Issue
Block a user