mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-26 07:05:52 -05:00
MeshCMD fixes.
This commit is contained in:
parent
1a5275c2b7
commit
0d2efd47ea
Binary file not shown.
Binary file not shown.
@ -112,7 +112,7 @@ function run(argv) {
|
||||
if ((typeof args.remotenodeid) == 'string') { settings.remotenodeid = args.remotenodeid; }
|
||||
if ((typeof args.username) == 'string') { settings.username = args.username; }
|
||||
if ((typeof args.password) == 'string') { settings.password = args.password; }
|
||||
if ((typeof args.wss) == 'string') { settings.wss = args.wss; }
|
||||
if ((typeof args.url) == 'string') { settings.url = args.url; }
|
||||
if ((typeof args.profile) == 'string') { settings.profile = args.profile; }
|
||||
if ((typeof args.type) == 'string') { settings.type = args.type; }
|
||||
if ((typeof args.user) == 'string') { settings.username = args.user; }
|
||||
@ -205,10 +205,10 @@ function run(argv) {
|
||||
} else if (action == 'amtccm') {
|
||||
console.log('AmtCCM will attempt to activate Intel AMT on this computer into client control mode (CCM). The command must be run on a computer with Intel AMT, must run as administrator and the Intel management driver must be installed. Intel AMT must be in "pre-provisioning" state for this command to work and a administrator password must be provided. Example usage:\r\n\r\n meshcmd amtccm --pass mypassword');
|
||||
} else if (action == 'amtacm') {
|
||||
console.log('AmtACM will attempt to activate Intel AMT on this computer into admin control mode (ACM). The command must be run on a computer with Intel AMT, must run as administrator and the Intel management driver must be installed. Intel AMT must be in "pre-provisioning" state for this command to work and a administrator password and provisioning certificate must be provided via RCS. Example usage:\r\n\r\n meshcmd amtacm --wss servername:port');
|
||||
console.log('AmtACM will attempt to activate Intel AMT on this computer into admin control mode (ACM). The command must be run on a computer with Intel AMT, must run as administrator and the Intel management driver must be installed. Intel AMT must be in "pre-provisioning" state for this command to work. Example usage:\r\n\r\n meshcmd amtacm --url [url]');
|
||||
console.log('\r\nPossible arguments:\r\n');
|
||||
console.log(' --wss [server:port] The address of the AMT remote configuration server.');
|
||||
console.log(' --profile [name] The name of the AMT profile stored on the AMT remote configuration server.');
|
||||
console.log(' --url wss://server/ The address of the Intel AMT activation server.');
|
||||
console.log(' --profile [name] Optional name of the Intel AMT profile stored on the activation server.');
|
||||
} else if (action == 'amtdeactivate') {
|
||||
console.log('AmtDeactivate will attempt to deactivate Intel AMT on this computer when in client control mode (CCM). The command must be run on a computer with Intel AMT, must run as administrator and the Intel management driver must be installed. Intel AMT must be activated in client control mode for this command to work. Example usage:\r\n\r\n meshcmd amtdeactivate');
|
||||
} else if (action == 'amtacmdeactivate') {
|
||||
@ -498,11 +498,8 @@ function run(argv) {
|
||||
activeToCCM();
|
||||
} else if (settings.action == 'amtacm') {
|
||||
// Start activation to ACM
|
||||
if ((settings.wss == null) || (typeof settings.wss != 'string') || (settings.wss == '')) { console.log('No server URL specified, use --wss [url].'); exit(1); return; }
|
||||
//if ((settings.profile == null) || (typeof settings.profile != 'string') || (settings.profile == '')) { console.log('No or invalid \"profile name\" specified, use --profile [name].'); exit(1); return; }
|
||||
if ((settings.url == null) || (typeof settings.url != 'string') || (settings.url == '')) { console.log('No activation server URL specified, use --url [url].'); exit(1); return; }
|
||||
if ((typeof settings.profile != 'string') || (settings.profile == '')) { settings.profile = null; }
|
||||
//settings.protocol = 'http:';
|
||||
settings.localport = 16992;
|
||||
debug(1, "Settings: " + JSON.stringify(settings));
|
||||
activeToACM();
|
||||
} else if (settings.action == 'amtdeactivate') {
|
||||
@ -926,10 +923,10 @@ function activeToACMEx(fwNonce, dnsSuffix, digestRealm, uuid) {
|
||||
console.log('UUID: ' + uuid);
|
||||
console.log('Realm: ' + digestRealm);
|
||||
console.log('Nonce: ' + fwNonce);
|
||||
console.log('Connecting to ' + settings.wss);
|
||||
console.log('Connecting to ' + settings.url);
|
||||
|
||||
// Establish WebSocket connection to activation server
|
||||
var options = http.parseUri(settings.wss);
|
||||
var options = http.parseUri(settings.url);
|
||||
options.checkServerIdentity = function (clientName, certs) { }; // TODO
|
||||
options.rejectUnauthorized = false;
|
||||
var connection = http.request(options);
|
||||
|
17
agents/meshcmd.min.js
vendored
17
agents/meshcmd.min.js
vendored
@ -112,7 +112,7 @@ function run(argv) {
|
||||
if ((typeof args.remotenodeid) == 'string') { settings.remotenodeid = args.remotenodeid; }
|
||||
if ((typeof args.username) == 'string') { settings.username = args.username; }
|
||||
if ((typeof args.password) == 'string') { settings.password = args.password; }
|
||||
if ((typeof args.wss) == 'string') { settings.wss = args.wss; }
|
||||
if ((typeof args.url) == 'string') { settings.url = args.url; }
|
||||
if ((typeof args.profile) == 'string') { settings.profile = args.profile; }
|
||||
if ((typeof args.type) == 'string') { settings.type = args.type; }
|
||||
if ((typeof args.user) == 'string') { settings.username = args.user; }
|
||||
@ -205,10 +205,10 @@ function run(argv) {
|
||||
} else if (action == 'amtccm') {
|
||||
console.log('AmtCCM will attempt to activate Intel AMT on this computer into client control mode (CCM). The command must be run on a computer with Intel AMT, must run as administrator and the Intel management driver must be installed. Intel AMT must be in "pre-provisioning" state for this command to work and a administrator password must be provided. Example usage:\r\n\r\n meshcmd amtccm --pass mypassword');
|
||||
} else if (action == 'amtacm') {
|
||||
console.log('AmtACM will attempt to activate Intel AMT on this computer into admin control mode (ACM). The command must be run on a computer with Intel AMT, must run as administrator and the Intel management driver must be installed. Intel AMT must be in "pre-provisioning" state for this command to work and a administrator password and provisioning certificate must be provided via RCS. Example usage:\r\n\r\n meshcmd amtacm --wss servername:port');
|
||||
console.log('AmtACM will attempt to activate Intel AMT on this computer into admin control mode (ACM). The command must be run on a computer with Intel AMT, must run as administrator and the Intel management driver must be installed. Intel AMT must be in "pre-provisioning" state for this command to work. Example usage:\r\n\r\n meshcmd amtacm --url [url]');
|
||||
console.log('\r\nPossible arguments:\r\n');
|
||||
console.log(' --wss [server:port] The address of the AMT remote configuration server.');
|
||||
console.log(' --profile [name] The name of the AMT profile stored on the AMT remote configuration server.');
|
||||
console.log(' --url wss://server/ The address of the Intel AMT activation server.');
|
||||
console.log(' --profile [name] Optional name of the Intel AMT profile stored on the activation server.');
|
||||
} else if (action == 'amtdeactivate') {
|
||||
console.log('AmtDeactivate will attempt to deactivate Intel AMT on this computer when in client control mode (CCM). The command must be run on a computer with Intel AMT, must run as administrator and the Intel management driver must be installed. Intel AMT must be activated in client control mode for this command to work. Example usage:\r\n\r\n meshcmd amtdeactivate');
|
||||
} else if (action == 'amtacmdeactivate') {
|
||||
@ -498,11 +498,8 @@ function run(argv) {
|
||||
activeToCCM();
|
||||
} else if (settings.action == 'amtacm') {
|
||||
// Start activation to ACM
|
||||
if ((settings.wss == null) || (typeof settings.wss != 'string') || (settings.wss == '')) { console.log('No server URL specified, use --wss [url].'); exit(1); return; }
|
||||
//if ((settings.profile == null) || (typeof settings.profile != 'string') || (settings.profile == '')) { console.log('No or invalid \"profile name\" specified, use --profile [name].'); exit(1); return; }
|
||||
if ((settings.url == null) || (typeof settings.url != 'string') || (settings.url == '')) { console.log('No activation server URL specified, use --url [url].'); exit(1); return; }
|
||||
if ((typeof settings.profile != 'string') || (settings.profile == '')) { settings.profile = null; }
|
||||
//settings.protocol = 'http:';
|
||||
settings.localport = 16992;
|
||||
debug(1, "Settings: " + JSON.stringify(settings));
|
||||
activeToACM();
|
||||
} else if (settings.action == 'amtdeactivate') {
|
||||
@ -926,10 +923,10 @@ function activeToACMEx(fwNonce, dnsSuffix, digestRealm, uuid) {
|
||||
console.log('UUID: ' + uuid);
|
||||
console.log('Realm: ' + digestRealm);
|
||||
console.log('Nonce: ' + fwNonce);
|
||||
console.log('Connecting to ' + settings.wss);
|
||||
console.log('Connecting to ' + settings.url);
|
||||
|
||||
// Establish WebSocket connection to activation server
|
||||
var options = http.parseUri(settings.wss);
|
||||
var options = http.parseUri(settings.url);
|
||||
options.checkServerIdentity = function (clientName, certs) { }; // TODO
|
||||
options.rejectUnauthorized = false;
|
||||
var connection = http.request(options);
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "meshcentral",
|
||||
"version": "0.3.6-u",
|
||||
"version": "0.3.6-v",
|
||||
"keywords": [
|
||||
"Remote Management",
|
||||
"Intel AMT",
|
||||
|
@ -8821,8 +8821,8 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
|
||||
// Windows agent install
|
||||
//x += "<div id=agins_windows>To add a new computer to device group \"" + EscapeHtml(mesh.name) + "\", download the mesh agent and configuration file and install the agent on the computer to manage.<br /><br />";
|
||||
x += "<div id=agins_windows>To add a new computer to device group \"" + EscapeHtml(mesh.name) + "\", download the mesh agent and install it the computer to manage. This agent has server and device group information embedded within it.<br /><br />";
|
||||
x += addHtmlValue('Mesh Agent', '<a id=aginsw32lnk href="meshagents?id=3&meshid=' + meshid.split('/')[2] + '&installflags=0" download title="32bit version of the MeshAgent">Windows (.exe)</a>');
|
||||
x += addHtmlValue('Mesh Agent', '<a id=aginsw64lnk href="meshagents?id=4&meshid=' + meshid.split('/')[2] + '&installflags=0" download title="64bit version of the MeshAgent">Windows x64 (.exe)</a>');
|
||||
x += addHtmlValue('Mesh Agent', '<a id=aginsw32lnk href="meshagents?id=3&meshid=' + meshid.split('/')[2] + '&installflags=0" download onclick="setDialogMode(0)" title="32bit version of the MeshAgent">Windows (.exe)</a>');
|
||||
x += addHtmlValue('Mesh Agent', '<a id=aginsw64lnk href="meshagents?id=4&meshid=' + meshid.split('/')[2] + '&installflags=0" download onclick="setDialogMode(0)" title="64bit version of the MeshAgent">Windows x64 (.exe)</a>');
|
||||
if (debugmode > 0) { x += addHtmlValue('Settings File', '<a id=aginswmshlnk href="meshsettings?id=' + meshid.split('/')[2] + '&installflags=0" rel="noreferrer noopener" target="_blank">' + EscapeHtml(mesh.name) + ' settings (.msh)</a>'); }
|
||||
x += "</div>";
|
||||
|
||||
@ -8838,8 +8838,8 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
|
||||
|
||||
// Windows agent uninstall
|
||||
x += "<div id=agins_windows_un style=display:none>To remove a mesh agent, download the file below, run it and click \"uninstall\".<br /><br />";
|
||||
x += addHtmlValue('Mesh Agent', '<a href="meshagents?id=3" download title="32bit version of the MeshAgent">Windows (.exe)</a>');
|
||||
x += addHtmlValue('Mesh Agent', '<a href="meshagents?id=4" download title="64bit version of the MeshAgent">Windows x64 (.exe)</a>');
|
||||
x += addHtmlValue('Mesh Agent', '<a href="meshagents?id=3" download onclick="setDialogMode(0)" title="32bit version of the MeshAgent">Windows (.exe)</a>');
|
||||
x += addHtmlValue('Mesh Agent', '<a href="meshagents?id=4" download onclick="setDialogMode(0)" title="64bit version of the MeshAgent">Windows x64 (.exe)</a>');
|
||||
x += "</div>";
|
||||
|
||||
// Linux agent uninstall
|
||||
@ -10161,7 +10161,7 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
|
||||
++count;
|
||||
date = new Date(date.getTime() - (1000 * 60 * 60 * 24)); // Substract one day
|
||||
}
|
||||
QH('p10html2', '<table cellpadding=2 cellspacing=0><thead><tr style=><th scope=col style=text-align:center;width:150px>Day</th><th scope=col style=text-align:center><a download href="devicepowerevents.ashx?id=' + currentNode._id + '"><img title="Download power events" src="images/link4.png" /></a>7 Day Power State</th></tr></thead><tbody>' + x + '</tbody></table>');
|
||||
QH('p10html2', '<table cellpadding=2 cellspacing=0><thead><tr style=><th scope=col style=text-align:center;width:150px>Day</th><th scope=col style=text-align:center><a download href="devicepowerevents.ashx?id=' + currentNode._id + '" onclick="setDialogMode(0)"><img title="Download power events" src="images/link4.png" /></a>7 Day Power State</th></tr></thead><tbody>' + x + '</tbody></table>');
|
||||
}
|
||||
|
||||
// Return a color for the given power state
|
||||
@ -10316,7 +10316,7 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
|
||||
function p10showMeshRouterDialog() {
|
||||
if (xxdialogMode) return;
|
||||
var x = "<div>MeshCentral Router is a Windows tool for TCP port mapping. You can, for example, RDP into a remote device thru this server.</div><br />";
|
||||
x += addHtmlValue('Win32 Executable', '<a style=cursor:pointer download href="meshagents?meshaction=winrouter">MeshCentralRouter.exe</a>');
|
||||
x += addHtmlValue('Win32 Executable', '<a style=cursor:pointer download href="meshagents?meshaction=winrouter" onclick="setDialogMode(0)">MeshCentralRouter.exe</a>');
|
||||
setDialogMode(2, "MeshCentral Router", 1, null, x, "fileDownload");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user