1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Improved Intel AMT within MeshCMD

This commit is contained in:
Ylian Saint-Hilaire 2021-07-16 18:43:30 -07:00
parent 600fb45908
commit 596e3e20d4
2 changed files with 30 additions and 20 deletions

View file

@ -80,11 +80,12 @@ function CreateWsmanComm(/*host, port, user, pass, tls, extra*/) {
}
obj.digest.http = require('http');
}
var request = { protocol: (obj.tls == 1 ? 'https:' : 'http:'), method: 'POST', host: obj.host, path: '/wsman', port: obj.port, rejectUnauthorized: false, checkServerIdentity: function (cert) { console.log('checkServerIdentity', JSON.stringify(cert)); } };
var request = { protocol: (obj.tls == 1 ? 'https:' : 'http:'), method: 'POST', host: obj.host, path: '/wsman', port: obj.port, rejectUnauthorized: false, checkServerIdentity: function (cert) { /*console.log('checkServerIdentity', JSON.stringify(cert));*/ } };
var req = obj.digest.request(request);
//console.log('Request ' + (obj.RequestCount++));
req.on('error', function (e) { obj.gotNextMessagesError({ status: 600 }, 'error', null, [postdata, callback, tag]); });
req.on('response', function (response) {
//console.log(JSON.stringify(response, null, 2));
if (globalDebugFlags & 1) { console.log('Response: ' + response.statusCode); }
if (response.statusCode != 200) {
if (globalDebugFlags & 1) { console.log('ERR:' + JSON.stringify(response)); }